51 cout <<
" BmnMwpcHitProducer::Init() " << endl;
54 FairRootManager* ioman = FairRootManager::Instance();
62 hY_vsX2 =
new TH2D(
"Y_vsX2",
"Y_vsX2", 140, -35, 35, 140, -35, 35);
64 hY_vsX3 =
new TH2D(
"Y_vsX3",
"Y_vsX3", 140, -35, 35, 140, -35, 35);
66 hY_vsX_star2 =
new TH2D(
"Y_vsX_star2",
"Y_vsX_star2", 140, -35, 35, 140, -35, 35);
68 hY_vsX_star3 =
new TH2D(
"Y_vsX_star3",
"Y_vsX_star3", 140, -35, 35, 140, -35, 35);
70 hY_vsX_pl0 =
new TH2D(
"Y_vsX_pl0",
"Y_vsX_pl0", 140, -35, 35, 140, -35, 35);
72 hY_vsX_pl1 =
new TH2D(
"Y_vsX_pl1",
"Y_vsX_pl1", 140, -35, 35, 140, -35, 35);
74 hY_vsX_pl2 =
new TH2D(
"Y_vsX_pl2",
"Y_vsX_pl2", 140, -35, 35, 140, -35, 35);
109 Double_t kCheaksize = 12. + 0.5 * dw;
114 ShiftX[2] = -0.271 - 0.5;
115 ShiftY[2] = -6.038 + 4.5;
117 ShiftX[3] = -0.234 - 0.5;
118 ShiftY[3] = -6.140 + 4.5;
120 Int_t Nmc_tracks = 0;
150 Int_t track_id = point->GetTrackID();
151 if (track_id != Id_curr) {
155 cout <<
" ----" << endl;
165 if (z > -756. && z < -750.)
167 if (z > -360. && z < -354.)
177 if (Ch_curr != ChId) {
184 cout <<
"=== track_id " << track_id <<
" ChId " << ChId <<
" xmc " << x <<
" y " << y <<
" z " << z
185 <<
" Pz " << Pz << endl;
191 Int_t time_wire = 70;
192 if (ChId == 2 && planeNum == 0 &&
fDebug)
194 if (ChId == 2 && planeNum == 1 &&
fDebug)
196 if (ChId == 2 && planeNum == 2 &&
fDebug)
201 plNuml = planeNum + 3;
207 if (plNumf > -1 && plNuml == planeNum) {
214 Double_t Ax = (xf - xl) / (zf - zl);
215 Double_t Ay = (yf - yl) / (zf - zl);
217 for (
Int_t ipl = 0; ipl < 6; ipl++) {
218 xi[ipl] = Ax * (ipl - plNumf) + xf;
219 yi[ipl] = Ay * (ipl - plNumf) + yf;
221 cout <<
" xi[" << ipl <<
"] " << xi[ipl] <<
" yi[" << ipl <<
"] " << yi[ipl] <<
" z "
222 << zf + ipl - plNumf;
223 xi[ipl] += ShiftX[ChId];
224 yi[ipl] += ShiftY[ChId];
225 zi[ipl] = zf + ipl - plNumf;
231 if (ipl == 2 || ipl == 5) {
234 cout <<
" -- x --" << hit_coord <<
" y " << yi[ipl] << endl;
235 if (
fabs(yi[ipl]) > a_side)
238 if (ipl == 0 || ipl == 3) {
239 hit_coord = 0.5 * (xi[ipl] -
Sqrt(3) * yi[ipl]);
242 cout <<
" -- v --" << hit_coord <<
" v_t " << v_t << endl;
243 if (
fabs(v_t) > a_side)
246 if (ipl == 1 || ipl == 4) {
247 hit_coord = 0.5 * (xi[ipl] +
Sqrt(3) * yi[ipl]);
250 cout <<
" -- u --" << hit_coord <<
" u_t " << u_t << endl;
251 if (
fabs(u_t) > a_side)
256 if (
fabs(hit_coord) > kCheaksize)
259 if (ipl == 1 || ipl == 2 || ipl == 3) {
260 hit_coord = -hit_coord;
264 wire_pos = (hit_coord + kMiddlePl * dw) / dw;
273 cout <<
" Ch " << ChId <<
" track_id " << track_id <<
" xmc " << x <<
" y " << y <<
" pl " << ipl
274 <<
" XUV " << hit_coord <<
" wire " << wire_pos <<
" nearest " << nearest_wire << endl;
276 if (nearest_wire < 0 || nearest_wire > 95)
288 cout <<
" pdg " << pdg << endl;
320 cout <<
" Nmc_tracks " << Nmc_tracks << endl;