262 cout <<
"define_hit_histo" << endl;
264 double hit_mintime = -10000;
265 double hit_maxtime = -8000;
266 double hit_maxcharge = 70;
268 TString dname =
"hit_histo";
269 output->mkdir(dname,
"histograms for all the hits");
274 h_nofhit_L1_S1_x =
new TH1F(
"h_nofhit_L1_S1_x",
"number of hits in L1, S1, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
275 h_nofhit_L1_S2_x =
new TH1F(
"h_nofhit_L1_S2_x",
"number of hits in L1, S2, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
276 h_nofhit_L2_S1_x =
new TH1F(
"h_nofhit_L2_S1_x",
"number of hits in L2, S1, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
277 h_nofhit_L2_S2_x =
new TH1F(
"h_nofhit_L2_S2_x",
"number of hits in L2, S2, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
278 h_nofhit_L3_S1_x =
new TH1F(
"h_nofhit_L3_S1_x",
"number of hits in L3, S1, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
279 h_nofhit_L3_S2_x =
new TH1F(
"h_nofhit_L3_S2_x",
"number of hits in L3, S2, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
282 h_nofhit_L1_S1_v =
new TH1F(
"h_nofhit_L1_S1_v",
"number of hits in L1, S1, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
283 h_nofhit_L2_S1_v =
new TH1F(
"h_nofhit_L2_S1_v",
"number of hits in L2, S1, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
284 h_nofhit_L2_S2_v =
new TH1F(
"h_nofhit_L2_S2_v",
"number of hits in L2, S2, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
285 h_nofhit_L3_S1_v =
new TH1F(
"h_nofhit_L3_S1_v",
"number of hits in L3, S1, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
286 h_nofhit_L3_S2_v =
new TH1F(
"h_nofhit_L3_S2_v",
"number of hits in L3, S2, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
290 h_hit_charge_L1_S1_x =
new TH1F(
"h_hit_charge_L1_S1_x",
"hit charge (fC) in L1, S1, x view", hit_maxcharge, 0, hit_maxcharge);
291 h_hit_charge_L1_S2_x =
new TH1F(
"h_hit_charge_L1_S2_x",
"hit charge (fC) in L1, S2, x view", hit_maxcharge, 0, hit_maxcharge);
292 h_hit_charge_L2_S1_x =
new TH1F(
"h_hit_charge_L2_S1_x",
"hit charge (fC) in L2, S1, x view", hit_maxcharge, 0, hit_maxcharge);
293 h_hit_charge_L2_S2_x =
new TH1F(
"h_hit_charge_L2_S2_x",
"hit charge (fC) in L2, S2, x view", hit_maxcharge, 0, hit_maxcharge);
294 h_hit_charge_L3_S1_x =
new TH1F(
"h_hit_charge_L3_S1_x",
"hit charge (fC) in L3, S1, x view", hit_maxcharge, 0, hit_maxcharge);
295 h_hit_charge_L3_S2_x =
new TH1F(
"h_hit_charge_L3_S2_x",
"hit charge (fC) in L3, S2, x view", hit_maxcharge, 0, hit_maxcharge);
298 h_hit_charge_L1_S1_v =
new TH1F(
"h_hit_charge_L1_S1_v",
"hit charge (fC) in L1, S1, v view", hit_maxcharge, 0, hit_maxcharge);
299 h_hit_charge_L2_S1_v =
new TH1F(
"h_hit_charge_L2_S1_v",
"hit charge (fC) in L2, S1, v view", hit_maxcharge, 0, hit_maxcharge);
300 h_hit_charge_L2_S2_v =
new TH1F(
"h_hit_charge_L2_S2_v",
"hit charge (fC) in L2, S2, v view", hit_maxcharge, 0, hit_maxcharge);
301 h_hit_charge_L3_S1_v =
new TH1F(
"h_hit_charge_L3_S1_v",
"hit charge (fC) in L3, S1, v view", hit_maxcharge, 0, hit_maxcharge);
302 h_hit_charge_L3_S2_v =
new TH1F(
"h_hit_charge_L3_S2_v",
"hit charge (fC) in L3, S2, v view", hit_maxcharge, 0, hit_maxcharge);
306 h_hit_time_L1_S1_x =
new TH1F(
"h_hit_time_L1_S1_x",
"hit time (ns) in L1, S1, x view", 500, hit_mintime, hit_maxtime);
307 h_hit_time_L1_S2_x =
new TH1F(
"h_hit_time_L1_S2_x",
"hit time (ns) in L1, S2, x view", 500, hit_mintime, hit_maxtime);
308 h_hit_time_L2_S1_x =
new TH1F(
"h_hit_time_L2_S1_x",
"hit time (ns) in L2, S1, x view", 500, hit_mintime, hit_maxtime);
309 h_hit_time_L2_S2_x =
new TH1F(
"h_hit_time_L2_S2_x",
"hit time (ns) in L2, S2, x view", 500, hit_mintime, hit_maxtime);
310 h_hit_time_L3_S1_x =
new TH1F(
"h_hit_time_L3_S1_x",
"hit time (ns) in L3, S1, x view", 500, hit_mintime, hit_maxtime);
311 h_hit_time_L3_S2_x =
new TH1F(
"h_hit_time_L3_S2_x",
"hit time (ns) in L3, S2, x view", 500, hit_mintime, hit_maxtime);
313 h_hit_time_L1_S1_v =
new TH1F(
"h_hit_time_L1_S1_v",
"hit time (ns) in L1, S1, v view", 500, hit_mintime, hit_maxtime);
314 h_hit_time_L2_S1_v =
new TH1F(
"h_hit_time_L2_S1_v",
"hit time (ns) in L2, S1, v view", 500, hit_mintime, hit_maxtime);
315 h_hit_time_L2_S2_v =
new TH1F(
"h_hit_time_L2_S2_v",
"hit time (ns) in L2, S2, v view", 500, hit_mintime, hit_maxtime);
316 h_hit_time_L3_S1_v =
new TH1F(
"h_hit_time_L3_S1_v",
"hit time (ns) in L3, S1, v view", 500, hit_mintime, hit_maxtime);
317 h_hit_time_L3_S2_v =
new TH1F(
"h_hit_time_L3_S2_v",
"hit time (ns) in L3, S2, v view", 500, hit_mintime, hit_maxtime);
321 h_hit_charge_vs_strip_L1_S1_x =
new TH2F(
"h_hit_charge_vs_strip_L1_S1_x",
"hit charge (fC) vs stripID in L1, S1, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, hit_maxcharge, 0, hit_maxcharge);
322 h_hit_charge_vs_strip_L1_S2_x =
new TH2F(
"h_hit_charge_vs_strip_L1_S2_x",
"hit charge (fC) vs stripID in L1, S2, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, hit_maxcharge, 0, hit_maxcharge);
323 h_hit_charge_vs_strip_L2_S1_x =
new TH2F(
"h_hit_charge_vs_strip_L2_S1_x",
"hit charge (fC) vs stripID in L2, S1, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, hit_maxcharge, 0, hit_maxcharge);
324 h_hit_charge_vs_strip_L2_S2_x =
new TH2F(
"h_hit_charge_vs_strip_L2_S2_x",
"hit charge (fC) vs stripID in L2, S2, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, hit_maxcharge, 0, hit_maxcharge);
325 h_hit_charge_vs_strip_L3_S1_x =
new TH2F(
"h_hit_charge_vs_strip_L3_S1_x",
"hit charge (fC) vs stripID in L3, S1, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, hit_maxcharge, 0, hit_maxcharge);
326 h_hit_charge_vs_strip_L3_S2_x =
new TH2F(
"h_hit_charge_vs_strip_L3_S2_x",
"hit charge (fC) vs stripID in L3, S2, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, hit_maxcharge, 0, hit_maxcharge);
328 h_hit_charge_vs_strip_L1_S1_v =
new TH2F(
"h_hit_charge_vs_strip_L1_S1_v",
"hit charge (fC) vs stripID in L1, S1, v view",
MAXNOFSTRIP_L1_v, 0,
MAXNOFSTRIP_L1_v, hit_maxcharge, 0, hit_maxcharge);
329 h_hit_charge_vs_strip_L2_S1_v =
new TH2F(
"h_hit_charge_vs_strip_L2_S1_v",
"hit charge (fC) vs stripID in L2, S1, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, hit_maxcharge, 0, hit_maxcharge);
330 h_hit_charge_vs_strip_L2_S2_v =
new TH2F(
"h_hit_charge_vs_strip_L2_S2_v",
"hit charge (fC) vs stripID in L2, S2, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, hit_maxcharge, 0, hit_maxcharge);
331 h_hit_charge_vs_strip_L3_S1_v =
new TH2F(
"h_hit_charge_vs_strip_L3_S1_v",
"hit charge (fC) vs stripID in L3, S1, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, hit_maxcharge, 0, hit_maxcharge);
332 h_hit_charge_vs_strip_L3_S2_v =
new TH2F(
"h_hit_charge_vs_strip_L3_S2_v",
"hit charge (fC) vs stripID in L3, S2, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, hit_maxcharge, 0, hit_maxcharge);
336 h_hit_time_vs_strip_L1_S1_x =
new TH2F(
"h_hit_time_vs_strip_L1_S1_x",
"hit time (ns) vs stripID in L1, S1, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, 500, hit_mintime, hit_maxtime);
337 h_hit_time_vs_strip_L1_S2_x =
new TH2F(
"h_hit_time_vs_strip_L1_S2_x",
"hit time (ns) vs stripID in L1, S2, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, 500, hit_mintime, hit_maxtime);
338 h_hit_time_vs_strip_L2_S1_x =
new TH2F(
"h_hit_time_vs_strip_L2_S1_x",
"hit time (ns) vs stripID in L2, S1, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, 500, hit_mintime, hit_maxtime);
339 h_hit_time_vs_strip_L2_S2_x =
new TH2F(
"h_hit_time_vs_strip_L2_S2_x",
"hit time (ns) vs stripID in L2, S2, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, 500, hit_mintime, hit_maxtime);
340 h_hit_time_vs_strip_L3_S1_x =
new TH2F(
"h_hit_time_vs_strip_L3_S1_x",
"hit time (ns) vs stripID in L3, S1, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, 500, hit_mintime, hit_maxtime);
341 h_hit_time_vs_strip_L3_S2_x =
new TH2F(
"h_hit_time_vs_strip_L3_S2_x",
"hit time (ns) vs stripID in L3, S2, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, 500, hit_mintime, hit_maxtime);
343 h_hit_time_vs_strip_L1_S1_v =
new TH2F(
"h_hit_time_vs_strip_L1_S1_v",
"hit time (ns) vs stripID in L1, S1, v view",
MAXNOFSTRIP_L1_v, 0,
MAXNOFSTRIP_L1_v, 500, hit_mintime, hit_maxtime);
344 h_hit_time_vs_strip_L2_S1_v =
new TH2F(
"h_hit_time_vs_strip_L2_S1_v",
"hit time (ns) vs stripID in L2, S1, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, 500, hit_mintime, hit_maxtime);
345 h_hit_time_vs_strip_L2_S2_v =
new TH2F(
"h_hit_time_vs_strip_L2_S2_v",
"hit time (ns) vs stripID in L2, S2, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, 500, hit_mintime, hit_maxtime);
346 h_hit_time_vs_strip_L3_S1_v =
new TH2F(
"h_hit_time_vs_strip_L3_S1_v",
"hit time (ns) vs stripID in L3, S1, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, 500, hit_mintime, hit_maxtime);
347 h_hit_time_vs_strip_L3_S2_v =
new TH2F(
"h_hit_time_vs_strip_L3_S2_v",
"hit time (ns) vs stripID in L3, S2, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, 500, hit_mintime, hit_maxtime);
351 h_hit_charge_vs_time_L1_S1_x =
new TH2F(
"h_hit_charge_vs_time_L1_S1_x",
"hit charge (fC) vs time (ns) in L1, S1, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
352 h_hit_charge_vs_time_L1_S2_x =
new TH2F(
"h_hit_charge_vs_time_L1_S2_x",
"hit charge (fC) vs time (ns) in L1, S2, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
353 h_hit_charge_vs_time_L2_S1_x =
new TH2F(
"h_hit_charge_vs_time_L2_S1_x",
"hit charge (fC) vs time (ns) in L2, S1, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
354 h_hit_charge_vs_time_L2_S2_x =
new TH2F(
"h_hit_charge_vs_time_L2_S2_x",
"hit charge (fC) vs time (ns) in L2, S2, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
355 h_hit_charge_vs_time_L3_S1_x =
new TH2F(
"h_hit_charge_vs_time_L3_S1_x",
"hit charge (fC) vs time (ns) in L3, S1, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
356 h_hit_charge_vs_time_L3_S2_x =
new TH2F(
"h_hit_charge_vs_time_L3_S2_x",
"hit charge (fC) vs time (ns) in L3, S2, x view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
358 h_hit_charge_vs_time_L1_S1_v =
new TH2F(
"h_hit_charge_vs_time_L1_S1_v",
"hit charge (fC) vs time (ns) in L1, S1, v view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
359 h_hit_charge_vs_time_L2_S1_v =
new TH2F(
"h_hit_charge_vs_time_L2_S1_v",
"hit charge (fC) vs time (ns) in L2, S1, v view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
360 h_hit_charge_vs_time_L2_S2_v =
new TH2F(
"h_hit_charge_vs_time_L2_S2_v",
"hit charge (fC) vs time (ns) in L2, S2, v view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
361 h_hit_charge_vs_time_L3_S1_v =
new TH2F(
"h_hit_charge_vs_time_L3_S1_v",
"hit charge (fC) vs time (ns) in L3, S1, v view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
362 h_hit_charge_vs_time_L3_S2_v =
new TH2F(
"h_hit_charge_vs_time_L3_S2_v",
"hit charge (fC) vs time (ns) in L3, S2, v view", 500, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
366 h_hit_charge_vs_length_L1_S1_v =
new TH2F(
"h_hit_charge_vs_length_L1_S1_v",
"hit charge (fC) vs length (mm) in L1, S1, v view", 500, 0,
MAXLENGTH_L1_v, hit_maxcharge, 0, hit_maxcharge);
367 h_hit_charge_vs_length_L2_S1_v =
new TH2F(
"h_hit_charge_vs_length_L2_S1_v",
"hit charge (fC) vs length (mm) in L2, S1, v view", 500, 0,
MAXLENGTH_L2_v, hit_maxcharge, 0, hit_maxcharge);
368 h_hit_charge_vs_length_L2_S2_v =
new TH2F(
"h_hit_charge_vs_length_L2_S2_v",
"hit charge (fC) vs length (mm) in L2, S2, v view", 500, 0,
MAXLENGTH_L2_v, hit_maxcharge, 0, hit_maxcharge);
369 h_hit_charge_vs_length_L3_S1_v =
new TH2F(
"h_hit_charge_vs_length_L3_S1_v",
"hit charge (fC) vs length (mm) in L3, S1, v view", 500, 0,
MAXLENGTH_L2_v, hit_maxcharge, 0, hit_maxcharge);
370 h_hit_charge_vs_length_L3_S2_v =
new TH2F(
"h_hit_charge_vs_length_L3_S2_v",
"hit charge (fC) vs length (mm) in L3, S2, v view", 500, 0,
MAXLENGTH_L2_v, hit_maxcharge, 0, hit_maxcharge);
376 cout <<
"define_hit_in_time_histo" << endl;
378 double hit_mintime = -10000;
379 double hit_maxtime = -8000;
380 double hit_maxcharge = 70;
382 TString dname =
"hit_in_time_histo";
383 output-> mkdir(dname,
"histograms for the hits in time window");
388 h_hit_in_time_charge_L1_S1_x =
new TH1F(
"h_hit_in_time_charge_L1_S1_x",
"(in time) hit charge (fC) in L1, S1, x view", hit_maxcharge, 0, hit_maxcharge);
389 h_hit_in_time_charge_L1_S2_x =
new TH1F(
"h_hit_in_time_charge_L1_S2_x",
"(in time) hit charge (fC) in L1, S2, x view", hit_maxcharge, 0, hit_maxcharge);
390 h_hit_in_time_charge_L2_S1_x =
new TH1F(
"h_hit_in_time_charge_L2_S1_x",
"(in time) hit charge (fC) in L2, S1, x view", hit_maxcharge, 0, hit_maxcharge);
391 h_hit_in_time_charge_L2_S2_x =
new TH1F(
"h_hit_in_time_charge_L2_S2_x",
"(in time) hit charge (fC) in L2, S2, x view", hit_maxcharge, 0, hit_maxcharge);
392 h_hit_in_time_charge_L3_S1_x =
new TH1F(
"h_hit_in_time_charge_L3_S1_x",
"(in time) hit charge (fC) in L3, S1, x view", hit_maxcharge, 0, hit_maxcharge);
393 h_hit_in_time_charge_L3_S2_x =
new TH1F(
"h_hit_in_time_charge_L3_S2_x",
"(in time) hit charge (fC) in L3, S2, x view", hit_maxcharge, 0, hit_maxcharge);
396 h_hit_in_time_charge_L1_S1_v =
new TH1F(
"h_hit_in_time_charge_L1_S1_v",
"(in time) hit charge (fC) in L1, S1, v view", hit_maxcharge, 0, hit_maxcharge);
397 h_hit_in_time_charge_L2_S1_v =
new TH1F(
"h_hit_in_time_charge_L2_S1_v",
"(in time) hit charge (fC) in L2, S1, v view", hit_maxcharge, 0, hit_maxcharge);
398 h_hit_in_time_charge_L2_S2_v =
new TH1F(
"h_hit_in_time_charge_L2_S2_v",
"(in time) hit charge (fC) in L2, S2, v view", hit_maxcharge, 0, hit_maxcharge);
399 h_hit_in_time_charge_L3_S1_v =
new TH1F(
"h_hit_in_time_charge_L3_S1_v",
"(in time) hit charge (fC) in L3, S1, v view", hit_maxcharge, 0, hit_maxcharge);
400 h_hit_in_time_charge_L3_S2_v =
new TH1F(
"h_hit_in_time_charge_L3_S2_v",
"(in time) hit charge (fC) in L3, S2, v view", hit_maxcharge, 0, hit_maxcharge);
404 h_hit_in_time_strip_L1_S1_x =
new TH1F(
"h_hit_in_time_strip_L1_S1_x",
"(in time) hit counts vs stripID in L1, S1, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x);
405 h_hit_in_time_strip_L1_S2_x =
new TH1F(
"h_hit_in_time_strip_L1_S2_x",
"(in time) hit counts vs stripID in L1, S2, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x);
406 h_hit_in_time_strip_L2_S1_x =
new TH1F(
"h_hit_in_time_strip_L2_S1_x",
"(in time) hit counts vs stripID in L2, S1, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x);
407 h_hit_in_time_strip_L2_S2_x =
new TH1F(
"h_hit_in_time_strip_L2_S2_x",
"(in time) hit counts vs stripID in L2, S2, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x);
408 h_hit_in_time_strip_L3_S1_x =
new TH1F(
"h_hit_in_time_strip_L3_S1_x",
"(in time) hit counts vs stripID in L3, S1, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x);
409 h_hit_in_time_strip_L3_S2_x =
new TH1F(
"h_hit_in_time_strip_L3_S2_x",
"(in time) hit counts vs stripID in L3, S2, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x);
412 h_hit_in_time_strip_L1_S1_v =
new TH1F(
"h_hit_in_time_strip_L1_S1_v",
"(in time) hit counts vs stripID in L1, S1, v view",
MAXNOFSTRIP_L1_v, 0,
MAXNOFSTRIP_L1_v);
413 h_hit_in_time_strip_L2_S1_v =
new TH1F(
"h_hit_in_time_strip_L2_S1_v",
"(in time) hit counts vs stripID in L2, S1, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v);
414 h_hit_in_time_strip_L2_S2_v =
new TH1F(
"h_hit_in_time_strip_L2_S2_v",
"(in time) hit counts vs stripID in L2, S2, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v);
415 h_hit_in_time_strip_L3_S1_v =
new TH1F(
"h_hit_in_time_strip_L3_S1_v",
"(in time) hit counts vs stripID in L3, S1, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v);
416 h_hit_in_time_strip_L3_S2_v =
new TH1F(
"h_hit_in_time_strip_L3_S2_v",
"(in time) hit counts vs stripID in L3, S2, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v);
420 h_hit_in_time_charge_vs_strip_L1_S1_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L1_S1_x",
"(in time) hit charge (fC) vs stripID in L1, S1, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, hit_maxcharge, 0, hit_maxcharge);
421 h_hit_in_time_charge_vs_strip_L1_S2_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L1_S2_x",
"(in time) hit charge (fC) vs stripID in L1, S2, x view",
MAXNOFSTRIP_L1_x, 0,
MAXNOFSTRIP_L1_x, hit_maxcharge, 0, hit_maxcharge);
422 h_hit_in_time_charge_vs_strip_L2_S1_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L2_S1_x",
"(in time) hit charge (fC) vs stripID in L2, S1, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, hit_maxcharge, 0, hit_maxcharge);
423 h_hit_in_time_charge_vs_strip_L2_S2_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L2_S2_x",
"(in time) hit charge (fC) vs stripID in L2, S2, x view",
MAXNOFSTRIP_L2_x, 0,
MAXNOFSTRIP_L2_x, hit_maxcharge, 0, hit_maxcharge);
424 h_hit_in_time_charge_vs_strip_L3_S1_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L3_S1_x",
"(in time) hit charge (fC) vs stripID in L3, S1, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, hit_maxcharge,0, hit_maxcharge);
425 h_hit_in_time_charge_vs_strip_L3_S2_x =
new TH2F(
"h_hit_in_time_charge_vs_strip_L3_S2_x",
"(in time) hit charge (fC) vs stripID in L3, S2, x view",
MAXNOFSTRIP_L3_x, 0,
MAXNOFSTRIP_L3_x, hit_maxcharge,0, hit_maxcharge);
428 h_hit_in_time_charge_vs_strip_L1_S1_v =
new TH2F(
"h_hit_in_time_charge_vs_strip_L1_S1_v",
"(in time) hit charge (fC) vs stripID in L1, S1, v view",
MAXNOFSTRIP_L1_v, 0,
MAXNOFSTRIP_L1_v, hit_maxcharge, 0, hit_maxcharge);
429 h_hit_in_time_charge_vs_strip_L2_S1_v =
new TH2F(
"h_hit_in_time_charge_vs_strip_L2_S1_v",
"(in time) hit charge (fC) vs stripID in L2, S1, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, hit_maxcharge, 0, hit_maxcharge);
430 h_hit_in_time_charge_vs_strip_L2_S2_v =
new TH2F(
"h_hit_in_time_charge_vs_strip_L2_S2_v",
"(in time) hit charge (fC) vs stripID in L2, S2, v view",
MAXNOFSTRIP_L2_v, 0,
MAXNOFSTRIP_L2_v, hit_maxcharge, 0, hit_maxcharge);
431 h_hit_in_time_charge_vs_strip_L3_S1_v =
new TH2F(
"h_hit_in_time_charge_vs_strip_L3_S1_v",
"(in time) hit charge (fC) vs stripID in L3, S1, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, hit_maxcharge, 0, hit_maxcharge);
432 h_hit_in_time_charge_vs_strip_L3_S2_v =
new TH2F(
"h_hit_in_time_charge_vs_strip_L3_S2_v",
"(in time) hit charge (fC) vs stripID in L3, S2, v view",
MAXNOFSTRIP_L3_v, 0,
MAXNOFSTRIP_L3_v, hit_maxcharge, 0, hit_maxcharge);
439 cout <<
"define_cluster1d_histo" << endl;
441 double cluster1d_max_charge = 250;
442 double cluster1d_max_size = 40;
444 TString dname =
"cluster1d_histo";
445 output-> mkdir(dname,
"histograms of all cluster 1D");
450 h_nofcluster1d_L1_S1_x =
new TH1F(
"h_nofcluster1d_L1_S1_x",
"number of cluster1d in L1, S1, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
451 h_nofcluster1d_L1_S2_x =
new TH1F(
"h_nofcluster1d_L1_S2_x",
"number of cluster1d in L1, S2, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
452 h_nofcluster1d_L2_S1_x =
new TH1F(
"h_nofcluster1d_L2_S1_x",
"number of cluster1d in L2, S1, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
453 h_nofcluster1d_L2_S2_x =
new TH1F(
"h_nofcluster1d_L2_S2_x",
"number of cluster1d in L2, S2, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
454 h_nofcluster1d_L3_S1_x =
new TH1F(
"h_nofcluster1d_L3_S1_x",
"number of cluster1d in L3, S1, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
455 h_nofcluster1d_L3_S2_x =
new TH1F(
"h_nofcluster1d_L3_S2_x",
"number of cluster1d in L3, S2, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
457 h_nofcluster1d_L1_S1_v =
new TH1F(
"h_nofcluster1d_L1_S1_v",
"number of cluster1d in L1, S1, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
458 h_nofcluster1d_L2_S1_v =
new TH1F(
"h_nofcluster1d_L2_S1_v",
"number of cluster1d in L2, S1, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
459 h_nofcluster1d_L2_S2_v =
new TH1F(
"h_nofcluster1d_L2_S2_v",
"number of cluster1d in L2, S2, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
460 h_nofcluster1d_L3_S1_v =
new TH1F(
"h_nofcluster1d_L3_S1_v",
"number of cluster1d in L3, S1, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
461 h_nofcluster1d_L3_S2_v =
new TH1F(
"h_nofcluster1d_L3_S2_v",
"number of cluster1d in L3, S2, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
465 h_cluster1d_size_L1_S1_x =
new TH1F(
"h_cluster1d_size_L1_S1_x",
"cluster1d size in L1, S1, x view", cluster1d_max_size, 0, cluster1d_max_size);
466 h_cluster1d_size_L1_S2_x =
new TH1F(
"h_cluster1d_size_L1_S2_x",
"cluster1d size in L1, S2, x view", cluster1d_max_size, 0, cluster1d_max_size);
467 h_cluster1d_size_L2_S1_x =
new TH1F(
"h_cluster1d_size_L2_S1_x",
"cluster1d size in L2, S1, x view", cluster1d_max_size, 0, cluster1d_max_size);
468 h_cluster1d_size_L2_S2_x =
new TH1F(
"h_cluster1d_size_L2_S2_x",
"cluster1d size in L2, S2, x view", cluster1d_max_size, 0, cluster1d_max_size);
469 h_cluster1d_size_L3_S1_x =
new TH1F(
"h_cluster1d_size_L3_S1_x",
"cluster1d size in L3, S1, x view", cluster1d_max_size, 0, cluster1d_max_size);
470 h_cluster1d_size_L3_S2_x =
new TH1F(
"h_cluster1d_size_L3_S2_x",
"cluster1d size in L3, S2, x view", cluster1d_max_size, 0, cluster1d_max_size);
472 h_cluster1d_size_L1_S1_v =
new TH1F(
"h_cluster1d_size_L1_S1_v",
"cluster1d size in L1, S1, v view", cluster1d_max_size, 0, cluster1d_max_size);
473 h_cluster1d_size_L2_S1_v =
new TH1F(
"h_cluster1d_size_L2_S1_v",
"cluster1d size in L2, S1, v view", cluster1d_max_size, 0, cluster1d_max_size);
474 h_cluster1d_size_L2_S2_v =
new TH1F(
"h_cluster1d_size_L2_S2_v",
"cluster1d size in L2, S2, v view", cluster1d_max_size, 0, cluster1d_max_size);
475 h_cluster1d_size_L3_S1_v =
new TH1F(
"h_cluster1d_size_L3_S1_v",
"cluster1d size in L3, S1, v view", cluster1d_max_size, 0, cluster1d_max_size);
476 h_cluster1d_size_L3_S2_v =
new TH1F(
"h_cluster1d_size_L3_S2_v",
"cluster1d size in L3, S2, v view", cluster1d_max_size, 0, cluster1d_max_size);
479 h_cluster1d_charge_vs_phi_L1_S1_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L1_S1_x",
"cluster1d charge (fC) vs phi (deg) in L1, S1, x view", 180, -180, 0, cluster1d_max_charge, 0, cluster1d_max_charge);
480 h_cluster1d_charge_vs_phi_L1_S2_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L1_S2_x",
"cluster1d charge (fC) vs phi (deg) in L1, S2, x view", 180, 0, 180, cluster1d_max_charge, 0, cluster1d_max_charge);
481 h_cluster1d_charge_vs_phi_L2_S1_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L2_S1_x",
"cluster1d charge (fC) vs phi (deg) in L2, S1, x view", 180, -180, 0, cluster1d_max_charge, 0, cluster1d_max_charge);
482 h_cluster1d_charge_vs_phi_L2_S2_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L2_S2_x",
"cluster1d charge (fC) vs phi (deg) in L2, S2, x view", 180, 0, 180, cluster1d_max_charge, 0, cluster1d_max_charge);
483 h_cluster1d_charge_vs_phi_L3_S1_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L3_S1_x",
"cluster1d charge (fC) vs phi (deg) in L3, S1, x view", 180, -180, 0, cluster1d_max_charge, 0, cluster1d_max_charge);
484 h_cluster1d_charge_vs_phi_L3_S2_x =
new TH2F(
"h_cluster1d_charge_vs_phi_L3_S2_x",
"cluster1d charge (fC) vs phi (deg) in L3, S2, x view", 180, 0, 180, cluster1d_max_charge, 0, cluster1d_max_charge);
487 h_cluster1d_charge_vs_v_L1_S1_v =
new TH2F(
"h_cluster1d_charge_vs_v_L1_S1_v",
"cluster1d charge (fC) vs v (mm) in L1, S1, v view", 0.7*
MAXNOFSTRIP_L1_v, 0, 0.7*
MAXNOFSTRIP_L1_v, cluster1d_max_charge, 0, cluster1d_max_charge);
488 h_cluster1d_charge_vs_v_L2_S1_v =
new TH2F(
"h_cluster1d_charge_vs_v_L2_S1_v",
"cluster1d charge (fC) vs v (mm) in L2, S1, v view", 0.7*
MAXNOFSTRIP_L2_v, 0, 0.7*
MAXNOFSTRIP_L2_v, cluster1d_max_charge, 0, cluster1d_max_charge);
489 h_cluster1d_charge_vs_v_L2_S2_v =
new TH2F(
"h_cluster1d_charge_vs_v_L2_S2_v",
"cluster1d charge (fC) vs v (mm) in L2, S2, v view", 0.7*
MAXNOFSTRIP_L2_v, 0, 0.7*
MAXNOFSTRIP_L2_v, cluster1d_max_charge, 0, cluster1d_max_charge);
490 h_cluster1d_charge_vs_v_L3_S1_v =
new TH2F(
"h_cluster1d_charge_vs_v_L3_S1_v",
"cluster1d charge (fC) vs v (mm) in L3, S1, v view", 0.7*
MAXNOFSTRIP_L3_v, 0, 0.7*
MAXNOFSTRIP_L3_v, cluster1d_max_charge, 0, cluster1d_max_charge);
491 h_cluster1d_charge_vs_v_L3_S2_v =
new TH2F(
"h_cluster1d_charge_vs_v_L3_S2_v",
"cluster1d charge (fC) vs v (mm) in L3, S2, v view", 0.7*
MAXNOFSTRIP_L3_v, 0, 0.7*
MAXNOFSTRIP_L3_v, cluster1d_max_charge, 0, cluster1d_max_charge);
498 cout <<
"define_cluster_selected_histo" << endl;
500 double cluster1d_max_charge = 250;
501 double cluster1d_max_size = 40;
503 TString dname =
"cluster_selected_histo";
504 output->mkdir(dname,
"histograms of cluster 1D and 2D from selected clusters");
508 h_cluster1d_charge_selected_L1_S1_x =
new TH1F(
"h_cluster1d_charge_selected_L1_S1_x",
"cluster1d charge (fC) in L1, S1, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
509 h_cluster1d_charge_selected_L1_S2_x =
new TH1F(
"h_cluster1d_charge_selected_L1_S2_x",
"cluster1d charge (fC) in L1, S2, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
510 h_cluster1d_charge_selected_L2_S1_x =
new TH1F(
"h_cluster1d_charge_selected_L2_S1_x",
"cluster1d charge (fC) in L2, S1, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
511 h_cluster1d_charge_selected_L2_S2_x =
new TH1F(
"h_cluster1d_charge_selected_L2_S2_x",
"cluster1d charge (fC) in L2, S2, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
512 h_cluster1d_charge_selected_L3_S1_x =
new TH1F(
"h_cluster1d_charge_selected_L3_S1_x",
"cluster1d charge (fC) in L3, S1, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
513 h_cluster1d_charge_selected_L3_S2_x =
new TH1F(
"h_cluster1d_charge_selected_L3_S2_x",
"cluster1d charge (fC) in L3, S2, x view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
515 h_cluster1d_charge_selected_L1_S1_v =
new TH1F(
"h_cluster1d_charge_selected_L1_S1_v",
"cluster1d charge (fC) in L1, S1, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
516 h_cluster1d_charge_selected_L1_S2_v =
new TH1F(
"h_cluster1d_charge_selected_L1_S2_v",
"cluster1d charge (fC) in L1, S2, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
517 h_cluster1d_charge_selected_L2_S1_v =
new TH1F(
"h_cluster1d_charge_selected_L2_S1_v",
"cluster1d charge (fC) in L2, S1, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
518 h_cluster1d_charge_selected_L2_S2_v =
new TH1F(
"h_cluster1d_charge_selected_L2_S2_v",
"cluster1d charge (fC) in L2, S2, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
519 h_cluster1d_charge_selected_L3_S1_v =
new TH1F(
"h_cluster1d_charge_selected_L3_S1_v",
"cluster1d charge (fC) in L3, S1, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
520 h_cluster1d_charge_selected_L3_S2_v =
new TH1F(
"h_cluster1d_charge_selected_L3_S2_v",
"cluster1d charge (fC) in L3, S2, v view (only selected clusters)", cluster1d_max_charge, 0, cluster1d_max_charge);
524 h_cluster1d_size_selected_L1_S1_x =
new TH1F(
"h_cluster1d_size_selected_L1_S1_x",
"cluster1d size in L1, S1, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
525 h_cluster1d_size_selected_L1_S2_x =
new TH1F(
"h_cluster1d_size_selected_L1_S2_x",
"cluster1d size in L1, S2, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
526 h_cluster1d_size_selected_L2_S1_x =
new TH1F(
"h_cluster1d_size_selected_L2_S1_x",
"cluster1d size in L2, S1, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
527 h_cluster1d_size_selected_L2_S2_x =
new TH1F(
"h_cluster1d_size_selected_L2_S2_x",
"cluster1d size in L2, S2, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
528 h_cluster1d_size_selected_L3_S1_x =
new TH1F(
"h_cluster1d_size_selected_L3_S1_x",
"cluster1d size in L3, S1, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
529 h_cluster1d_size_selected_L3_S2_x =
new TH1F(
"h_cluster1d_size_selected_L3_S2_x",
"cluster1d size in L3, S2, x view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
531 h_cluster1d_size_selected_L1_S1_v =
new TH1F(
"h_cluster1d_size_selected_L1_S1_v",
"cluster1d size in L1, S1, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
532 h_cluster1d_size_selected_L1_S2_v =
new TH1F(
"h_cluster1d_size_selected_L1_S2_v",
"cluster1d size in L1, S2, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
533 h_cluster1d_size_selected_L2_S1_v =
new TH1F(
"h_cluster1d_size_selected_L2_S1_v",
"cluster1d size in L2, S1, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
534 h_cluster1d_size_selected_L2_S2_v =
new TH1F(
"h_cluster1d_size_selected_L2_S2_v",
"cluster1d size in L2, S2, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
535 h_cluster1d_size_selected_L3_S1_v =
new TH1F(
"h_cluster1d_size_selected_L3_S1_v",
"cluster1d size in L3, S1, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
536 h_cluster1d_size_selected_L3_S2_v =
new TH1F(
"h_cluster1d_size_selected_L3_S2_v",
"cluster1d size in L3, S2, v view (only selected clusters)", cluster1d_max_size, 0, cluster1d_max_size);
538 double cluster2d_max_charge = 500;
539 double cluster2d_max_size = 40;
542 h_cluster2d_charge_selected_L1_S1 =
new TH1F(
"h_cluster2d_charge_selected_L1_S1",
"cluster2d charge (fC) in L1, S1 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
543 h_cluster2d_charge_selected_L1_S2 =
new TH1F(
"h_cluster2d_charge_selected_L1_S2",
"cluster2d charge (fC) in L1, S2 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
544 h_cluster2d_charge_selected_L2_S1 =
new TH1F(
"h_cluster2d_charge_selected_L2_S1",
"cluster2d charge (fC) in L2, S1 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
545 h_cluster2d_charge_selected_L2_S2 =
new TH1F(
"h_cluster2d_charge_selected_L2_S2",
"cluster2d charge (fC) in L2, S2 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
546 h_cluster2d_charge_selected_L3_S1 =
new TH1F(
"h_cluster2d_charge_selected_L3_S1",
"cluster2d charge (fC) in L3, S1 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
547 h_cluster2d_charge_selected_L3_S2 =
new TH1F(
"h_cluster2d_charge_selected_L3_S2",
"cluster2d charge (fC) in L3, S2 (only selected clusters)", cluster2d_max_charge, 0, cluster2d_max_charge);
550 h_cl_hitmaxQ_charge_selected_L1_S1_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L1_S1_x",
"cl hitmaxQ charge (fC) in L1, S1, x view (only selected clusters)", 0, 0, 60);
551 h_cl_hitmaxQ_charge_selected_L1_S2_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L1_S2_x",
"cl hitmaxQ charge (fC) in L1, S2, x view (only selected clusters)", 0, 0, 60);
552 h_cl_hitmaxQ_charge_selected_L2_S1_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L2_S1_x",
"cl hitmaxQ charge (fC) in L2, S1, x view (only selected clusters)", 0, 0, 60);
553 h_cl_hitmaxQ_charge_selected_L2_S2_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L2_S2_x",
"cl hitmaxQ charge (fC) in L2, S2, x view (only selected clusters)", 0, 0, 60);
554 h_cl_hitmaxQ_charge_selected_L3_S1_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L3_S1_x",
"cl hitmaxQ charge (fC) in L3, S1, x view (only selected clusters)", 0, 0, 60);
555 h_cl_hitmaxQ_charge_selected_L3_S2_x =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L3_S2_x",
"cl hitmaxQ charge (fC) in L3, S2, x view (only selected clusters)", 0, 0, 60);
556 h_cl_hitmaxQ_charge_selected_L1_S1_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L1_S1_v",
"cl hitmaxQ charge (fC) in L1, S1, v view (only selected clusters)", 0, 0, 60);
557 h_cl_hitmaxQ_charge_selected_L1_S2_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L1_S2_v",
"cl hitmaxQ charge (fC) in L1, S2, v view (only selected clusters)", 0, 0, 60);
558 h_cl_hitmaxQ_charge_selected_L2_S1_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L2_S1_v",
"cl hitmaxQ charge (fC) in L2, S1, v view (only selected clusters)", 0, 0, 60);
559 h_cl_hitmaxQ_charge_selected_L2_S2_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L2_S2_v",
"cl hitmaxQ charge (fC) in L2, S2, v view (only selected clusters)", 0, 0, 60);
560 h_cl_hitmaxQ_charge_selected_L3_S1_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L3_S1_v",
"cl hitmaxQ charge (fC) in L3, S1, v view (only selected clusters)", 0, 0, 60);
561 h_cl_hitmaxQ_charge_selected_L3_S2_v =
new TH1F(
"h_cl_hitmaxQ_charge_selected_L3_S2_v",
"cl hitmaxQ charge (fC) in L3, S2, v view (only selected clusters)", 0, 0, 60);
656 float cl_q_max = 500;
657 float cl_nhit_max = 20;
659 cout <<
"define_track_histo" << endl;
661 TString dname =
"track_histo";
662 output-> mkdir(dname,
"histograms of fitted tracks");
669 h_track_chi2 =
new TH1F(
"h_track_chi2",
"fitted track chi2", 8000, 0, 8000);
672 h_track_xpoca =
new TH1F(
"h_track_xpoca",
"fitted track point of closest approach x (mm)", 100, -xy_max, xy_max);
673 h_track_ypoca =
new TH1F(
"h_track_ypoca",
"fitted track point of closest approach y (mm)", 100, -xy_max, xy_max);
674 h_track_zpoca =
new TH1F(
"h_track_zpoca",
"fitted track point of closest approach z (mm)", 100, -z_max, z_max);
678 h_test_residual_rphi =
new TH1F(
"h_test_residual_rphi",
"test plane: residual in R * phi (mm)", 100, -res_max, res_max);
679 h_test_res_rphi_vs_chi2 =
new TH2F(
"h_test_res_rphi_vs_chi2",
"test plane: residual in R * phi (mm) vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
682 h_test_residual_rphi_tpc =
new TH1F(
"h_test_residual_rphi_tpc",
"test plane: TPC residual in R * phi (mm)", 100, -res_max, res_max);
683 h_test_res_rphi_vs_chi2_tpc =
new TH2F(
"h_test_res_rphi_vs_chi2_tpc",
"test plane: TPC residual in R * phi (mm) vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
686 h_test_residual_z =
new TH1F(
"h_test_residual_z",
"test plane: residual in z (mm)", 100, -res_max, res_max);
687 h_test_res_z_vs_chi2 =
new TH2F(
"h_test_res_z_vs_chi2",
"test plane: residual in z (mm) vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
690 h_test_residual_z_tpc =
new TH1F(
"h_test_residual_z_tpc",
"test plane: TPC residual in z (mm)", 100, -res_max, res_max);
691 h_test_res_z_vs_chi2_tpc =
new TH2F(
"h_test_res_z_vs_chi2_tpc",
"test plane: TPC residual in z (mm) vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
695 h_residual_rphi_L1_S1 =
new TH1F(
"h_residual_rphi_L1_S1",
"residual in R * phi (mm) on L1, S1", 100, -res_max, res_max);
696 h_residual_rphi_L1_S2 =
new TH1F(
"h_residual_rphi_L1_S2",
"residual in R * phi (mm) on L1, S2", 100, -res_max, res_max);
697 h_residual_rphi_L2_S1 =
new TH1F(
"h_residual_rphi_L2_S1",
"residual in R * phi (mm) on L2, S1", 100, -res_max, res_max);
698 h_residual_rphi_L2_S2 =
new TH1F(
"h_residual_rphi_L2_S2",
"residual in R * phi (mm) on L2, S2", 100, -res_max, res_max);
699 h_residual_rphi_L3_S1 =
new TH1F(
"h_residual_rphi_L3_S1",
"residual in R * phi (mm) on L3, S1", 100, -res_max, res_max);
700 h_residual_rphi_L3_S2 =
new TH1F(
"h_residual_rphi_L3_S2",
"residual in R * phi (mm) on L3, S2", 100, -res_max, res_max);
702 h_res_rphi_vs_chi2_L1_S1 =
new TH2F(
"h_res_rphi_vs_chi2_L1_S1",
"residual in R * phi (mm) on L1, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
703 h_res_rphi_vs_chi2_L1_S2 =
new TH2F(
"h_res_rphi_vs_chi2_L1_S2",
"residual in R * phi (mm) on L1, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
704 h_res_rphi_vs_chi2_L2_S1 =
new TH2F(
"h_res_rphi_vs_chi2_L2_S1",
"residual in R * phi (mm) on L2, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
705 h_res_rphi_vs_chi2_L2_S2 =
new TH2F(
"h_res_rphi_vs_chi2_L2_S2",
"residual in R * phi (mm) on L2, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
706 h_res_rphi_vs_chi2_L3_S1 =
new TH2F(
"h_res_rphi_vs_chi2_L3_S1",
"residual in R * phi (mm) on L3, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
707 h_res_rphi_vs_chi2_L3_S2 =
new TH2F(
"h_res_rphi_vs_chi2_L3_S2",
"residual in R * phi (mm) on L3, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
710 h_residual_rphi_L1_S1_tpc =
new TH1F(
"h_residual_rphi_L1_S1_tpc",
"TPC residual in R * phi (mm) on L1, S1", 100, -res_max, res_max);
711 h_residual_rphi_L1_S2_tpc =
new TH1F(
"h_residual_rphi_L1_S2_tpc",
"TPC residual in R * phi (mm) on L1, S2", 100, -res_max, res_max);
712 h_residual_rphi_L2_S1_tpc =
new TH1F(
"h_residual_rphi_L2_S1_tpc",
"TPC residual in R * phi (mm) on L2, S1", 100, -res_max, res_max);
713 h_residual_rphi_L2_S2_tpc =
new TH1F(
"h_residual_rphi_L2_S2_tpc",
"TPC residual in R * phi (mm) on L2, S2", 100, -res_max, res_max);
714 h_residual_rphi_L3_S1_tpc =
new TH1F(
"h_residual_rphi_L3_S1_tpc",
"TPC residual in R * phi (mm) on L3, S1", 100, -res_max, res_max);
715 h_residual_rphi_L3_S2_tpc =
new TH1F(
"h_residual_rphi_L3_S2_tpc",
"TPC residual in R * phi (mm) on L3, S2", 100, -res_max, res_max);
717 h_res_rphi_vs_chi2_L1_S1_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L1_S1_tpc",
"TPC residual in R * phi (mm) on L1, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
718 h_res_rphi_vs_chi2_L1_S2_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L1_S2_tpc",
"TPC residual in R * phi (mm) on L1, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
719 h_res_rphi_vs_chi2_L2_S1_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L2_S1_tpc",
"TPC residual in R * phi (mm) on L2, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
720 h_res_rphi_vs_chi2_L2_S2_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L2_S2_tpc",
"TPC residual in R * phi (mm) on L2, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
721 h_res_rphi_vs_chi2_L3_S1_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L3_S1_tpc",
"TPC residual in R * phi (mm) on L3, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
722 h_res_rphi_vs_chi2_L3_S2_tpc =
new TH2F(
"h_res_rphi_vs_chi2_L3_S2_tpc",
"TPC residual in R * phi (mm) on L3, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
725 h_residual_z_L1_S1 =
new TH1F(
"h_residual_z_L1_S1",
"residual in z (mm) on L1, S1", 100, -res_max, res_max);
726 h_residual_z_L1_S2 =
new TH1F(
"h_residual_z_L1_S2",
"residual in z (mm) on L1, S2", 100, -res_max, res_max);
727 h_residual_z_L2_S1 =
new TH1F(
"h_residual_z_L2_S1",
"residual in z (mm) on L2, S1", 100, -res_max, res_max);
728 h_residual_z_L2_S2 =
new TH1F(
"h_residual_z_L2_S2",
"residual in z (mm) on L2, S2", 100, -res_max, res_max);
729 h_residual_z_L3_S1 =
new TH1F(
"h_residual_z_L3_S1",
"residual in z (mm) on L3, S1", 100, -res_max, res_max);
730 h_residual_z_L3_S2 =
new TH1F(
"h_residual_z_L3_S2",
"residual in z (mm) on L3, S2", 100, -res_max, res_max);
732 h_res_z_vs_chi2_L1_S1 =
new TH2F(
"h_res_z_vs_chi2_L1_S1",
"residual in z (mm) on L1, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
733 h_res_z_vs_chi2_L1_S2 =
new TH2F(
"h_res_z_vs_chi2_L1_S2",
"residual in z (mm) on L1, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
734 h_res_z_vs_chi2_L2_S1 =
new TH2F(
"h_res_z_vs_chi2_L2_S1",
"residual in z (mm) on L2, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
735 h_res_z_vs_chi2_L2_S2 =
new TH2F(
"h_res_z_vs_chi2_L2_S2",
"residual in z (mm) on L2, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
736 h_res_z_vs_chi2_L3_S1 =
new TH2F(
"h_res_z_vs_chi2_L3_S1",
"residual in z (mm) on L3, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
737 h_res_z_vs_chi2_L3_S2 =
new TH2F(
"h_res_z_vs_chi2_L3_S2",
"residual in z (mm) on L3, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
740 h_residual_z_L1_S1_tpc =
new TH1F(
"h_residual_z_L1_S1_tpc",
"TPC residual in z (mm) on L1, S1", 100, -res_max, res_max);
741 h_residual_z_L1_S2_tpc =
new TH1F(
"h_residual_z_L1_S2_tpc",
"TPC residual in z (mm) on L1, S2", 100, -res_max, res_max);
742 h_residual_z_L2_S1_tpc =
new TH1F(
"h_residual_z_L2_S1_tpc",
"TPC residual in z (mm) on L2, S1", 100, -res_max, res_max);
743 h_residual_z_L2_S2_tpc =
new TH1F(
"h_residual_z_L2_S2_tpc",
"TPC residual in z (mm) on L2, S2", 100, -res_max, res_max);
744 h_residual_z_L3_S1_tpc =
new TH1F(
"h_residual_z_L3_S1_tpc",
"TPC residual in z (mm) on L3, S1", 100, -res_max, res_max);
745 h_residual_z_L3_S2_tpc =
new TH1F(
"h_residual_z_L3_S2_tpc",
"TPC residual in z (mm) on L3, S2", 100, -res_max, res_max);
747 h_res_z_vs_chi2_L1_S1_tpc =
new TH2F(
"h_res_z_vs_chi2_L1_S1_tpc",
"TPC residual in z (mm) on L1, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
748 h_res_z_vs_chi2_L1_S2_tpc =
new TH2F(
"h_res_z_vs_chi2_L1_S2_tpc",
"TPC residual in z (mm) on L1, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
749 h_res_z_vs_chi2_L2_S1_tpc =
new TH2F(
"h_res_z_vs_chi2_L2_S1_tpc",
"TPC residual in z (mm) on L2, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
750 h_res_z_vs_chi2_L2_S2_tpc =
new TH2F(
"h_res_z_vs_chi2_L2_S2_tpc",
"TPC residual in z (mm) on L2, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
751 h_res_z_vs_chi2_L3_S1_tpc =
new TH2F(
"h_res_z_vs_chi2_L3_S1_tpc",
"TPC residual in z (mm) on L3, S1 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
752 h_res_z_vs_chi2_L3_S2_tpc =
new TH2F(
"h_res_z_vs_chi2_L3_S2_tpc",
"TPC residual in z (mm) on L3, S2 vs chi2", 100, -res_max, res_max, 1000, 0, 1000);
755 h_signal_charge_2d =
new TH1F(
"h_signal_charge_2d",
"total charge of the signal (fC)", cl_q_max, 0, cl_q_max);
756 h_signal_charge_1d_x =
new TH1F(
"h_signal_charge_1d_x",
"charge x of the signal (fC)", cl_q_max, 0, cl_q_max);
757 h_signal_charge_1d_v =
new TH1F(
"h_signal_charge_1d_v",
"charge v of the signal (fC)", cl_q_max, 0, cl_q_max);
758 h_signal_size_1d_x =
new TH1F(
"h_signal_size_1d_x",
"cl.size x of the signal", cl_nhit_max, 0, cl_nhit_max);
759 h_signal_size_1d_v =
new TH1F(
"h_signal_size_1d_v",
"cl.size v of the signal", cl_nhit_max, 0, cl_nhit_max);
761 h_signal_charge_2d_chi2cut =
new TH1F(
"h_signal_charge_2d_chi2cut",
"total charge of the signal (fC) with a chi2 cut", cl_q_max, 0, cl_q_max);
762 h_signal_charge_1d_x_chi2cut =
new TH1F(
"h_signal_charge_1d_x_chi2cut",
"charge x of the signal (fC) with a chi2 cut", cl_q_max, 0, cl_q_max);
763 h_signal_charge_1d_v_chi2cut =
new TH1F(
"h_signal_charge_1d_v_chi2cut",
"charge v of the signal (fC) with a chi2 cut", cl_q_max, 0, cl_q_max);
764 h_signal_size_1d_x_chi2cut =
new TH1F(
"h_signal_size_1d_x_chi2cut",
"cl.size x of the signal with a chi2 cut", cl_nhit_max, 0, cl_nhit_max);
765 h_signal_size_1d_v_chi2cut =
new TH1F(
"h_signal_size_1d_v_chi2cut",
"cl.size v of the signal with a chi2 cut", cl_nhit_max, 0, cl_nhit_max);
768 h_background_charge_2d =
new TH1F(
"h_background_charge_2d",
"total charge of the background (fC)", cl_q_max, 0, cl_q_max);
769 h_background_charge_1d_x =
new TH1F(
"h_background_charge_1d_x",
"charge x of the background (fC)", cl_q_max, 0, cl_q_max);
770 h_background_charge_1d_v =
new TH1F(
"h_background_charge_1d_v",
"charge v of the background (fC)", cl_q_max, 0, cl_q_max);
771 h_background_size_1d_x =
new TH1F(
"h_background_size_1d_x",
"cl.size x of the background", cl_nhit_max, 0, cl_nhit_max);
772 h_background_size_1d_v =
new TH1F(
"h_background_size_1d_v",
"cl.size v of the background", cl_nhit_max, 0, cl_nhit_max);
777 h_track_selection_vs_phi =
new TH1F(
"h_track_selection_vs_phi",
"Number of track selected vs phi (deg)",
MAX_PHI_BIN,
MIN_PHI,
MAX_PHI);
780 h_eff_vs_z =
new TH1F(
"h_eff_vs_z",
"Track efficiency vs z (mm)",
MAX_Z_BIN,
MIN_Z,
MAX_Z);
782 h_track_selection_vs_z =
new TH1F(
"h_track_selection_vs_z",
"Number of track selected vs z (mm)",
MAX_Z_BIN,
MIN_Z,
MAX_Z);
792 h_eff_vs_v_1d =
new TH1F(
"h_eff_vs_v_1d",
"Track efficiency 1D vs v",
MAX_V_BIN,
MIN_V,
MAX_V);
795 h_eff_vs_FEB =
new TH1F(
"h_eff_vs_FEB",
"Track efeficiency 2x1D vs FEB",80,0,80);
798 h_resolution_rphi_vs_chi2 =
new TH1F(
"h_resolution_rphi_vs_chi2" ,
"test plane: cc resolution in R * phi (mm) vs chi2" ,
CHI_BIN,
CHI_MIN,
CHI_MAX);
799 h_resolution_rphi_tpc_vs_chi2 =
new TH1F(
"h_resolution_rphi_tpc_vs_chi2",
"test plane: tpc resolution in R * phi (mm) vs chi2",
CHI_BIN,
CHI_MIN,
CHI_MAX);
801 h_resolution_z_vs_chi2 =
new TH1F(
"h_resolution_z_vs_chi2" ,
"test plane: cc resolution in z (mm) vs chi2" ,
CHI_BIN,
CHI_MIN,
CHI_MAX);
802 h_resolution_z_tpc_vs_chi2 =
new TH1F(
"h_resolution_z_tpc_vs_chi2",
"test plane: tpc resolution in z (mm) vs chi2",
CHI_BIN,
CHI_MIN,
CHI_MAX);
807 h_test_residual_rphi_vs_angxy_L1_cc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L1_cc" ,
"test plane: CC residual in R * phi (mm) vs ang_{xy}_{L1}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
808 h_test_residual_rphi_vs_angxy_L1_tpc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L1_tpc",
"test plane: TPC residual in R * phi (mm) vs ang_{xy}_{L1}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
811 h_test_residual_rphi_vs_angxy_L2_cc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L2_cc" ,
"test plane: CC residual in R * phi (mm) vs ang_{xy}_{L2}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
812 h_test_residual_rphi_vs_angxy_L2_tpc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L2_tpc",
"test plane: TPC residual in R * phi (mm) vs ang_{xy}_{L2}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
815 h_test_residual_rphi_vs_angxy_L3_cc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L3_cc" ,
"test plane: CC residual in R * phi (mm) vs ang_{xy}_{L3}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
816 h_test_residual_rphi_vs_angxy_L3_tpc =
new TH2F(
"h_test_residual_rphi_vs_angxy_L3_tpc",
"test plane: TPC residual in R * phi (mm) vs ang_{xy}_{L3}", 100, -5, 5,
ANG_BIN,
ANG_MIN,
ANG_MAX);
819 h_resolution_vs_ang_xy_L1 =
new TH1F(
"h_resolution_vs_ang_xy_L1",
"cc resolution in R * phi (mm) vs L1 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
820 h_resolution_vs_ang_xy_L2 =
new TH1F(
"h_resolution_vs_ang_xy_L2",
"cc resolution in R * phi (mm) vs L2 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
821 h_resolution_vs_ang_xy_L3 =
new TH1F(
"h_resolution_vs_ang_xy_L3",
"cc resolution in R * phi (mm) vs L3 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
824 h_resolution_tpc_vs_ang_xy_L1 =
new TH1F(
"h_resolution_tpc_vs_ang_xy_L1",
"tpc resolution in R * phi (mm) vs L1 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
825 h_resolution_tpc_vs_ang_xy_L2 =
new TH1F(
"h_resolution_tpc_vs_ang_xy_L2",
"tpc resolution in R * phi (mm) vs L2 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
826 h_resolution_tpc_vs_ang_xy_L3 =
new TH1F(
"h_resolution_tpc_vs_ang_xy_L3",
"tpc resolution in R * phi (mm) vs L3 ang_{xy}",
ANG_BIN,
ANG_MIN,
ANG_MAX);
832 float u_minXY = -xy_max;
833 float u_maxXY = xy_max;
834 float u_minZ = -z_max;
835 float u_maxZ = z_max;
836 h_map_xy_event_trk =
new TH2F(
"h_map_xy_event_trk" ,
"event map xy" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
837 h_map_xz_event_trk =
new TH2F(
"h_map_xz_event_trk" ,
"event map xz" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
838 h_map_xy_2d =
new TH2F(
"h_map_xy_2d" ,
"event map xy cluster 2d",u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
839 h_map_xz_2d =
new TH2F(
"h_map_xz_2d" ,
"event map xz cluster 2d",u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
840 h_map_xy_1d_tpc =
new TH2F(
"h_map_xy_1d_tpc" ,
"event map xy cluster 1d",u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
841 h_map_xz_1d_tpc =
new TH2F(
"h_map_xz_1d_tpc" ,
"event map xz cluster 1d",u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
842 h_map_xy_tpc_eff =
new TH2F(
"h_map_xy_tpc_eff" ,
"eff map xy tpc" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
843 h_map_xz_tpc_eff =
new TH2F(
"h_map_xz_tpc_eff" ,
"eff map xz tpc" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
844 h_map_xy_tpc_fail =
new TH2F(
"h_map_xy_tpc_fail" ,
"fail map xy tpc" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
845 h_map_xz_tpc_fail =
new TH2F(
"h_map_xz_tpc_fail" ,
"fail map xz tpc" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
846 h_map_xy_cc_eff =
new TH2F(
"h_map_xy_cc_eff" ,
"eff map xy cc" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
847 h_map_xz_cc_eff =
new TH2F(
"h_map_xz_cc_eff" ,
"eff map xz cc" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
848 h_map_xy_cc_tpc_diff =
new TH2F(
"h_map_xy_cc_tpc_diff" ,
"diff cc tpc map xy" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
849 h_map_xz_cc_tpc_diff =
new TH2F(
"h_map_xz_cc_tpc_diff" ,
"diff cc tpc map xz" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
850 h_map_xy_cc_tpc_diff2=
new TH2F(
"h_map_xy_cc_tpc_diff2",
"diff cc tpc map xy" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
851 h_map_xz_cc_tpc_diff2=
new TH2F(
"h_map_xz_cc_tpc_diff2",
"diff cc tpc map xz" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
852 h_map_xy_q2d =
new TH2F(
"h_map_xy_q2d" ,
"charge cluster 2D xy" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
853 h_map_xz_q2d =
new TH2F(
"h_map_xz_q2d" ,
"charge cluster 2D xz" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
854 h_map_xy_dT =
new TH2F(
"h_map_xy_dT" ,
"delta Time hits xy" ,u_NbinX,u_minXY,u_maxXY,u_NbinY,u_minXY,u_maxXY);
855 h_map_xz_dT =
new TH2F(
"h_map_xz_dT" ,
"delta Time hits xz" ,u_NbinX,u_minXY,u_maxXY,u_NbinZ,u_minZ,u_maxZ);
856 h_ang_trk_meas =
new TH2F(
"h_ang_trk_meas" ,
"h_ang_trk_meas" ,180 ,-90 ,90 ,180 ,-90 ,90 );
857 h_ang_diff_vs_trk =
new TH2F(
"h_ang_diff_vs_trk" ,
"h_ang_diff_vs_trk" ,180 ,-90 ,90 ,180 ,-90 ,90 );
858 h_ang_diff =
new TH1F(
"h_ang_diff" ,
"h_ang_diff" ,180 ,-90 ,90);
859 h_ang_tpc =
new TH1F(
"h_ang_tpc" ,
"h_ang_tp" ,720 ,-360 ,360);
863 for(
int j=0;j<i;j++){
864 h_deltaX_order_size[j][i] =
new TH1F(Form(
"deltaX_%i%i",j,i),Form(
"deltaX strip %i and size %i",j,i),100,-0.05,0.05);
865 h_deltaZ_order_size[j][i] =
new TH1F(Form(
"deltaZ_%i%i",j,i),Form(
"deltaZ strip %i and size %i",j,i),100,-0.1,0.1);
867 f_deltaX[i] =
new TF1(Form(
"f_deltaX_size_%i",i),
"pol1");
868 f_deltaZ[i] =
new TF1(Form(
"f_deltaZ_size_%i",i),
"pol1");
1169 int nhit_L1_S1_x = 0;
int nhit_L1_S2_x = 0;
int nhit_L2_S1_x = 0;
int nhit_L2_S2_x = 0;
int nhit_L3_S1_x = 0;
int nhit_L3_S2_x = 0;
1170 int nhit_L1_S1_v = 0;
int nhit_L2_S1_v = 0;
int nhit_L2_S2_v = 0;
int nhit_L3_S1_v = 0;
int nhit_L3_S2_v = 0;
1171 for(
int ihit = 0; ihit < nhit; ihit++) {
1174 if(hit_layer[ihit] == 0) {
1176 if(hit_view[ihit] == 0) {
1179 if(hit_sheet[ihit] == 0) {
1180 h_hit_charge_L1_S1_x->Fill(hit_q[ihit]);
1181 h_hit_time_L1_S1_x->Fill(hit_t[ihit]);
1182 h_hit_charge_vs_strip_L1_S1_x->Fill(hit_strip[ihit], hit_q[ihit]);
1183 h_hit_time_vs_strip_L1_S1_x->Fill(hit_strip[ihit], hit_t[ihit]);
1184 h_hit_charge_vs_time_L1_S1_x->Fill(hit_t[ihit], hit_q[ihit]);
1188 h_hit_charge_L1_S2_x->Fill(hit_q[ihit]);
1189 h_hit_time_L1_S2_x->Fill(hit_t[ihit]);
1190 h_hit_charge_vs_strip_L1_S2_x->Fill(hit_strip[ihit], hit_q[ihit]);
1191 h_hit_time_vs_strip_L1_S2_x->Fill(hit_strip[ihit], hit_t[ihit]);
1192 h_hit_charge_vs_time_L1_S2_x->Fill(hit_t[ihit], hit_q[ihit]);
1199 h_hit_charge_L1_S1_v->Fill(hit_q[ihit]);
1200 h_hit_time_L1_S1_v->Fill(hit_t[ihit]);
1201 h_hit_charge_vs_strip_L1_S1_v->Fill(hit_strip[ihit], hit_q[ihit]);
1202 h_hit_time_vs_strip_L1_S1_v->Fill(hit_strip[ihit], hit_t[ihit]);
1203 h_hit_charge_vs_time_L1_S1_v->Fill(hit_t[ihit], hit_q[ihit]);
1204 h_hit_charge_vs_length_L1_S1_v->Fill(hit_length[ihit], hit_q[ihit]);
1208 else if(hit_layer[ihit] == 1) {
1210 if(hit_view[ihit] == 0) {
1213 if(hit_sheet[ihit] == 0) {
1214 h_hit_charge_L2_S1_x->Fill(hit_q[ihit]);
1215 h_hit_time_L2_S1_x->Fill(hit_t[ihit]);
1216 h_hit_charge_vs_strip_L2_S1_x->Fill(hit_strip[ihit], hit_q[ihit]);
1217 h_hit_time_vs_strip_L2_S1_x->Fill(hit_strip[ihit], hit_t[ihit]);
1218 h_hit_charge_vs_time_L2_S1_x->Fill(hit_t[ihit], hit_q[ihit]);
1222 h_hit_charge_L2_S2_x->Fill(hit_q[ihit]);
1223 h_hit_time_L2_S2_x->Fill(hit_t[ihit]);
1224 h_hit_charge_vs_strip_L2_S2_x->Fill(hit_strip[ihit], hit_q[ihit]);
1225 h_hit_time_vs_strip_L2_S2_x->Fill(hit_strip[ihit], hit_t[ihit]);
1226 h_hit_charge_vs_time_L2_S2_x->Fill(hit_t[ihit], hit_q[ihit]);
1233 if(hit_sheet[ihit] == 0) {
1234 h_hit_charge_L2_S1_v->Fill(hit_q[ihit]);
1235 h_hit_time_L2_S1_v->Fill(hit_t[ihit]);
1236 h_hit_charge_vs_strip_L2_S1_v->Fill(hit_strip[ihit], hit_q[ihit]);
1237 h_hit_time_vs_strip_L2_S1_v->Fill(hit_strip[ihit], hit_t[ihit]);
1238 h_hit_charge_vs_time_L2_S1_v->Fill(hit_t[ihit], hit_q[ihit]);
1239 h_hit_charge_vs_length_L2_S1_v->Fill(hit_length[ihit], hit_q[ihit]);
1243 h_hit_charge_L2_S2_v->Fill(hit_q[ihit]);
1244 h_hit_time_L2_S2_v->Fill(hit_t[ihit]);
1245 h_hit_charge_vs_strip_L2_S2_v->Fill(hit_strip[ihit], hit_q[ihit]);
1246 h_hit_time_vs_strip_L2_S2_v->Fill(hit_strip[ihit], hit_t[ihit]);
1247 h_hit_charge_vs_time_L2_S2_v->Fill(hit_t[ihit], hit_q[ihit]);
1248 h_hit_charge_vs_length_L2_S2_v->Fill(hit_length[ihit], hit_q[ihit]);
1253 else if(hit_layer[ihit] == 2) {
1254 if(hit_view[ihit] == 0) {
1257 if(hit_sheet[ihit] == 0) {
1258 h_hit_charge_L3_S1_x->Fill(hit_q[ihit]);
1259 h_hit_time_L3_S1_x->Fill(hit_t[ihit]);
1260 h_hit_charge_vs_strip_L3_S1_x->Fill(hit_strip[ihit], hit_q[ihit]);
1261 h_hit_time_vs_strip_L3_S1_x->Fill(hit_strip[ihit], hit_t[ihit]);
1262 h_hit_charge_vs_time_L3_S1_x->Fill(hit_t[ihit], hit_q[ihit]);
1266 h_hit_charge_L3_S2_x->Fill(hit_q[ihit]);
1267 h_hit_time_L3_S2_x->Fill(hit_t[ihit]);
1268 h_hit_charge_vs_strip_L3_S2_x->Fill(hit_strip[ihit], hit_q[ihit]);
1269 h_hit_time_vs_strip_L3_S2_x->Fill(hit_strip[ihit], hit_t[ihit]);
1270 h_hit_charge_vs_time_L3_S2_x->Fill(hit_t[ihit], hit_q[ihit]);
1277 if(hit_sheet[ihit] == 0) {
1278 h_hit_charge_L3_S1_v->Fill(hit_q[ihit]);
1279 h_hit_time_L3_S1_v->Fill(hit_t[ihit]);
1280 h_hit_charge_vs_strip_L3_S1_v->Fill(hit_strip[ihit], hit_q[ihit]);
1281 h_hit_time_vs_strip_L3_S1_v->Fill(hit_strip[ihit], hit_t[ihit]);
1282 h_hit_charge_vs_time_L3_S1_v->Fill(hit_t[ihit], hit_q[ihit]);
1283 h_hit_charge_vs_length_L3_S1_v->Fill(hit_length[ihit], hit_q[ihit]);
1287 h_hit_charge_L3_S2_v->Fill(hit_q[ihit]);
1288 h_hit_time_L3_S2_v->Fill(hit_t[ihit]);
1289 h_hit_charge_vs_strip_L3_S2_v->Fill(hit_strip[ihit], hit_q[ihit]);
1290 h_hit_time_vs_strip_L3_S2_v->Fill(hit_strip[ihit], hit_t[ihit]);
1291 h_hit_charge_vs_time_L3_S2_v->Fill(hit_t[ihit], hit_q[ihit]);
1292 h_hit_charge_vs_length_L3_S2_v->Fill(hit_length[ihit], hit_q[ihit]);
1299 h_nofhit_L1_S1_x->Fill(nhit_L1_S1_x);
1300 h_nofhit_L1_S2_x->Fill(nhit_L1_S2_x);
1301 h_nofhit_L2_S1_x->Fill(nhit_L2_S1_x);
1302 h_nofhit_L2_S2_x->Fill(nhit_L2_S2_x);
1303 h_nofhit_L3_S1_x->Fill(nhit_L3_S1_x);
1304 h_nofhit_L3_S2_x->Fill(nhit_L3_S2_x);
1305 h_nofhit_L1_S1_v->Fill(nhit_L1_S1_v);
1306 h_nofhit_L2_S1_v->Fill(nhit_L2_S1_v);
1307 h_nofhit_L2_S2_v->Fill(nhit_L2_S2_v);
1308 h_nofhit_L3_S1_v->Fill(nhit_L3_S1_v);
1309 h_nofhit_L3_S2_v->Fill(nhit_L3_S2_v);
1522 double tmp_charge_L1bot = 0;
1523 double tmp_charge_L1top = 0;
1524 double tmp_charge_L2bot = 0;
1525 double tmp_charge_L2top = 0;
1526 double tmp_charge_L3bot = 0;
1527 double tmp_charge_L3top = 0;
1529 int tmp_cluster_L1bot = -1;
1530 int tmp_cluster_L1top = -1;
1531 int tmp_cluster_L2bot = -1;
1532 int tmp_cluster_L2top = -1;
1533 int tmp_cluster_L3bot = -1;
1534 int tmp_cluster_L3top = -1;
1537 for(
int iclu = 0; iclu < ncluster; iclu++) {
1539 if(cluster_2d_view[iclu] == -1)
continue;
1540 if(cluster_2d_view[iclu] != 2) cout <<
"ERROR in fill_cluster2d_histo " << cluster_2d_view[iclu] << endl;
1542 if(cluster_2d_layerid[iclu] == 0) {
1544 if(cluster_2d_phi[iclu] < 0) {
1545 if(cluster_2d_q[iclu] > tmp_charge_L1bot) {
1546 tmp_charge_L1bot = cluster_2d_q[iclu];
1547 tmp_cluster_L1bot = iclu;
1551 if(cluster_2d_q[iclu] > tmp_charge_L1top) {
1552 tmp_charge_L1top = cluster_2d_q[iclu];
1553 tmp_cluster_L1top = iclu;
1557 else if(cluster_2d_layerid[iclu] == 1) {
1559 if(cluster_2d_sheetid[iclu] == 0) {
1560 if(cluster_2d_q[iclu] > tmp_charge_L2bot) {
1561 tmp_charge_L2bot = cluster_2d_q[iclu];
1562 tmp_cluster_L2bot = iclu;
1566 if(cluster_2d_q[iclu] > tmp_charge_L2top) {
1567 tmp_charge_L2top = cluster_2d_q[iclu];
1568 tmp_cluster_L2top = iclu;
1572 else if(cluster_2d_layerid[iclu] == 2) {
1573 if(cluster_2d_sheetid[iclu] == 0) {
1574 if(cluster_2d_q[iclu] > tmp_charge_L3bot) {
1575 tmp_charge_L3bot = cluster_2d_q[iclu];
1576 tmp_cluster_L3bot = iclu;
1580 if(cluster_2d_q[iclu] > tmp_charge_L3top) {
1581 tmp_charge_L3top = cluster_2d_q[iclu];
1582 tmp_cluster_L3top = iclu;
1589 if(tmp_cluster_L1bot == -1 || tmp_cluster_L1top == -1 || tmp_cluster_L2bot == -1 || tmp_cluster_L2top == -1 || tmp_cluster_L3bot == -1 || tmp_cluster_L3top == -1 )
return;
1592 if(cluster_2d_idv[tmp_cluster_L1bot] == cluster_2d_idv[tmp_cluster_L1top])
return;
1595 if(cluster_1d_q[cluster_2d_idx[tmp_cluster_L1bot]] < cut_ene_L1_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L1bot]] < cut_ene_L1_v ||
1596 cluster_1d_q[cluster_2d_idx[tmp_cluster_L1top]] < cut_ene_L1_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L1top]] < cut_ene_L1_v ||
1597 cluster_1d_q[cluster_2d_idx[tmp_cluster_L2bot]] < cut_ene_L2_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L2bot]] < cut_ene_L2_v ||
1598 cluster_1d_q[cluster_2d_idx[tmp_cluster_L2top]] < cut_ene_L2_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L2top]] < cut_ene_L2_v ||
1599 cluster_1d_q[cluster_2d_idx[tmp_cluster_L3bot]] < cut_ene_L3_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L3bot]] < cut_ene_L3_v ||
1600 cluster_1d_q[cluster_2d_idx[tmp_cluster_L3top]] < cut_ene_L3_x || cluster_1d_q[cluster_2d_idv[tmp_cluster_L3top]] < cut_ene_L3_v)
return;
1603 if(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1bot]] <= cut_size_L1_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L1bot]] <= cut_size_L1_v ||
1604 cluster_1d_size[cluster_2d_idx[tmp_cluster_L1top]] <= cut_size_L1_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L1top]] <= cut_size_L1_v ||
1605 cluster_1d_size[cluster_2d_idx[tmp_cluster_L2bot]] <= cut_size_L2_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L2bot]] <= cut_size_L2_v ||
1606 cluster_1d_size[cluster_2d_idx[tmp_cluster_L2top]] <= cut_size_L2_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L2top]] <= cut_size_L2_v ||
1607 cluster_1d_size[cluster_2d_idx[tmp_cluster_L3bot]] <= cut_size_L3_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L3bot]] <= cut_size_L2_v ||
1608 cluster_1d_size[cluster_2d_idx[tmp_cluster_L3top]] <= cut_size_L3_x || cluster_1d_size[cluster_2d_idv[tmp_cluster_L3top]] <= cut_size_L2_v )
return;
1611 h_cluster2d_charge_selected_L1_S1->Fill(tmp_charge_L1bot);
1612 h_cluster2d_charge_selected_L1_S2->Fill(tmp_charge_L1top);
1613 h_cluster2d_charge_selected_L2_S1->Fill(tmp_charge_L2bot);
1614 h_cluster2d_charge_selected_L2_S2->Fill(tmp_charge_L2top);
1615 h_cluster2d_charge_selected_L3_S1->Fill(tmp_charge_L3bot);
1616 h_cluster2d_charge_selected_L3_S2->Fill(tmp_charge_L3top);
1619 h_cluster1d_charge_selected_L1_S1_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L1bot]]);
1620 h_cluster1d_charge_selected_L1_S2_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L1top]]);
1621 h_cluster1d_charge_selected_L2_S1_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L2bot]]);
1622 h_cluster1d_charge_selected_L2_S2_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L2top]]);
1623 h_cluster1d_charge_selected_L3_S1_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L3bot]]);
1624 h_cluster1d_charge_selected_L3_S2_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L3top]]);
1627 h_cluster1d_charge_selected_L1_S1_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L1bot]]);
1628 h_cluster1d_charge_selected_L1_S2_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L1top]]);
1629 h_cluster1d_charge_selected_L2_S1_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L2bot]]);
1630 h_cluster1d_charge_selected_L2_S2_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L2top]]);
1631 h_cluster1d_charge_selected_L3_S1_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L3bot]]);
1632 h_cluster1d_charge_selected_L3_S2_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L3top]]);
1635 h_cluster1d_size_selected_L1_S1_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1bot]]);
1636 h_cluster1d_size_selected_L1_S2_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1top]]);
1637 h_cluster1d_size_selected_L2_S1_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L2bot]]);
1638 h_cluster1d_size_selected_L2_S2_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L2top]]);
1639 h_cluster1d_size_selected_L3_S1_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L3bot]]);
1640 h_cluster1d_size_selected_L3_S2_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L3top]]);
1643 h_cluster1d_size_selected_L1_S1_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L1bot]]);
1644 h_cluster1d_size_selected_L1_S2_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L1top]]);
1645 h_cluster1d_size_selected_L2_S1_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L2bot]]);
1646 h_cluster1d_size_selected_L2_S2_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L2top]]);
1647 h_cluster1d_size_selected_L3_S1_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L3bot]]);
1648 h_cluster1d_size_selected_L3_S2_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L3top]]);
1652 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L1bot]];i++){
1653 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L1bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L1bot]][i]];
1655 h_cl_hitmaxQ_charge_selected_L1_S1_v->Fill(qmax);
1657 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L1top]];i++){
1658 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L1top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L1top]][i]];
1660 h_cl_hitmaxQ_charge_selected_L1_S2_v->Fill(qmax);
1662 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L2bot]];i++){
1663 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L2bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L2bot]][i]];
1665 h_cl_hitmaxQ_charge_selected_L2_S1_v->Fill(qmax);
1667 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L2top]];i++){
1668 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L2top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L2top]][i]];
1670 h_cl_hitmaxQ_charge_selected_L2_S2_v->Fill(qmax);
1672 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L3bot]];i++){
1673 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L3bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L3bot]][i]];
1675 h_cl_hitmaxQ_charge_selected_L3_S1_v->Fill(qmax);
1677 for(
int i=0;i<cluster_1d_size[cluster_2d_idv[tmp_cluster_L3top]];i++){
1678 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L3top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idv[tmp_cluster_L3top]][i]];
1680 h_cl_hitmaxQ_charge_selected_L3_S2_v->Fill(qmax);
1682 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L1bot]];i++){
1683 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L1bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L1bot]][i]];
1685 h_cl_hitmaxQ_charge_selected_L1_S1_x->Fill(qmax);
1687 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L1top]];i++){
1688 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L1top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L1top]][i]];
1690 h_cl_hitmaxQ_charge_selected_L1_S2_x->Fill(qmax);
1692 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L2bot]];i++){
1693 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L2bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L2bot]][i]];
1695 h_cl_hitmaxQ_charge_selected_L2_S1_x->Fill(qmax);
1697 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L2top]];i++){
1698 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L2top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L2top]][i]];
1700 h_cl_hitmaxQ_charge_selected_L2_S2_x->Fill(qmax);
1702 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L3bot]];i++){
1703 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L3bot]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L3bot]][i]];
1705 h_cl_hitmaxQ_charge_selected_L3_S1_x->Fill(qmax);
1707 for(
int i=0;i<cluster_1d_size[cluster_2d_idx[tmp_cluster_L3top]];i++){
1708 if(qmax<hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L3top]][i]]) qmax=hit_q[cluster_1d_hitindex[cluster_2d_idx[tmp_cluster_L3top]][i]];
1710 h_cl_hitmaxQ_charge_selected_L3_S2_x->Fill(qmax);
1794 if(track_chi2 == 9999)
return;
1796 h_track_chi2->Fill(track_chi2);
1798 if(isgood ==
false)
return;
1800 h_track_xpoca->Fill(track_xpoca_glo);
1801 h_track_ypoca->Fill(track_ypoca_glo);
1802 h_track_zpoca->Fill(track_zpoca_glo);
1804 for(
int iclu = 0; iclu < track_nfitpoint; iclu++) {
1805 int ilay = track_layerid[iclu];
1806 int ishe = track_sheetid[iclu];
1807 int cluster2d_id = track_clusterid[iclu];
1808 int idx = cluster_2d_idx[cluster2d_id];
1809 int idv = cluster_2d_idv[cluster2d_id];
1820 if(ilay==0 && ishe==0) {
1821 h_cluster1d_charge_fitted_L1_S1_x->Fill(cluster_1d_q[idx]);
1822 h_cluster1d_charge_fitted_L1_S1_v->Fill(cluster_1d_q[idv]);
1824 else if(ilay==0 && ishe==1) {
1825 h_cluster1d_charge_fitted_L1_S2_x->Fill(cluster_1d_q[idx]);
1826 h_cluster1d_charge_fitted_L1_S2_v->Fill(cluster_1d_q[idv]);
1828 else if(ilay==1 && ishe==0) {
1829 h_cluster1d_charge_fitted_L2_S1_x->Fill(cluster_1d_q[idx]);
1830 h_cluster1d_charge_fitted_L2_S1_v->Fill(cluster_1d_q[idv]);
1832 else if(ilay==1 && ishe==1) {
1833 h_cluster1d_charge_fitted_L2_S2_x->Fill(cluster_1d_q[idx]);
1834 h_cluster1d_charge_fitted_L2_S2_v->Fill(cluster_1d_q[idv]);
1836 else if(ilay==2 && ishe==0) {
1837 h_cluster1d_charge_fitted_L3_S1_x->Fill(cluster_1d_q[idx]);
1838 h_cluster1d_charge_fitted_L3_S1_v->Fill(cluster_1d_q[idv]);
1840 else if(ilay==2 && ishe==1) {
1841 h_cluster1d_charge_fitted_L3_S2_x->Fill(cluster_1d_q[idx]);
1842 h_cluster1d_charge_fitted_L3_S2_v->Fill(cluster_1d_q[idv]);
1851 fit_phi[0][0] = track_phi1bot_loc;
1852 fit_phi[0][1] = track_phi1top_loc;
1853 fit_phi[1][0] = track_phi2bot_loc;
1854 fit_phi[1][1] = track_phi2top_loc;
1855 fit_phi[2][0] = track_phi3bot_loc;
1856 fit_phi[2][1] = track_phi3top_loc;
1860 if(align_flag==
true) {
1862 HepPoint3D fit_L1_S1_glo(track_x1bot_glo, track_y1bot_glo, track_z1bot_glo);
1864 HepPoint3D fit_L1_S2_glo(track_x1top_glo, track_y1top_glo, track_z1top_glo);
1867 HepPoint3D fit_L2_S1_glo(track_x2bot_glo, track_y2bot_glo, track_z2bot_glo);
1869 HepPoint3D fit_L2_S2_glo(track_x2top_glo, track_y2top_glo, track_z2top_glo);
1872 HepPoint3D fit_L3_S1_glo(track_x3bot_glo, track_y2bot_glo, track_z3bot_glo);
1874 HepPoint3D fit_L3_S2_glo(track_x3top_glo, track_y2top_glo, track_z3top_glo);
1878 fit_z[0][0] = fit_L1_S1_loc.z();
1879 fit_z[0][1] = fit_L1_S2_loc.z();
1880 fit_z[1][0] = fit_L2_S1_loc.z();
1881 fit_z[1][1] = fit_L2_S2_loc.z();
1882 fit_z[2][0] = fit_L3_S1_loc.z();
1883 fit_z[2][1] = fit_L3_S2_loc.z();
1888 fit_z[0][0] = track_z1bot_glo;
1889 fit_z[0][1] = track_z1top_glo;
1890 fit_z[1][0] = track_z2bot_glo;
1891 fit_z[1][1] = track_z2top_glo;
1892 fit_z[2][0] = track_z3bot_glo;
1893 fit_z[2][1] = track_z3top_glo;
1905 bool stop_here=
false;
1907 for(
int iclu = 0; iclu < track_nfitpoint; iclu++) {
1908 int exp_lay = track_layerid[iclu];
1909 int exp_she = track_sheetid[iclu];
1922 exp_phi[exp_lay][exp_she] = cluster_2d_phi[track_clusterid[iclu]];
1923 exp_z[exp_lay][exp_she] = cluster_2d_z[track_clusterid[iclu]];
1925 exp_phi_tpc[exp_lay][exp_she] = cluster_2d_phi_tpc[track_clusterid[iclu]];
1926 exp_z_tpc[exp_lay][exp_she] = cluster_2d_z_tpc[track_clusterid[iclu]];
1933 double residual_rphi = anode_mid_gap_radius[ilay] * (exp_phi[ilay][ishe] - fit_phi[ilay][ishe]);
1934 double residual_z = exp_z[ilay][ishe] - fit_z[ilay][ishe];
1936 double residual_rphi_tpc = anode_mid_gap_radius[ilay] * (exp_phi_tpc[ilay][ishe] - fit_phi[ilay][ishe]);
1937 double residual_z_tpc = exp_z_tpc[ilay][ishe] - fit_z[ilay][ishe];
1952 if(ilay==0 && ishe==0) {
1953 h_residual_rphi_L1_S1->Fill(residual_rphi);
1954 h_residual_z_L1_S1->Fill(residual_z);
1956 h_res_rphi_vs_chi2_L1_S1->Fill(residual_rphi, track_chi2);
1957 h_res_z_vs_chi2_L1_S1->Fill(residual_z, track_chi2);
1959 h_residual_rphi_L1_S1_tpc->Fill(residual_rphi_tpc);
1960 h_residual_z_L1_S1_tpc->Fill(residual_z_tpc);
1962 h_res_rphi_vs_chi2_L1_S1_tpc->Fill(residual_rphi_tpc, track_chi2);
1963 h_res_z_vs_chi2_L1_S1_tpc->Fill(residual_z_tpc, track_chi2);
1965 else if(ilay==0 && ishe==1) {
1966 h_residual_rphi_L1_S2->Fill(residual_rphi);
1967 h_residual_z_L1_S2->Fill(residual_z);
1969 h_res_rphi_vs_chi2_L1_S2->Fill(residual_rphi, track_chi2);
1970 h_res_z_vs_chi2_L1_S2->Fill(residual_z, track_chi2);
1972 h_residual_rphi_L1_S2_tpc->Fill(residual_rphi_tpc);
1973 h_residual_z_L1_S2_tpc->Fill(residual_z_tpc);
1975 h_res_rphi_vs_chi2_L1_S2_tpc->Fill(residual_rphi_tpc, track_chi2);
1976 h_res_z_vs_chi2_L1_S2_tpc->Fill(residual_z_tpc, track_chi2);
1978 else if(ilay==1 && ishe==0) {
1979 h_residual_rphi_L2_S1->Fill(residual_rphi);
1980 h_residual_z_L2_S1->Fill(residual_z);
1982 h_res_rphi_vs_chi2_L2_S1->Fill(residual_rphi, track_chi2);
1983 h_res_z_vs_chi2_L2_S1->Fill(residual_z, track_chi2);
1985 h_residual_rphi_L2_S1_tpc->Fill(residual_rphi_tpc);
1986 h_residual_z_L2_S1_tpc->Fill(residual_z_tpc);
1988 h_res_rphi_vs_chi2_L2_S1_tpc->Fill(residual_rphi_tpc, track_chi2);
1989 h_res_z_vs_chi2_L2_S1_tpc->Fill(residual_z_tpc, track_chi2);
1991 else if(ilay==1 && ishe==1) {
1992 h_residual_rphi_L2_S2->Fill(residual_rphi);
1993 h_residual_z_L2_S2->Fill(residual_z);
1995 h_res_rphi_vs_chi2_L2_S2->Fill(residual_rphi, track_chi2);
1996 h_res_z_vs_chi2_L2_S2->Fill(residual_z, track_chi2);
1998 h_residual_rphi_L2_S2_tpc->Fill(residual_rphi_tpc);
1999 h_residual_z_L2_S2_tpc->Fill(residual_z_tpc);
2001 h_res_rphi_vs_chi2_L2_S2_tpc->Fill(residual_rphi_tpc, track_chi2);
2002 h_res_z_vs_chi2_L2_S2_tpc->Fill(residual_z_tpc, track_chi2);
2004 else if(ilay==2 && ishe==0) {
2005 h_residual_rphi_L3_S1->Fill(residual_rphi);
2006 h_residual_z_L3_S1->Fill(residual_z);
2008 h_res_rphi_vs_chi2_L3_S1->Fill(residual_rphi, track_chi2);
2009 h_res_z_vs_chi2_L3_S1->Fill(residual_z, track_chi2);
2011 h_residual_rphi_L3_S1_tpc->Fill(residual_rphi_tpc);
2012 h_residual_z_L3_S1_tpc->Fill(residual_z_tpc);
2014 h_res_rphi_vs_chi2_L3_S1_tpc->Fill(residual_rphi_tpc, track_chi2);
2015 h_res_z_vs_chi2_L3_S1_tpc->Fill(residual_z_tpc, track_chi2);
2017 else if(ilay==2 && ishe==1) {
2018 h_residual_rphi_L3_S2->Fill(residual_rphi);
2019 h_residual_z_L3_S2->Fill(residual_z);
2021 h_res_rphi_vs_chi2_L3_S2->Fill(residual_rphi, track_chi2);
2022 h_res_z_vs_chi2_L3_S2->Fill(residual_z, track_chi2);
2024 h_residual_rphi_L3_S2_tpc->Fill(residual_rphi_tpc);
2025 h_residual_z_L3_S2_tpc->Fill(residual_z_tpc);
2027 h_res_rphi_vs_chi2_L3_S2_tpc->Fill(residual_rphi_tpc, track_chi2);
2028 h_res_z_vs_chi2_L3_S2_tpc->Fill(residual_z_tpc, track_chi2);
2042 int exp_lay = track_test_layerid;
2043 int exp_she = track_test_sheetid;
2045 if(exp_lay != -1 && exp_she != -1) {
2046 int track_test_sheetid_checked = track_test_sheetid;
2047 if(track_test_layerid==0) track_test_sheetid_checked=0;
2048 anode = m_SvcCgem->
getReadoutPlane(track_test_layerid, track_test_sheetid_checked);
2049 double fit_phi_test_layer = TMath::RadToDeg()*fit_phi[track_test_layerid][track_test_sheetid];
2050 double fit_z_test_layer = fit_z[track_test_layerid][track_test_sheetid];
2051 double fit_v_test_layer = anode->
getVFromPhiZ(fit_phi[track_test_layerid][track_test_sheetid],fit_z_test_layer,
true);
2052 int strip_phi = anode->
getXStripID(fit_phi[track_test_layerid][track_test_sheetid]);
2053 int fit_feb_phi= lutreader->
GetFEB(track_test_layerid,track_test_sheetid_checked,0,strip_phi);
2054 int fit_feb_v=lutreader->
GetFEB(track_test_layerid,track_test_sheetid_checked,1,(
int)fit_v_test_layer);
2055 if(track_chi2>cut_chi2)
return;
2058 if(track_chi2 <= cut_chi2) {
2062 n_validtrack_phi_arr[jj]++;
2063 n_validtrack_phi_1d_arr[jj]++;
2069 n_validtrack_v_1d_arr[jj]++;
2074 if(fit_z_test_layer >=
MIN_Z+(
Z_STEP*jj) && fit_z_test_layer <
MIN_Z+(
Z_STEP*(jj+1))) n_validtrack_z_arr[jj]++;
2083 if(fit_feb_phi>=0 && fit_feb_phi<80) n_validtrack_feb_arr[fit_feb_phi]++;
2084 if(fit_feb_v>=0 && fit_feb_v<80 ) n_validtrack_feb_arr[fit_feb_v]++;
2092 if(closest_cluster1dx_id != -1){
2093 double residual_rphi_1d = anode_mid_gap_radius[track_test_layerid] * (cluster_1d_phi_cc[closest_cluster1dx_id] - fit_phi[track_test_layerid][track_test_sheetid]);
2094 double exp_phi_1d_test_layer = TMath::RadToDeg()*cluster_1d_phi_cc[closest_cluster1dx_id];
2095 vector_test_phi_1d.push_back(exp_phi_1d_test_layer);
2096 vector_fit_phi_1d.push_back(TMath::RadToDeg()*fit_phi[track_test_layerid][track_test_sheetid]);
2097 vector_test_residual_rphi_1d.push_back(residual_rphi_1d);
2100 if(closest_cluster1dv_id != -1){
2101 double residual_v_1d = cluster_1d_v_cc[closest_cluster1dv_id] - fit_v_test_layer;
2102 double exp_v_1d_test_layer = cluster_1d_v_cc[closest_cluster1dx_id];
2103 vector_test_v_1d.push_back(exp_v_1d_test_layer);
2104 vector_fit_v_1d.push_back(fit_v_test_layer);
2105 vector_test_residual_v_1d.push_back(residual_v_1d);
2109 if(closest_cluster2d_id == -1)
return;
2111 exp_phi[exp_lay][exp_she] = cluster_2d_phi[closest_cluster2d_id];
2112 exp_z[exp_lay][exp_she] = cluster_2d_z[closest_cluster2d_id];
2114 exp_phi_tpc[exp_lay][exp_she] = cluster_2d_phi_tpc[closest_cluster2d_id];
2115 exp_z_tpc[exp_lay][exp_she] = cluster_2d_z_tpc[closest_cluster2d_id];
2117 double residual_rphi = anode_mid_gap_radius[track_test_layerid] * (exp_phi[track_test_layerid][track_test_sheetid] - fit_phi[track_test_layerid][track_test_sheetid]);
2118 double residual_z = exp_z[track_test_layerid][track_test_sheetid] - fit_z[track_test_layerid][track_test_sheetid];
2120 double exp_phi_test_layer = TMath::RadToDeg()*exp_phi[track_test_layerid][track_test_sheetid];
2121 vector_test_phi.push_back(exp_phi_test_layer);
2122 vector_fit_phi.push_back(TMath::RadToDeg()*fit_phi[track_test_layerid][track_test_sheetid]);
2124 double exp_z_test_layer = exp_z[track_test_layerid][track_test_sheetid];
2125 vector_test_z.push_back(exp_z_test_layer);
2126 vector_fit_z.push_back(fit_z[track_test_layerid][track_test_sheetid]);
2128 vector_chi2.push_back(track_chi2);
2131 for(
int chi_i = 0; chi_i <
CHI_BIN; chi_i++) {
2133 if(track_chi2 < chi2_cut_arr[chi_i] &&
2135 n_validtrack_phi_chi2_mat[chi_i][jj]++;
2138 if( track_chi2 < chi2_cut_arr[chi_i] &&
2140 n_validtrack_z_chi2_mat[chi_i][jj]++;
2145 double residual_rphi_tpc = anode_mid_gap_radius[track_test_layerid] * (exp_phi_tpc[track_test_layerid][track_test_sheetid] - fit_phi[track_test_layerid][track_test_sheetid]);
2146 double residual_z_tpc = exp_z_tpc[track_test_layerid][track_test_sheetid] - fit_z[track_test_layerid][track_test_sheetid];
2148 h_test_residual_rphi->Fill(residual_rphi);
2149 h_test_residual_z->Fill(residual_z);
2151 h_test_res_rphi_vs_chi2->Fill(residual_rphi, track_chi2);
2152 h_test_res_z_vs_chi2->Fill(residual_z, track_chi2);
2154 h_test_residual_rphi_tpc->Fill(residual_rphi_tpc);
2155 h_test_residual_z_tpc->Fill(residual_z_tpc);
2157 h_test_res_rphi_vs_chi2_tpc->Fill(residual_rphi_tpc, track_chi2);
2158 h_test_res_z_vs_chi2_tpc->Fill(residual_z_tpc, track_chi2);
2160 h_test_residual_rphi_vs_angxy_L1_cc ->Fill(residual_rphi , ang_xy_L1*TMath::RadToDeg());
2161 h_test_residual_rphi_vs_angxy_L1_tpc->Fill(residual_rphi_tpc, ang_xy_L1*TMath::RadToDeg());
2162 h_test_residual_rphi_vs_angxy_L2_cc ->Fill(residual_rphi , ang_xy_L2*TMath::RadToDeg());
2163 h_test_residual_rphi_vs_angxy_L2_tpc->Fill(residual_rphi_tpc, ang_xy_L2*TMath::RadToDeg());
2164 h_test_residual_rphi_vs_angxy_L3_cc ->Fill(residual_rphi , ang_xy_L3*TMath::RadToDeg());
2165 h_test_residual_rphi_vs_angxy_L3_tpc->Fill(residual_rphi_tpc, ang_xy_L3*TMath::RadToDeg());
2169 double q = cluster_2d_q[closest_cluster2d_id];
2171 int idx = cluster_2d_idx[closest_cluster2d_id];
2172 int idv = cluster_2d_idv[closest_cluster2d_id];
2173 double qx = cluster_1d_q[idx];
2174 double qv = cluster_1d_q[idv];
2175 double sizex = cluster_1d_size[idx];
2176 double sizev = cluster_1d_size[idv];
2178 vector_test_residual_rphi.push_back(residual_rphi);
2179 vector_test_residual_z.push_back(residual_z);
2180 vector_test_charge.push_back(
q);
2181 vector_test_charge_x.push_back(qx);
2182 vector_test_charge_v.push_back(qv);
2183 vector_test_size_x.push_back(sizex);
2184 vector_test_size_v.push_back(sizev);
2186 vector_test_clusterid.push_back(closest_cluster2d_id);
2187 vector_test_idx.push_back(idx);
2188 vector_test_idv.push_back(idv);
2198 bool microsectorL3 =
true;
2199 bool gridsL3 =
false;
2202 if(track_chi2 > cut_chi2) {
2214 fit_phi[0][0] = track_phi1bot_loc;
2215 fit_phi[0][1] = track_phi1top_loc;
2216 fit_phi[1][0] = track_phi2bot_loc;
2217 fit_phi[1][1] = track_phi2top_loc;
2218 fit_phi[2][0] = track_phi3bot_loc;
2219 fit_phi[2][1] = track_phi3top_loc;
2221 if(align_flag==
true) {
2222 HepPoint3D fit_L1_S1_glo(track_x1bot_glo, track_y1bot_glo, track_z1bot_glo);
2224 HepPoint3D fit_L1_S2_glo(track_x1top_glo, track_y1top_glo, track_z1top_glo);
2227 HepPoint3D fit_L2_S1_glo(track_x2bot_glo, track_y2bot_glo, track_z2bot_glo);
2229 HepPoint3D fit_L2_S2_glo(track_x2top_glo, track_y2top_glo, track_z2top_glo);
2232 HepPoint3D fit_L3_S1_glo(track_x3bot_glo, track_y2bot_glo, track_z3bot_glo);
2234 HepPoint3D fit_L3_S2_glo(track_x3top_glo, track_y2top_glo, track_z3top_glo);
2237 fit_z[0][0] = fit_L1_S1_loc.z();
2238 fit_z[0][1] = fit_L1_S2_loc.z();
2239 fit_z[1][0] = fit_L2_S1_loc.z();
2240 fit_z[1][1] = fit_L2_S2_loc.z();
2241 fit_z[2][0] = fit_L3_S1_loc.z();
2242 fit_z[2][1] = fit_L3_S2_loc.z();
2245 fit_z[0][0] = track_z1bot_glo;
2246 fit_z[0][1] = track_z1top_glo;
2247 fit_z[1][0] = track_z2bot_glo;
2248 fit_z[1][1] = track_z2top_glo;
2249 fit_z[2][0] = track_z3bot_glo;
2250 fit_z[2][1] = track_z3top_glo;
2256 bool stop_here=
false;
2257 for(
int iclu = 0; iclu < track_nfitpoint; iclu++) {
2258 int exp_lay = track_layerid[iclu];
2259 int exp_she = track_sheetid[iclu];
2261 int idx = cluster_2d_idx[track_clusterid[iclu]];
2262 int idv = cluster_2d_idv[track_clusterid[iclu]];
2263 double qx = cluster_1d_q[idx];
2264 double qv = cluster_1d_q[idv];
2266 int nx = cluster_1d_size[idx];
2267 int nv = cluster_1d_size[idv];
2270 if(exp_lay==0 && qx < cut_ene_L1_x) stop_here=
true;
2271 if(exp_lay==0 && qv < cut_ene_L1_v) stop_here=
true;
2272 if(exp_lay==1 && qx < cut_ene_L2_x) stop_here=
true;
2273 if(exp_lay==1 && qv < cut_ene_L2_v) stop_here=
true;
2274 if(exp_lay==2 && qx < cut_ene_L3_x) stop_here=
true;
2275 if(exp_lay==2 && qv < cut_ene_L3_v) stop_here=
true;
2278 if(exp_lay==0 && nx < cut_size_L1_x) stop_here=
true;
2279 if(exp_lay==0 && nv < cut_size_L1_v) stop_here=
true;
2280 if(exp_lay==1 && nx < cut_size_L2_x) stop_here=
true;
2281 if(exp_lay==1 && nv < cut_size_L2_v) stop_here=
true;
2282 if(exp_lay==2 && nx < cut_size_L3_x) stop_here=
true;
2283 if(exp_lay==2 && nv < cut_size_L3_v) stop_here=
true;
2286 exp_phi[exp_lay][exp_she] = cluster_2d_phi[track_clusterid[iclu]];
2287 exp_z[exp_lay][exp_she] = cluster_2d_z[track_clusterid[iclu]];
2289 fit_phi[exp_lay][exp_she]*=TMath::RadToDeg();
2290 exp_phi[exp_lay][exp_she]*=TMath::RadToDeg();
2292 if(exp_lay==0 && exp_she==0){
2293 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L1 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L1) stop_here=
true;
2294 if(fit_z[exp_lay][exp_she] < cut_z_min_L1 || fit_z[exp_lay][exp_she] > cut_z_max_L1) stop_here=
true;
2296 if(exp_lay==1 && exp_she==0){
2297 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L2 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L2) stop_here=
true;
2298 if(fit_z[exp_lay][exp_she] < cut_z_min_L2 || fit_z[exp_lay][exp_she] > cut_z_max_L2) stop_here=
true;
2300 if(exp_lay==2 && exp_she==0){
2301 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L3 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L3) stop_here=
true;
2302 if(fit_z[exp_lay][exp_she] < cut_z_min_L3 || fit_z[exp_lay][exp_she] > cut_z_max_L3) stop_here=
true;
2304 if(fit_z[exp_lay][exp_she] > -441.875 && fit_z[exp_lay][exp_she] < -439.875 ) stop_here=
true;
2305 if(fit_z[exp_lay][exp_she] > -343.938 && fit_z[exp_lay][exp_she] < -341.938 ) stop_here=
true;
2306 if(fit_z[exp_lay][exp_she] > -246 &&fit_z[exp_lay][exp_she] <-244 ) stop_here=
true;
2307 if(fit_z[exp_lay][exp_she] > -148.062 && fit_z[exp_lay][exp_she] < -146.062 ) stop_here=
true;
2308 if(fit_z[exp_lay][exp_she] > -50.125 &&fit_z[exp_lay][exp_she] < -48.125 ) stop_here=
true;
2309 if(fit_z[exp_lay][exp_she] > 47.8125 &&fit_z[exp_lay][exp_she] < 49.8125 ) stop_here=
true;
2310 if(fit_z[exp_lay][exp_she] > 145.75 &&fit_z[exp_lay][exp_she] <147.75 ) stop_here=
true;
2311 if(fit_z[exp_lay][exp_she] > 243.688 &&fit_z[exp_lay][exp_she] < 245.688 ) stop_here=
true;
2312 if(fit_z[exp_lay][exp_she] > 341.625 &&fit_z[exp_lay][exp_she] < 343.625 ) stop_here=
true;
2313 if(fit_z[exp_lay][exp_she] > 439.562 &&fit_z[exp_lay][exp_she] < 441.562 ) stop_here=
true;
2316 if(exp_lay==0 && exp_she==1){
2317 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L1 || fit_phi[exp_lay][exp_she] > cut_phi_max_L1) stop_here=
true;
2318 if(fit_z[exp_lay][exp_she] < cut_z_min_L1 || fit_z[exp_lay][exp_she] > cut_z_max_L1) stop_here=
true;
2320 if(exp_lay==1 && exp_she==1){
2321 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L2 || fit_phi[exp_lay][exp_she] > cut_phi_max_L2) stop_here=
true;
2322 if(fit_z[exp_lay][exp_she] < cut_z_min_L2 || fit_z[exp_lay][exp_she] > cut_z_max_L2) stop_here=
true;
2324 if(exp_lay==2 && exp_she==1){
2325 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L3 || fit_phi[exp_lay][exp_she] > cut_phi_max_L3) stop_here=
true;
2326 if(fit_z[exp_lay][exp_she] < cut_z_min_L3 || fit_z[exp_lay][exp_she] > cut_z_max_L3) stop_here=
true;
2328 if(fit_phi[exp_lay][exp_she] > 93 && fit_phi[exp_lay][exp_she] < 97) stop_here=
true;
2331 if(fit_z[exp_lay][exp_she] > -441.875 && fit_z[exp_lay][exp_she] < -439.875 ) stop_here=
true;
2332 if(fit_z[exp_lay][exp_she] > -343.938 && fit_z[exp_lay][exp_she] < -341.938 ) stop_here=
true;
2333 if(fit_z[exp_lay][exp_she] > -246 &&fit_z[exp_lay][exp_she] <-244 ) stop_here=
true;
2334 if(fit_z[exp_lay][exp_she] > -148.062 && fit_z[exp_lay][exp_she] < -146.062 ) stop_here=
true;
2335 if(fit_z[exp_lay][exp_she] > -50.125 &&fit_z[exp_lay][exp_she] < -48.125 ) stop_here=
true;
2336 if(fit_z[exp_lay][exp_she] > 47.8125 &&fit_z[exp_lay][exp_she] < 49.8125 ) stop_here=
true;
2337 if(fit_z[exp_lay][exp_she] > 145.75 &&fit_z[exp_lay][exp_she] <147.75 ) stop_here=
true;
2338 if(fit_z[exp_lay][exp_she] > 243.688 &&fit_z[exp_lay][exp_she] < 245.688 ) stop_here=
true;
2339 if(fit_z[exp_lay][exp_she] > 341.625 &&fit_z[exp_lay][exp_she] < 343.625 ) stop_here=
true;
2340 if(fit_z[exp_lay][exp_she] > 439.562 &&fit_z[exp_lay][exp_she] < 441.562 ) stop_here=
true;
2347 int exp_lay = track_test_layerid;
2348 int exp_she = track_test_sheetid;
2349 if(exp_lay != -1 && exp_she != -1) {
2350 fit_phi[exp_lay][exp_she]*=TMath::RadToDeg();
2351 if(exp_lay==0 && exp_she==0){
2352 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L1 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L1) stop_here=
true;
2353 if(fit_z[exp_lay][exp_she] < cut_z_min_L1 || fit_z[exp_lay][exp_she] > cut_z_max_L1) stop_here=
true;
2355 if(exp_lay==1 && exp_she==0){
2356 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L2 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L2) stop_here=
true;
2357 if(fit_z[exp_lay][exp_she] < cut_z_min_L2 || fit_z[exp_lay][exp_she] > cut_z_max_L2) stop_here=
true;
2359 if(exp_lay==2 && exp_she==0){
2360 if(fit_phi[exp_lay][exp_she] < -cut_phi_max_L3 || fit_phi[exp_lay][exp_she] > -cut_phi_min_L3) stop_here=
true;
2361 if(fit_z[exp_lay][exp_she] < cut_z_min_L3 || fit_z[exp_lay][exp_she] > cut_z_max_L3) stop_here=
true;
2363 if(fit_z[exp_lay][exp_she] > -441.875 && fit_z[exp_lay][exp_she] < -439.875 ) stop_here=
true;
2364 if(fit_z[exp_lay][exp_she] > -343.938 && fit_z[exp_lay][exp_she] < -341.938 ) stop_here=
true;
2365 if(fit_z[exp_lay][exp_she] > -246 &&fit_z[exp_lay][exp_she] <-244 ) stop_here=
true;
2366 if(fit_z[exp_lay][exp_she] > -148.062 && fit_z[exp_lay][exp_she] < -146.062 ) stop_here=
true;
2367 if(fit_z[exp_lay][exp_she] > -50.125 &&fit_z[exp_lay][exp_she] < -48.125 ) stop_here=
true;
2368 if(fit_z[exp_lay][exp_she] > 47.8125 &&fit_z[exp_lay][exp_she] < 49.8125 ) stop_here=
true;
2369 if(fit_z[exp_lay][exp_she] > 145.75 &&fit_z[exp_lay][exp_she] <147.75 ) stop_here=
true;
2370 if(fit_z[exp_lay][exp_she] > 243.688 &&fit_z[exp_lay][exp_she] < 245.688 ) stop_here=
true;
2371 if(fit_z[exp_lay][exp_she] > 341.625 &&fit_z[exp_lay][exp_she] < 343.625 ) stop_here=
true;
2372 if(fit_z[exp_lay][exp_she] > 439.562 &&fit_z[exp_lay][exp_she] < 441.562 ) stop_here=
true;
2375 if(exp_lay==0 && exp_she==1){
2376 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L1 || fit_phi[exp_lay][exp_she] > cut_phi_max_L1) stop_here=
true;
2377 if(fit_z[exp_lay][exp_she] < cut_z_min_L1 || fit_z[exp_lay][exp_she] > cut_z_max_L1) stop_here=
true;
2379 if(exp_lay==1 && exp_she==1){
2380 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L2 || fit_phi[exp_lay][exp_she] > cut_phi_max_L2) stop_here=
true;
2381 if(fit_z[exp_lay][exp_she] < cut_z_min_L2 || fit_z[exp_lay][exp_she] > cut_z_max_L2) stop_here=
true;
2383 if(exp_lay==2 && exp_she==1){
2384 if(fit_phi[exp_lay][exp_she] < cut_phi_min_L3 || fit_phi[exp_lay][exp_she] > cut_phi_max_L3) stop_here=
true;
2385 if(fit_z[exp_lay][exp_she] < cut_z_min_L3 || fit_z[exp_lay][exp_she] > cut_z_max_L3) stop_here=
true;
2387 if(fit_phi[exp_lay][exp_she] > 93 && fit_phi[exp_lay][exp_she] < 97) stop_here=
true;
2390 if(fit_z[exp_lay][exp_she] > -441.875 && fit_z[exp_lay][exp_she] < -439.875 ) stop_here=
true;
2391 if(fit_z[exp_lay][exp_she] > -343.938 && fit_z[exp_lay][exp_she] < -341.938 ) stop_here=
true;
2392 if(fit_z[exp_lay][exp_she] > -246 &&fit_z[exp_lay][exp_she] <-244 ) stop_here=
true;
2393 if(fit_z[exp_lay][exp_she] > -148.062 && fit_z[exp_lay][exp_she] < -146.062 ) stop_here=
true;
2394 if(fit_z[exp_lay][exp_she] > -50.125 &&fit_z[exp_lay][exp_she] < -48.125 ) stop_here=
true;
2395 if(fit_z[exp_lay][exp_she] > 47.8125 &&fit_z[exp_lay][exp_she] < 49.8125 ) stop_here=
true;
2396 if(fit_z[exp_lay][exp_she] > 145.75 &&fit_z[exp_lay][exp_she] <147.75 ) stop_here=
true;
2397 if(fit_z[exp_lay][exp_she] > 243.688 &&fit_z[exp_lay][exp_she] < 245.688 ) stop_here=
true;
2398 if(fit_z[exp_lay][exp_she] > 341.625 &&fit_z[exp_lay][exp_she] < 343.625 ) stop_here=
true;
2399 if(fit_z[exp_lay][exp_she] > 439.562 &&fit_z[exp_lay][exp_she] < 441.562 ) stop_here=
true;
2406 if(stop_here==
true) {
2418 int track_test_sheetid_checked = test_sheet_id_all;
2419 if(test_layer_id_all==0) track_test_sheetid_checked=0;
2421 anode = m_SvcCgem->
getReadoutPlane(test_layer_id_all, track_test_sheetid_checked);
2425 nentries_residual_rphi = h_test_residual_rphi->GetEntries();
2426 nentries_residual_z = h_test_residual_z->GetEntries();
2430 float mean_residual_rphi_1d=0;
2431 float mean_residual_v_1d=0;
2432 float sigma_residual_rphi_1d=0;
2433 float sigma_residual_v_1d=0;
2434 for(
int i=0;i<vector_test_residual_rphi_1d.size();i++) mean_residual_rphi_1d+=vector_test_residual_rphi_1d.at(i);
2435 mean_residual_rphi_1d/=vector_test_residual_rphi_1d.size();
2436 for(
int i=0;i<vector_test_residual_v_1d.size();i++) mean_residual_v_1d+=vector_test_residual_v_1d.at(i);
2437 mean_residual_v_1d/=vector_test_residual_v_1d.size();
2438 for(
int i=0;i<vector_test_residual_rphi_1d.size();i++) sigma_residual_rphi_1d+=pow(vector_test_residual_rphi_1d.at(i)-mean_residual_rphi_1d,2);
2439 sigma_residual_rphi_1d=sqrt(sigma_residual_rphi_1d/vector_test_residual_rphi_1d.size());
2440 for(
int i=0;i<vector_test_residual_v_1d.size();i++) sigma_residual_v_1d+=pow(vector_test_residual_v_1d.at(i)-mean_residual_v_1d,2);
2441 sigma_residual_v_1d=sqrt(sigma_residual_v_1d/vector_test_residual_v_1d.size());
2444 res_file2.open(
"oneDres.txt");
2445 res_file2<<
"eff 1dX mean : "<<mean_residual_rphi_1d<<endl;
2446 res_file2<<
"eff 1dX sigma : "<<sigma_residual_rphi_1d<<endl;
2447 res_file2<<
"eff 1dV mean : "<<mean_residual_v_1d<<endl;
2448 res_file2<<
"eff 1dV sigma : "<<sigma_residual_v_1d<<endl;
2450 TCanvas *ccc =
new TCanvas(
"ccc",
"ccc",800,600);
2452 TStyle *ggStyle =
new TStyle();
2453 ggStyle->SetOptFit(1111);
2454 TH1F *h_res_1dX =
new TH1F(
"h_res_1dX",
"h_res_1dX",100,-5,5);
2455 for(
int i=0;i<vector_test_residual_rphi_1d.size();i++) h_res_1dX->Fill(vector_test_residual_rphi_1d.at(i));
2456 TF1 *f_res_1dX =
new TF1(
"f_res_1dX",
"gaus");
2457 if(h_res_1dX->GetEntries()>10) {
2458 h_res_1dX->Fit(f_res_1dX,
"WQ");
2459 mean_residual_rphi_1d=f_res_1dX->GetParameter(1);
2460 sigma_residual_rphi_1d=f_res_1dX->GetParameter(2);
2461 ccc->Print(
"res_X.pdf");
2463 TH1F *h_res_1dV =
new TH1F(
"h_res_1dV",
"h_res_1dV",100,-50,50);
2464 for(
int i=0;i<vector_test_residual_v_1d.size();i++) h_res_1dV->Fill(vector_test_residual_v_1d.at(i));
2465 TF1 *f_res_1dV =
new TF1(
"f_res_1dV",
"gaus");
2466 if(h_res_1dV->GetEntries()>10){
2467 h_res_1dV->Fit(f_res_1dV,
"WQ");
2468 mean_residual_v_1d=f_res_1dV->GetParameter(1);
2469 sigma_residual_v_1d=f_res_1dV->GetParameter(2);
2470 ccc->Print(
"res_V.pdf");
2472 res_file2<<
"FIT"<<endl;
2473 res_file2<<
"eff 1dX mean : "<<mean_residual_rphi_1d<<endl;
2474 res_file2<<
"eff 1dX sigma : "<<sigma_residual_rphi_1d<<endl;
2475 res_file2<<
"eff 1dV mean : "<<mean_residual_v_1d<<endl;
2476 res_file2<<
"eff 1dV sigma : "<<sigma_residual_v_1d<<endl;
2485 if(nentries_residual_rphi > 10) {
2486 TF1*
f1 =
new TF1(
"f1",
"gaus", -5, 5);
2487 f1->SetParameters(1, 0, 1);
2488 h_test_residual_rphi->Fit(
"f1",
"WRNQ");
2490 f1->GetParameters(¶m1[0]);
2491 mean_residual_rphi = param1[1];
2492 sigma_residual_rphi = param1[2];
2497 if(nentries_residual_z > 10) {
2498 TF1 *f2 =
new TF1(
"f2",
"gaus", -5, 5);
2499 f2->SetParameters(1, 0, 1);
2500 h_test_residual_z->Fit(
"f2",
"WRNQ");
2502 f2->GetParameters(¶m2[0]);
2503 mean_residual_z = param2[1];
2504 sigma_residual_z = param2[2];
2509 TF1* f3 =
new TF1(
"f3",
"gaus", -5, 5); TF1* f4 =
new TF1(
"f4",
"gaus", -5, 5);
2510 TF1* f5 =
new TF1(
"f5",
"gaus", -5, 5); TF1* f6 =
new TF1(
"f6",
"gaus", -5, 5);
2511 TF1* f7 =
new TF1(
"f7",
"gaus", -5, 5); TF1* f8 =
new TF1(
"f8",
"gaus", -5, 5);
2514 TH1D *h1_dummy =
new TH1D(
"h1_dummy",
"h1_dummy", 100, -5, 5); TH1D *h2_dummy =
new TH1D(
"h2_dummy",
"h2_dummy", 100, -5, 5);
2515 TH1D *h3_dummy =
new TH1D(
"h3_dummy",
"h3_dummy", 100, -5, 5); TH1D *h4_dummy =
new TH1D(
"h4_dummy",
"h4_dummy", 100, -5, 5);
2516 TH1D *h5_dummy =
new TH1D(
"h5_dummy",
"h5_dummy", 100, -5, 5); TH1D *h6_dummy =
new TH1D(
"h6_dummy",
"h6_dummy", 100, -5, 5);
2522 double param3[3];
double param4[3];
2523 double param5[3];
double param6[3];
2524 double param7[3];
double param8[3];
2526 for(
int i_chi = 0; i_chi <
CHI_BIN; i_chi++) {
2527 f3->SetParameters(1, 0, 1); f4->SetParameters(1, 0, 1);
2528 f5->SetParameters(1, 0, 1); f6->SetParameters(1, 0, 1);
2530 i_bin = j_dumbin*j_dumbin + 1;
2531 if(i_chi/3 == 1) i_bin = i_bin*10 ;
2532 if(i_chi/3 == 2) i_bin = i_bin*100 ;
2533 if(i_chi/3 == 3) i_bin = i_bin*1000;
2535 if(j_dumbin < 2) j_dumbin++;
2538 h1_dummy = h_test_res_rphi_vs_chi2->ProjectionX(
"h1_dummy", 1, i_bin);
2539 h2_dummy = h_test_res_z_vs_chi2 ->ProjectionX(
"h2_dummy", 1, i_bin);
2541 h3_dummy = h_test_res_rphi_vs_chi2_tpc->ProjectionX(
"h3_dummy", 1, i_bin);
2542 h4_dummy = h_test_res_z_vs_chi2_tpc ->ProjectionX(
"h4_dummy", 1, i_bin);
2544 if(h1_dummy->GetEntries() > 10) {
2545 h1_dummy->Fit(
"f3",
"WRNQ");
2546 f3->GetParameters(¶m3[0]);
2547 h_resolution_rphi_vs_chi2->SetBinContent(i_chi+1, param3[2]);
2549 else h_resolution_rphi_vs_chi2->SetBinContent(i_chi+1, -1);
2551 if(h2_dummy->GetEntries() > 10) {
2552 h2_dummy->Fit(
"f4",
"WRNQ");
2553 f4->GetParameters(¶m4[0]);
2554 h_resolution_z_vs_chi2 ->SetBinContent(i_chi+1, param4[2]);
2556 else h_resolution_z_vs_chi2 ->SetBinContent(i_chi+1, -1);
2558 if(h3_dummy->GetEntries() > 10) {
2559 h3_dummy->Fit(
"f5",
"WRNQ");
2560 f5->GetParameters(¶m5[0]);
2561 h_resolution_rphi_tpc_vs_chi2->SetBinContent(i_chi+1, param5[2]);
2563 else h_resolution_rphi_tpc_vs_chi2->SetBinContent(i_chi+1, -1);
2565 if(h4_dummy->GetEntries() > 10) {
2566 h4_dummy->Fit(
"f6",
"WRNQ");
2567 f6->GetParameters(¶m6[0]);
2568 h_resolution_z_tpc_vs_chi2 ->SetBinContent(i_chi+1, param6[2]);
2570 else h_resolution_z_tpc_vs_chi2 ->SetBinContent(i_chi+1, -1);
2572 h1_dummy->Reset(); h2_dummy->Reset();
2573 h3_dummy->Reset(); h4_dummy->Reset();
2576 for(
int i_clean = 0; i_clean < 3; i_clean++) {
2577 param3[i_clean] = 0; param4[i_clean] = 0;
2578 param5[i_clean] = 0; param6[i_clean] = 0;
2579 param7[i_clean] = 0; param8[i_clean] = 0;
2581 h1_dummy->Reset(); h2_dummy->Reset();
2582 h3_dummy->Reset(); h4_dummy->Reset();
2583 h5_dummy->Reset(); h6_dummy->Reset();
2586 for(
int i_ang = 0; i_ang <
ANG_BIN; i_ang++) {
2588 f3->SetParameters(1, 0, 1); f4->SetParameters(1, 0, 1);
2589 f5->SetParameters(1, 0, 1); f6->SetParameters(1, 0, 1);
2591 h1_dummy = h_test_residual_rphi_vs_angxy_L1_cc->ProjectionX(
"h1_dummy", i_ang+1, i_ang+1);
2592 h2_dummy = h_test_residual_rphi_vs_angxy_L2_cc->ProjectionX(
"h2_dummy", i_ang+1, i_ang+1);
2593 h5_dummy = h_test_residual_rphi_vs_angxy_L3_cc->ProjectionX(
"h5_dummy", i_ang+1, i_ang+1);
2595 h3_dummy = h_test_residual_rphi_vs_angxy_L1_tpc->ProjectionX(
"h3_dummy", i_ang+1, i_ang+1);
2596 h4_dummy = h_test_residual_rphi_vs_angxy_L2_tpc->ProjectionX(
"h4_dummy", i_ang+1, i_ang+1);
2597 h6_dummy = h_test_residual_rphi_vs_angxy_L3_tpc->ProjectionX(
"h6_dummy", i_ang+1, i_ang+1);
2600 if(h1_dummy->GetEntries() > 10) {
2601 h1_dummy->Fit(
"f3",
"WRNQ");
2602 h1_dummy->Fit(
"f3",
"WRNQ",
"",-2*f3->GetParameter(2),2*f3->GetParameter(2));
2603 f3->GetParameters(¶m3[0]);
2604 h_resolution_vs_ang_xy_L1->SetBinContent(i_ang+1, param3[2]);
2606 else h_resolution_vs_ang_xy_L1->SetBinContent(i_ang+1, -1);
2608 if(h2_dummy->GetEntries() > 10) {
2609 h2_dummy->Fit(
"f4",
"WRNQ");
2610 h2_dummy->Fit(
"f4",
"WRNQ",
"",-2*f4->GetParameter(2),2*f4->GetParameter(2));
2611 f4->GetParameters(¶m4[0]);
2612 h_resolution_vs_ang_xy_L2->SetBinContent(i_ang+1, param4[2]);
2614 else h_resolution_vs_ang_xy_L2->SetBinContent(i_ang+1, -1);
2616 if(h5_dummy->GetEntries() > 10) {
2617 h5_dummy->Fit(
"f7",
"WRNQ");
2618 h5_dummy->Fit(
"f7",
"WRNQ",
"",-2*f7->GetParameter(2),2*f7->GetParameter(2));
2619 f7->GetParameters(¶m7[0]);
2620 h_resolution_vs_ang_xy_L3->SetBinContent(i_ang+1, param7[2]);
2622 else h_resolution_vs_ang_xy_L3->SetBinContent(i_ang+1, -1);
2624 if(h3_dummy->GetEntries() > 10) {
2625 h3_dummy->Fit(
"f5",
"WRNQ");
2626 h3_dummy->Fit(
"f5",
"WRNQ",
"",-2*f5->GetParameter(2),2*f5->GetParameter(2));
2627 f5->GetParameters(¶m5[0]);
2628 h_resolution_tpc_vs_ang_xy_L1->SetBinContent(i_ang+1, param5[2]);
2630 else h_resolution_tpc_vs_ang_xy_L1->SetBinContent(i_ang+1, -1);
2632 if(h4_dummy->GetEntries() > 10) {
2633 h4_dummy->Fit(
"f6",
"WRNQ");
2634 h4_dummy->Fit(
"f6",
"WRNQ",
"",-2*f6->GetParameter(2),2*f6->GetParameter(2));
2635 f6->GetParameters(¶m6[0]);
2636 h_resolution_tpc_vs_ang_xy_L2->SetBinContent(i_ang+1, param6[2]);
2638 else h_resolution_tpc_vs_ang_xy_L2->SetBinContent(i_ang+1, -1);
2640 if(h6_dummy->GetEntries() > 10) {
2641 h6_dummy->Fit(
"f8",
"WRNQ");
2642 h6_dummy->Fit(
"f8",
"WRNQ",
"",-2*f8->GetParameter(2),2*f8->GetParameter(2));
2643 f8->GetParameters(¶m8[0]);
2644 h_resolution_tpc_vs_ang_xy_L3->SetBinContent(i_ang+1, param8[2]);
2646 else h_resolution_tpc_vs_ang_xy_L3->SetBinContent(i_ang+1, -1);
2648 h1_dummy->Reset(); h2_dummy->Reset();
2649 h3_dummy->Reset(); h4_dummy->Reset();
2650 h5_dummy->Reset(); h6_dummy->Reset();
2653 delete f3;
delete f4;
2654 delete f5;
delete f6;
2655 delete f7;
delete f8;
2657 delete h1_dummy;
delete h2_dummy;
2658 delete h3_dummy;
delete h4_dummy;
2659 delete h5_dummy;
delete h6_dummy;
2662 int const nsigma_inside = NSIGMA_INSIDE;
2663 int const nsigma_outside = NSIGMA_INSIDE+5;
2667 for(
int ivec=0; ivec < vector_test_phi_1d.size(); ivec++) {
2668 double phi_fit = vector_fit_phi_1d.at(ivec);
2669 int strip_phi = anode->
getXStripID(phi_fit*TMath::DegToRad());
2670 int feb_fit = lutreader->
GetFEB(test_layer_id_all,track_test_sheetid_checked,0,strip_phi);
2671 double residual_rphi_1d = vector_test_residual_rphi_1d.at(ivec);
2672 if(residual_rphi_1d > mean_residual_rphi_1d - nsigma_inside * sigma_residual_rphi_1d && residual_rphi_1d < mean_residual_rphi_1d + nsigma_inside * sigma_residual_rphi_1d){
2676 if(feb_fit>=0 && feb_fit<80) n_insidetrack_feb_arr[feb_fit]++;
2679 for(
int ivec=0; ivec < vector_test_v_1d.size(); ivec++) {
2680 double v_fit = vector_fit_v_1d.at(ivec);
2681 int strip_v = v_fit;
2682 int feb_fit= lutreader->
GetFEB(test_layer_id_all,track_test_sheetid_checked,1,strip_v);
2683 double residual_v_1d = vector_test_residual_v_1d.at(ivec);
2684 if(residual_v_1d > mean_residual_v_1d - nsigma_inside * sigma_residual_v_1d && residual_v_1d < mean_residual_v_1d + nsigma_inside * sigma_residual_v_1d){
2687 n_insidetrack_v_1d_arr[jj]++;
2690 if(feb_fit>=0 && feb_fit<80) n_insidetrack_feb_arr[feb_fit]++;
2696 for(
int ivec=0; ivec < vector_test_charge.size(); ivec++) {
2698 double residual_rphi = vector_test_residual_rphi.at(ivec);
2699 double residual_z = vector_test_residual_z.at(ivec);
2701 double q = vector_test_charge.at(ivec);
2702 double qx = vector_test_charge_x.at(ivec);
2703 double qv = vector_test_charge_v.at(ivec);
2704 double sizex = vector_test_size_x.at(ivec);
2705 double sizev = vector_test_size_v.at(ivec);
2706 double phi_t = vector_test_phi.at(ivec);
2707 double z_t = vector_test_z.at(ivec);
2708 double phi_fit = vector_fit_phi.at(ivec);
2709 double z_fit = vector_fit_z.at(ivec);
2711 double t_chi2 = vector_chi2.at(ivec);
2713 int clusterid = vector_test_clusterid.at(ivec);
2714 int idx = vector_test_idx.at(ivec);
2715 int idv = vector_test_idv.at(ivec);
2718 if(residual_rphi > mean_residual_rphi - nsigma_inside * sigma_residual_rphi && residual_rphi < mean_residual_rphi + nsigma_inside * sigma_residual_rphi){
2721 if(residual_z > mean_residual_z - nsigma_inside * sigma_residual_z && residual_z < mean_residual_z + nsigma_inside * sigma_residual_z){
2726 if((residual_rphi > mean_residual_rphi - nsigma_inside * sigma_residual_rphi && residual_rphi < mean_residual_rphi + nsigma_inside * sigma_residual_rphi)
2727 && (residual_z > mean_residual_z - nsigma_inside * sigma_residual_z && residual_z < mean_residual_z + nsigma_inside * sigma_residual_z)) {
2729 h_signal_charge_2d->Fill(
q);
2730 h_signal_charge_1d_x->Fill(qx);
2731 h_signal_charge_1d_v->Fill(qv);
2732 h_signal_size_1d_x->Fill(sizex);
2733 h_signal_size_1d_v->Fill(sizev);
2735 if(t_chi2 <= cut_chi2) {
2736 h_signal_charge_2d_chi2cut->Fill(
q);
2737 h_signal_charge_1d_x_chi2cut->Fill(qx);
2738 h_signal_charge_1d_v_chi2cut->Fill(qv);
2739 h_signal_size_1d_x_chi2cut->Fill(sizex);
2740 h_signal_size_1d_v_chi2cut->Fill(sizev);
2742 double phi_fit2 = phi_t - residual_rphi/anode_mid_gap_radius[test_layer_id_all];
2743 double z_fit2 = z_t - residual_z;
2756 n_insidetrack_phi_z_mat[ii][jj]++;
2763 for(
int chi_i = 0; chi_i <
CHI_BIN; chi_i++) {
2765 if(t_chi2 < chi2_cut_arr[chi_i] && (phi_t >=
MIN_PHI+(
PHI_STEP*jj) && phi_t <
MIN_PHI+(
PHI_STEP*(jj+1)))) n_insidetrack_phi_chi2_mat[chi_i][jj]++;
2768 if(t_chi2 < chi2_cut_arr[chi_i] && (z_t >=
MIN_Z+(
Z_STEP*jj) && z_t <
MIN_Z+(
Z_STEP*(jj+1)))) n_insidetrack_z_chi2_mat[chi_i][jj]++;
2776 if((residual_rphi < mean_residual_rphi - nsigma_outside * sigma_residual_rphi || residual_rphi > mean_residual_rphi + nsigma_outside * sigma_residual_rphi)
2777 && (residual_z < mean_residual_z - nsigma_outside * sigma_residual_z || residual_z > mean_residual_z + nsigma_outside * sigma_residual_z)) {
2779 h_background_charge_2d->Fill(
q);
2780 h_background_charge_1d_x->Fill(qx);
2781 h_background_charge_1d_v->Fill(qv);
2782 h_background_size_1d_x->Fill(sizex);
2783 h_background_size_1d_v->Fill(sizev);
2792 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
2793 h_track_selection_vs_phi->SetBinContent(i_bin_phi+1, n_validtrack_phi_arr[i_bin_phi]);
2795 if(n_validtrack_phi_arr[i_bin_phi] != 0 && n_validtrack_phi_arr[i_bin_phi] >
MIN_ENTRIES) {
2796 float eff = ((double)n_insidetrack_phi_arr[i_bin_phi])/((
double)n_validtrack_phi_arr[i_bin_phi]);
2797 float deff = sqrt(eff*(1-eff)/((
double)n_validtrack_phi_arr[i_bin_phi]));
2798 h_eff_vs_phi->SetBinContent(i_bin_phi+1, eff);
2799 h_eff_vs_phi->SetBinError(i_bin_phi+1, deff);
2802 h_eff_vs_phi->SetBinContent(i_bin_phi+1, 0);
2805 if(n_validtrack_phi_1d_arr[i_bin_phi] != 0 && n_validtrack_phi_1d_arr[i_bin_phi] >
MIN_ENTRIES) {
2806 float eff_1d = ((double)n_insidetrack_phi_1d_arr[i_bin_phi])/((
double)n_validtrack_phi_1d_arr[i_bin_phi]);
2807 float deff_1d = sqrt(eff_1d*(1-eff_1d)/((
double)n_validtrack_phi_1d_arr[i_bin_phi]));
2808 h_eff_vs_phi_1d->SetBinContent(i_bin_phi+1, eff_1d);
2809 h_eff_vs_phi_1d->SetBinError(i_bin_phi+1, deff_1d);
2812 h_eff_vs_phi_1d->SetBinContent(i_bin_phi+1, 0);
2816 for(
int i_bin_v = 0; i_bin_v <
MAX_V_BIN; i_bin_v++) {
2818 if(n_validtrack_v_1d_arr[i_bin_v] != 0 && n_validtrack_v_1d_arr[i_bin_v] >
MIN_ENTRIES) {
2819 float eff_1d = ((double)n_insidetrack_v_1d_arr[i_bin_v])/((
double)n_validtrack_v_1d_arr[i_bin_v]);
2820 float deff_1d = sqrt(eff_1d*(1-eff_1d)/((
double)n_validtrack_v_1d_arr[i_bin_v]));
2821 h_eff_vs_v_1d->SetBinContent(i_bin_v+1, eff_1d);
2822 h_eff_vs_v_1d->SetBinError(i_bin_v+1, deff_1d);
2825 h_eff_vs_v_1d->SetBinContent(i_bin_v+1, 0);
2829 for(
int i_bin_feb = 0; i_bin_feb < 80; i_bin_feb++) {
2831 if(n_validtrack_feb_arr[i_bin_feb] != 0 && n_validtrack_feb_arr[i_bin_feb] >
MIN_ENTRIES) {
2832 float eff_1d = ((double)n_insidetrack_feb_arr[i_bin_feb])/((
double)n_validtrack_feb_arr[i_bin_feb]);
2833 float deff_1d = sqrt(eff_1d*(1-eff_1d)/((
double)n_validtrack_feb_arr[i_bin_feb]));
2834 h_eff_vs_FEB->SetBinContent(i_bin_feb+1, eff_1d);
2835 h_eff_vs_FEB->SetBinError(i_bin_feb+1, deff_1d);
2838 h_eff_vs_FEB->SetBinContent(i_bin_feb+1, 0);
2843 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
2844 h_track_selection_vs_z->SetBinContent(i_bin_z+1, n_validtrack_z_arr[i_bin_z]);
2845 if(n_validtrack_z_arr[i_bin_z] != 0 && n_validtrack_z_arr[i_bin_z] >
MIN_ENTRIES) {
2846 float eff = ((double)n_insidetrack_z_arr[i_bin_z])/((
double)n_validtrack_z_arr[i_bin_z]);
2847 float deff = sqrt(eff*(1-eff)/((
double)n_validtrack_z_arr[i_bin_z]));
2848 h_eff_vs_z->SetBinContent(i_bin_z+1, eff);
2849 h_eff_vs_z->SetBinError(i_bin_z+1, deff);
2851 else h_eff_vs_z->SetBinContent(i_bin_z+1, 0);
2854 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
2855 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
2856 h_track_selection_vs_phi_vs_z->SetBinContent(i_bin_phi+1, i_bin_z+1, n_validtrack_phi_z_mat[i_bin_phi][i_bin_z]);
2857 if(n_validtrack_phi_z_mat[i_bin_phi][i_bin_z] != 0 && n_validtrack_phi_z_mat[i_bin_phi][i_bin_z] >
MIN_ENTRIES) h_eff_vs_phi_vs_z->SetBinContent(i_bin_phi+1, i_bin_z+1, ((
double)n_insidetrack_phi_z_mat[i_bin_phi][i_bin_z])/((
double)n_validtrack_phi_z_mat[i_bin_phi][i_bin_z]));
2858 else h_eff_vs_phi_vs_z->SetBinContent(i_bin_phi+1, i_bin_z+1, 0);
2862 for(
int i_bin_chi = 0; i_bin_chi <
CHI_BIN; i_bin_chi++) {
2863 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
2864 if(n_validtrack_phi_chi2_mat[i_bin_chi][i_bin_phi] != 0 && n_validtrack_phi_chi2_mat[i_bin_chi][i_bin_phi] >
MIN_ENTRIES) h_eff_vs_phi_vs_chi2->SetBinContent(i_bin_phi+1, i_bin_chi+1, ((
double)n_insidetrack_phi_chi2_mat[i_bin_chi][i_bin_phi])/((
double)n_validtrack_phi_chi2_mat[i_bin_chi][i_bin_phi]));
2865 else h_eff_vs_phi_vs_chi2->SetBinContent(i_bin_phi+1, i_bin_chi+1, 0);
2867 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
2868 if(n_validtrack_z_chi2_mat[i_bin_chi][i_bin_z] != 0 && n_validtrack_z_chi2_mat[i_bin_chi][i_bin_z] >
MIN_ENTRIES) h_eff_vs_z_vs_chi2->SetBinContent(i_bin_z+1, i_bin_chi+1, ((
double)n_insidetrack_z_chi2_mat[i_bin_chi][i_bin_z])/((
double)n_validtrack_z_chi2_mat[i_bin_chi][i_bin_z]));
2869 else h_eff_vs_z_vs_chi2->SetBinContent(i_bin_z+1, i_bin_chi+1, 0);
3081 int cluster2d_id = ID2D;
3082 int idx = cluster_2d_idx[cluster2d_id];
3083 int idv = cluster_2d_idv[cluster2d_id];
3085 int layer = cluster_1d_layerid[idx];
3086 int sheet = cluster_1d_sheetid[idx];
3087 int view = cluster_1d_view[idx];
3089 double hit_x_tpc_good[100];
3090 double hit_z_tpc_good[100];
3091 double hit_ex_tpc_good[100];
3092 double hit_ez_tpc_good[100];
3096 double x_min = +9999;
3097 double x_max = -9999;
3098 for(
int IDS=0; IDS<nhit; IDS++){
3099 if(hit_strip[IDS]>=cluster_1d_strip1[idx] && hit_strip[IDS]<=cluster_1d_strip2[idx] && hit_layer[IDS]==layer && hit_sheet[IDS]==sheet && hit_view[IDS]==view){
3100 hit_x_tpc_good[nhit_good] = anode_mid_gap_radius[0]*
cos(hit_x_tpc[IDS]);
3101 hit_z_tpc_good[nhit_good] = hit_z_tpc[IDS];
3102 hit_ex_tpc_good[nhit_good] = hit_ex_tpc[IDS];
3103 hit_ez_tpc_good[nhit_good] = hit_ez_tpc[IDS];
3104 if(x_min>hit_x_tpc_good[nhit_good]) x_min = hit_x_tpc_good[nhit_good];
3105 if(x_max<hit_x_tpc_good[nhit_good]) x_max = hit_x_tpc_good[nhit_good];
3109 double track_phi,track_x,track_y,track_z,radius, angle_xy;
3110 if(test_layer_id_all==-1) test_layer_id_all= track_test_layerid;
3111 if(test_sheet_id_all==-1) test_sheet_id_all= track_test_sheetid;
3113 if(track_test_layerid == 0 && track_test_sheetid == 0){
3114 track_phi = track_phi1bot_loc;
3115 track_x = track_x1bot_glo;
3116 track_y = track_y1bot_glo;
3117 track_z = track_z1bot_glo;
3118 radius = anode_mid_gap_radius[0];
3119 angle_xy = ang_xy_L1;
3122 if(track_test_layerid == 0 && track_test_sheetid == 1){
3123 track_phi = track_phi1top_loc;
3124 track_x = track_x1top_glo;
3125 track_y = track_y1top_glo;
3126 track_z = track_z1top_glo;
3127 radius = anode_mid_gap_radius[0];
3128 angle_xy = ang_xy_L1;
3131 if(track_test_layerid == 1 && track_test_sheetid == 0){
3132 track_phi = track_phi2bot_loc;
3133 track_x = track_x2bot_glo;
3134 track_y = track_y2bot_glo;
3135 track_z = track_z2bot_glo;
3136 radius = anode_mid_gap_radius[1];
3137 angle_xy = ang_xy_L2;
3140 if(track_test_layerid == 1 && track_test_sheetid == 1){
3141 track_phi = track_phi2top_loc;
3142 track_x = track_x2top_glo;
3143 track_y = track_y2top_glo;
3144 track_z = track_z2top_glo;
3145 radius = anode_mid_gap_radius[1];
3146 angle_xy = ang_xy_L2;
3149 if(track_test_layerid == 2 && track_test_sheetid == 0){
3150 track_phi = track_phi3bot_loc;
3151 track_x = track_x3bot_glo;
3152 track_y = track_y3bot_glo;
3153 track_z = track_z3bot_glo;
3154 radius = anode_mid_gap_radius[2];
3155 angle_xy = ang_xy_L3;
3158 if(track_test_layerid == 2 && track_test_sheetid == 1){
3159 track_phi = track_phi3top_loc;
3160 track_x = track_x3top_glo;
3161 track_y = track_y3top_glo;
3162 track_z = track_z3top_glo;
3163 radius = anode_mid_gap_radius[2];
3164 angle_xy = ang_xy_L3;
3167 double phi_trk = track_phi;
3168 double x_trk = radius*(
cos(phi_trk));
3169 double m_trk =
tan((0.5*TMath::Pi()-angle_xy));
3170 if(track_x1bot_glo<0) m_trk*=-1;
3172 double x0 = x_trk - delta;
3173 double y0 = 2.5 - delta*m_trk;
3174 double x1 = x_trk + delta;
3175 double y1 = 2.5 + delta*m_trk;
3176 double x_tpc = radius*
cos(cluster_1d_phi_tpc[idx]);
3177 double x_cc = radius*
cos(cluster_1d_phi_cc[idx]);
3178 double y_tpc = radius*
sin(cluster_1d_phi_tpc[idx]);
3179 if(cluster_1d_phi_tpc[idx]==9999) x_tpc=9999;
3181 double x_2d = radius*
cos(cluster_2d_phi[ID2D]);
3182 double y_2d = radius*
sin(cluster_2d_phi[ID2D]);
3183 double z_2d = cluster_2d_z[ID2D];
3184 double q_2d = cluster_2d_q[ID2D];
3194 bool fire_tpc =
abs(x_tpc-x_trk)<res_cut;
3195 bool fire_cc =
abs( x_cc-x_trk)<res_cut;
3196 float diff = (x_cc-x_tpc);
3197 h_map_xy_event_trk ->Fill(track_x, track_y);
3198 h_map_xz_event_trk ->Fill(track_x, track_z);
3199 h_map_xy_2d ->Fill(x_2d , y_2d);
3200 h_map_xz_2d ->Fill(x_2d , z_2d);
3201 if(x_tpc!=9999) h_map_xy_1d_tpc ->Fill(x_tpc , y_tpc);
3202 if(x_tpc!=9999) h_map_xz_1d_tpc ->Fill(x_tpc , z_2d);
3203 if(x_tpc!=9999) h_map_xy_tpc_eff ->Fill(track_x, track_y, fire_tpc);
3204 if(x_tpc!=9999) h_map_xz_tpc_eff ->Fill(track_x, track_z, fire_tpc);
3205 if(x_tpc==9999) h_map_xy_tpc_fail ->Fill(track_x, track_y);
3206 if(x_tpc==9999) h_map_xz_tpc_fail ->Fill(track_x, track_z);
3207 h_map_xy_cc_eff ->Fill(track_x, track_y, fire_cc);
3208 h_map_xz_cc_eff ->Fill(track_x, track_z, fire_cc);
3209 if(x_tpc!=9999) h_map_xy_cc_tpc_diff->Fill(track_x, track_y, diff);
3210 if(x_tpc!=9999) h_map_xz_cc_tpc_diff->Fill(track_x, track_z, diff);
3212 h_map_xy_q2d ->Fill(track_x, track_y, q_2d);
3213 h_map_xz_q2d ->Fill(track_x, track_z, q_2d);
3214 int nbinX = h_map_xy_dT->GetNbinsX();
3215 int nbinY = h_map_xy_dT->GetNbinsY();
3216 int nbinZ = h_map_xz_dT->GetNbinsY();
3217 float rangeX = h_map_xy_dT->GetXaxis()->GetBinCenter(h_map_xy_dT->GetXaxis()->GetLast())-h_map_xy_dT->GetXaxis()->GetBinCenter(1)+h_map_xy_dT->GetXaxis()->GetBinWidth(1);
3218 float rangeY = h_map_xy_dT->GetYaxis()->GetBinCenter(h_map_xy_dT->GetYaxis()->GetLast())-h_map_xy_dT->GetYaxis()->GetBinCenter(1)+h_map_xy_dT->GetYaxis()->GetBinWidth(1);
3219 float rangeZ = h_map_xz_dT->GetYaxis()->GetBinCenter(h_map_xz_dT->GetYaxis()->GetLast())-h_map_xz_dT->GetYaxis()->GetBinCenter(1)+h_map_xz_dT->GetYaxis()->GetBinWidth(1);
3220 float x0 = h_map_xy_dT->GetXaxis()->GetBinCenter(1)+0.5*h_map_xy_dT->GetXaxis()->GetBinWidth(1);
3221 float y0 = h_map_xy_dT->GetYaxis()->GetBinCenter(1)+0.5*h_map_xy_dT->GetYaxis()->GetBinWidth(1);
3222 float z0 = h_map_xz_dT->GetYaxis()->GetBinCenter(1)+0.5*h_map_xz_dT->GetYaxis()->GetBinWidth(1);
3223 int xbin = (track_x-x0)/rangeX*nbinX;
3224 int ybin = (track_y-y0)/rangeY*nbinY;
3225 int zbin = (track_z-z0)/rangeZ*nbinZ;
3227 for(
int IDS=0; IDS<nhit; IDS++){
3228 if(hit_strip[IDS]>=cluster_1d_strip1[idx] && hit_strip[IDS]<=cluster_1d_strip2[idx] && hit_layer[IDS]==layer && hit_sheet[IDS]==sheet && hit_view[IDS]==view){
3230 vector_time_xy[xbin][ybin].push_back(
time);
3231 vector_time_xz[xbin][zbin].push_back(
time);
3234 for(
int IDS=0; IDS<nhit; IDS++){
3235 if(hit_strip[IDS]>=cluster_1d_strip1[idv] && hit_strip[IDS]<=cluster_1d_strip2[idv] && hit_layer[IDS]==layer && hit_sheet[IDS]==sheet && hit_view[IDS]==view){
3237 vector_time_xy[xbin][ybin].push_back(
time);
3238 vector_time_xz[xbin][zbin].push_back(
time);
3266 TCanvas *
c1 =
new TCanvas(
"c1",
"c1",800,600);
3267 if(cluster_1d_phi_tpc[idx]!=9999 && nhit_good>1){
3268 TGraphErrors *g =
new TGraphErrors(nhit_good,hit_x_tpc_good,hit_z_tpc_good,hit_ex_tpc_good,hit_ez_tpc_good);
3269 g->SetMarkerStyle(20);
3270 g->SetMarkerSize(1.0);
3271 g->SetMarkerColor(2);
3273 g->GetYaxis()->SetRangeUser(-2,7);
3274 TAxis *axis = g->GetXaxis();
3275 axis->SetLimits((x_min-1),(x_max+1));
3276 TF1 *tpc_fit =
new TF1(
"tpc_fit",
"pol1");
3277 g->Fit(
"tpc_fit",
"Q");
3278 TLine *line_x_tpc =
new TLine(x_tpc,-2,x_tpc,7);
3279 line_x_tpc->SetLineColor(2);
3280 line_x_tpc->Draw(
"same");
3281 TLine *line_x_fit =
new TLine(x_trk,-2,x_trk,7);
3282 line_x_fit->SetLineColor(6);
3283 line_x_fit->Draw(
"same");
3284 TLine *line_trk =
new TLine(x0,y0,x1,y1);
3285 line_trk->SetLineColor(6);
3286 line_trk->SetLineStyle(2);
3287 line_trk->Draw(
"same");
3288 TLine *line_mid =
new TLine(-1000,2.5,1000,2.5);
3289 line_mid->SetLineColor(4);
3290 line_mid->SetLineStyle(2);
3291 line_mid->Draw(
"same");
3292 TLine *line_up =
new TLine(-1000,5,1000,5);
3293 line_up->SetLineColor(4);
3294 line_up->SetLineStyle(2);
3295 line_up->Draw(
"same");
3296 TLine *line_dw =
new TLine(-1000,0,1000,0);
3297 line_dw->SetLineColor(4);
3298 line_dw->SetLineStyle(2);
3299 line_dw->Draw(
"same");
3301 double ang_trk = -(angle_xy)*TMath::RadToDeg();
3302 if(track_x>0) ang_trk*=-1;
3306 double ang_tpc = atan(tpc_fit->GetParameter(1))*TMath::RadToDeg();
3307 if(ang_tpc>0) ang_tpc = (90-ang_tpc);
3308 else ang_tpc = -(90+ang_tpc);
3309 h_ang_tpc->Fill(ang_tpc);
3311 if(x_tpc!=9999 &&
abs(ang_tpc)>5 &&
abs(x_tpc-x_trk)<res_cut && ang_tpc<0){
3312 h_ang_trk_meas ->Fill(ang_trk,ang_tpc);
3313 h_ang_diff_vs_trk ->Fill(ang_trk,ang_trk-ang_tpc);
3314 h_ang_diff ->Fill(ang_trk-ang_tpc);
3319 int deg5 = (int)(ang_xy_L1*TMath::RadToDeg()/5)*5;
3320 if(track_x>0) deg5*=-1;
3324 if(
abs(x_tpc-x_trk)<res_cut) name_plot=Form(
"/Angle_%i_IN_clus_tpc_%i.png" ,deg5,event);
3325 else name_plot=Form(
"/Angle_%i_OUT_clus_tpc_%i.png",deg5,event);
3326 name_plot = output_path_tpc+name_plot;
3327 if(bool_plot_tpc)
c1->SaveAs(name_plot);
3340 bool efficient_tpc =
abs(x_tpc-x_trk)<res_cut;
3341 return efficient_tpc;
3418 h_map_xy_event_trk->GetXaxis()->SetTitle(
"X pos [mm]");
3419 h_map_xy_event_trk->GetYaxis()->SetTitle(
"Y pos [mm]");
3420 h_map_xz_event_trk->GetXaxis()->SetTitle(
"X pos [mm]");
3421 h_map_xz_event_trk->GetYaxis()->SetTitle(
"Z pos [mm]");
3423 h_map_xy_tpc_eff->GetXaxis()->SetTitle(
"X pos [mm]");
3424 h_map_xy_tpc_eff->GetYaxis()->SetTitle(
"Y pos [mm]");
3425 h_map_xz_tpc_eff->GetXaxis()->SetTitle(
"X pos [mm]");
3426 h_map_xz_tpc_eff->GetYaxis()->SetTitle(
"Z pos [mm]");
3428 h_map_xy_cc_tpc_diff->GetXaxis()->SetTitle(
"X pos [mm]");
3429 h_map_xy_cc_tpc_diff->GetYaxis()->SetTitle(
"Y pos [mm]");
3430 h_map_xz_cc_tpc_diff->GetXaxis()->SetTitle(
"X pos [mm]");
3431 h_map_xz_cc_tpc_diff->GetYaxis()->SetTitle(
"Z pos [mm]");
3433 h_map_xy_cc_tpc_diff2->GetXaxis()->SetTitle(
"X pos [mm]");
3434 h_map_xy_cc_tpc_diff2->GetYaxis()->SetTitle(
"Y pos [mm]");
3435 h_map_xz_cc_tpc_diff2->GetXaxis()->SetTitle(
"X pos [mm]");
3436 h_map_xz_cc_tpc_diff2->GetYaxis()->SetTitle(
"Z pos [mm]");
3439 for(
int ii=1;ii<=h_map_xy_event_trk->GetNbinsX();ii++){
3440 for(
int jj=1;jj<=h_map_xy_event_trk->GetNbinsY();jj++){
3442 int Nxy = h_map_xy_tpc_eff ->GetBinContent(ii,jj);
3443 int NXY = h_map_xy_cc_eff ->GetBinContent(ii,jj);
3444 int FXY = h_map_xy_tpc_fail ->GetBinContent(ii,jj);
3445 int Dxy = h_map_xy_event_trk ->GetBinContent(ii,jj);
3446 float DDxy = h_map_xy_cc_tpc_diff->GetBinContent(ii,jj);
3447 float Qxy = h_map_xy_q2d ->GetBinContent(ii,jj);
3448 float Exy = (float)Nxy/Dxy;
3449 float EXY = (float)NXY/Dxy;
3450 float FFXY = (float)FXY/Dxy;
3451 float DDxy_norm = (float)DDxy/Dxy;
3453 if(NXY) QXY= (float)Qxy/NXY;
3455 if(Nxy && Dxy) h_map_xy_tpc_eff ->SetBinContent(ii,jj,Exy);
3456 if(NXY && Dxy) h_map_xy_cc_eff ->SetBinContent(ii,jj,EXY);
3457 if(FXY && Dxy) h_map_xy_tpc_fail ->SetBinContent(ii,jj,FFXY);
3459 if(DDxy && Dxy && DDxy_norm)
3460 h_map_xy_cc_tpc_diff->SetBinContent(ii,jj,DDxy_norm);
3461 if(
abs(h_map_xy_cc_tpc_diff->GetBinContent(ii,jj))>0.01)
3462 h_map_xy_cc_tpc_diff2->Fill(ii,jj,h_map_xy_cc_tpc_diff->GetBinContent(ii,jj));
3464 if(NXY && QXY) h_map_xy_q2d ->SetBinContent(ii,jj,QXY);
3466 if(vector_time_xy[ii][jj].size()){
3467 TH1F *h_timemap_XY =
new TH1F(Form(
"h_timemap_XY_%i_%i",ii,jj),
"h_timemap_XY",96,-9400,-8800);
3468 for(
int iv=0;iv<vector_time_xy[ii][jj].size();iv++){
3469 h_timemap_XY->Fill(vector_time_xy[ii][jj].
at(iv));
3471 if(h_timemap_XY->GetMaximum()<10)
continue;
3472 float baseline_time_xy = 0;
3473 for(
int ibin=1;ibin<6;ibin++) baseline_time_xy+=h_timemap_XY->GetBinContent(ibin);
3474 baseline_time_xy/=5;
3475 float maximum_time_xy = h_timemap_XY->GetMaximum()-baseline_time_xy;
3476 float rising_time_xy = 0;
3477 for(
int ibin=h_timemap_XY->GetMaximumBin();ibin>1;ibin--){
3478 if(h_timemap_XY->GetBinContent(ibin)-baseline_time_xy < 0.3*maximum_time_xy) {
3479 rising_time_xy = h_timemap_XY->GetBinCenter(ibin);
3483 float falling_time_xy = 0;
3484 for(
int ibin=h_timemap_XY->GetMaximumBin();ibin<200;ibin++){
3485 if(h_timemap_XY->GetBinContent(ibin)-baseline_time_xy < 0.3*maximum_time_xy) {
3486 falling_time_xy = h_timemap_XY->GetBinCenter(ibin);
3490 float delta_time_xy = falling_time_xy-rising_time_xy;
3491 h_map_xy_dT->SetBinContent(ii,jj,delta_time_xy);
3494 int Nxz = h_map_xz_tpc_eff ->GetBinContent(ii,jj);
3495 int NXZ = h_map_xz_cc_eff ->GetBinContent(ii,jj);
3496 int FXZ = h_map_xz_tpc_fail ->GetBinContent(ii,jj);
3497 int Dxz = h_map_xz_event_trk ->GetBinContent(ii,jj);
3498 float DDxz = h_map_xz_cc_tpc_diff->GetBinContent(ii,jj);
3499 float Qxz = h_map_xz_q2d ->GetBinContent(ii,jj);
3500 float Exz = (float)Nxz/Dxz;
3501 float EXZ = (float)NXZ/Dxz;
3502 float FFXZ= (float)FXZ/Dxz;
3503 float DDxz_norm =(float)DDxz/Dxz;
3505 if(NXZ) QXZ= (float)Qxz/NXZ;
3507 if(Nxz && Dxz) h_map_xz_tpc_eff ->SetBinContent(ii,jj,Exz);
3508 if(NXZ && Dxz) h_map_xz_cc_eff ->SetBinContent(ii,jj,EXZ);
3509 if(FXZ && Dxz) h_map_xz_tpc_fail ->SetBinContent(ii,jj,FFXZ);
3511 if(DDxz && Dxz && DDxz_norm) h_map_xz_cc_tpc_diff->SetBinContent(ii,jj,DDxz_norm);
3512 if(
abs(h_map_xz_cc_tpc_diff->GetBinContent(ii,jj))>0.01) h_map_xz_cc_tpc_diff2->Fill(ii,jj,h_map_xz_cc_tpc_diff->GetBinContent(ii,jj));
3514 if(NXZ && QXZ) h_map_xz_q2d ->SetBinContent(ii,jj,QXZ);
3516 if(vector_time_xz[ii][jj].size()){
3517 TH1F *h_timemap_XZ =
new TH1F(Form(
"h_timemap_XZ_%i_%i",ii,jj),
"h_timemap_XZ",96,-9400,-8800);
3518 for(
int iv=0;iv<vector_time_xz[ii][jj].size();iv++){
3519 h_timemap_XZ->Fill(vector_time_xz[ii][jj].
at(iv));
3521 if(h_timemap_XZ->GetMaximum()<10)
continue;
3522 float baseline_time_xz = 0;
3526 for(
int ibin=1;ibin<6;ibin++) baseline_time_xz+=h_timemap_XZ->GetBinContent(ibin);
3527 baseline_time_xz/=5;
3528 float maximum_time_xz = h_timemap_XZ->GetMaximum()-baseline_time_xz;
3533 float rising_time_xz = 0;
3534 for(
int ibin=h_timemap_XZ->GetMaximumBin();ibin>1;ibin--){
3536 if(h_timemap_XZ->GetBinContent(ibin)-baseline_time_xz < 0.3*maximum_time_xz) {
3538 rising_time_xz = h_timemap_XZ->GetBinCenter(ibin);
3542 float falling_time_xz = 0;
3543 for(
int ibin=h_timemap_XZ->GetMaximumBin();ibin<200;ibin++){
3545 if(h_timemap_XZ->GetBinContent(ibin)-baseline_time_xz < 0.3*maximum_time_xz) {
3547 falling_time_xz = h_timemap_XZ->GetBinCenter(ibin);
3551 float delta_time_xz = falling_time_xz-rising_time_xz;
3553 h_map_xz_dT->SetBinContent(ii,jj,delta_time_xz);
3561 output-> mkdir(
"tpc_histo",
"histograms of fitted tracks");
3562 output->cd(
"tpc_histo");
3565 cout<<
"Size: "<<i<<endl;
3566 for(
int j=0;j<i;j++){
3568 y_deltaX[j] =h_deltaX_order_size[j][i]->GetMean();
3569 ey_deltaX[j]=h_deltaX_order_size[j][i]->GetMeanError();
3570 y_deltaZ[j] =h_deltaZ_order_size[j][i]->GetMean();
3571 ey_deltaZ[j]=h_deltaZ_order_size[j][i]->GetMeanError();
3573 deltaX_order_L1[i] =
new TGraphErrors(i,x_order,y_deltaX,0,ey_deltaX);
3574 deltaX_order_L1[i]->Draw(
"AP");
3575 deltaX_order_L1[i]->Fit(f_deltaX[i],
"Q",
"",0.5,
maxclusize);
3577 deltaX_order_L1[i]->Write(Form(
"deltaX_order_L1_size_%i",i));
3578 deltaZ_order_L1[i] =
new TGraphErrors(i,x_order,y_deltaZ,0,ey_deltaZ);
3579 deltaZ_order_L1[i]->Draw(
"AP");
3580 deltaZ_order_L1[i]->Fit(f_deltaZ[i],
"Q",
"",0.5,
maxclusize);
3582 deltaZ_order_L1[i]->Write(Form(
"deltaZ_order_L1_size_%i",i));
3584 y_deltaX_par0 [i-size_init] = f_deltaX[i]->GetParameter(0);
3585 ey_deltaX_par0[i-size_init] = f_deltaX[i]->GetParError(0);
3586 y_deltaX_par1 [i-size_init] = f_deltaX[i]->GetParameter(1);
3587 ey_deltaX_par1[i-size_init] = f_deltaX[i]->GetParError(1);
3588 y_deltaZ_par0 [i-size_init] = f_deltaZ[i]->GetParameter(0);
3589 ey_deltaZ_par0[i-size_init] = f_deltaZ[i]->GetParError(0);
3590 y_deltaZ_par1 [i-size_init] = f_deltaZ[i]->GetParameter(1);
3591 ey_deltaZ_par1[i-size_init] = f_deltaZ[i]->GetParError(1);
3592 xx_order [i-size_init] = i;
3594 cout<<
"f(0): "<<f_deltaX[i]->GetParameter(0)<<
" y0: "<<y_deltaX[0]<<
" diff: "<<f_deltaX[i]->GetParameter(0)-y_deltaX[0]<<endl;
3596 y_shift0[i-size_init] =f_deltaX[i]->GetParameter(0)-y_deltaX[0];
3598 ey_shift0[i-size_init]=f_deltaX[i]->GetParError(0);
3605 deltaX_par0 =
new TGraphErrors(
maxclusize-size_init,xx_order,y_deltaX_par0,0,ey_deltaX_par0);
3606 deltaX_par0->Fit(
"pol1");
3607 deltaX_par1 =
new TGraphErrors(
maxclusize-size_init,xx_order,y_deltaX_par1,0,ey_deltaX_par1);
3608 deltaX_par1->Fit(
"pol1");
3609 deltaZ_par0 =
new TGraphErrors(
maxclusize-size_init,xx_order,y_deltaZ_par0,0,ey_deltaZ_par0);
3610 deltaZ_par1 =
new TGraphErrors(
maxclusize-size_init,xx_order,y_deltaZ_par1,0,ey_deltaZ_par1);
3611 shift0 =
new TGraphErrors(
maxclusize-size_init,xx_order,y_shift0,0,ey_shift0);
3612 shift0->Fit(
"pol1");
3614 deltaX_par0->Write(
"deltaX_par0");
3615 deltaX_par1->Write(
"deltaX_par1");
3616 deltaZ_par0->Write(
"deltaZ_par0");
3617 deltaZ_par1->Write(
"deltaZ_par1");
3618 shift0->Write(
"shift0");