208 cout <<
"define_hit_histo" << endl;
210 double hit_mintime = -10000;
211 double hit_maxtime = -8000;
212 double hit_maxcharge = 70;
214 TString dname =
"hit_histo";
215 output->mkdir(dname,
"histograms for all the hits");
220 h_nofhit_L1_S1_x =
new TH1F(
"h_nofhit_L1_S1_x",
"number of hits in L1, S1, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
221 h_nofhit_L1_S2_x =
new TH1F(
"h_nofhit_L1_S2_x",
"number of hits in L1, S2, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
222 h_nofhit_L2_S1_x =
new TH1F(
"h_nofhit_L2_S1_x",
"number of hits in L2, S1, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
223 h_nofhit_L2_S2_x =
new TH1F(
"h_nofhit_L2_S2_x",
"number of hits in L2, S2, x view",
MAXNOFHITS, 0,
MAXNOFHITS);
225 h_nofhit_L1_S1_v =
new TH1F(
"h_nofhit_L1_S1_v",
"number of hits in L1, S1, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
226 h_nofhit_L2_S1_v =
new TH1F(
"h_nofhit_L2_S1_v",
"number of hits in L2, S1, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
227 h_nofhit_L2_S2_v =
new TH1F(
"h_nofhit_L2_S2_v",
"number of hits in L2, S2, v view",
MAXNOFHITS, 0,
MAXNOFHITS);
231 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);
232 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);
233 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);
234 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);
236 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);
237 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);
238 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);
242 h_hit_time_L1_S1_x =
new TH1F(
"h_hit_time_L1_S1_x",
"hit time (ns) in L1, S1, x view", 100, hit_mintime, hit_maxtime);
243 h_hit_time_L1_S2_x =
new TH1F(
"h_hit_time_L1_S2_x",
"hit time (ns) in L1, S2, x view", 100, hit_mintime, hit_maxtime);
244 h_hit_time_L2_S1_x =
new TH1F(
"h_hit_time_L2_S1_x",
"hit time (ns) in L2, S1, x view", 100, hit_mintime, hit_maxtime);
245 h_hit_time_L2_S2_x =
new TH1F(
"h_hit_time_L2_S2_x",
"hit time (ns) in L2, S2, x view", 100, hit_mintime, hit_maxtime);
247 h_hit_time_L1_S1_v =
new TH1F(
"h_hit_time_L1_S1_v",
"hit time (ns) in L1, S1, v view", 100, hit_mintime, hit_maxtime);
248 h_hit_time_L2_S1_v =
new TH1F(
"h_hit_time_L2_S1_v",
"hit time (ns) in L2, S1, v view", 100, hit_mintime, hit_maxtime);
249 h_hit_time_L2_S2_v =
new TH1F(
"h_hit_time_L2_S2_v",
"hit time (ns) in L2, S2, v view", 100, hit_mintime, hit_maxtime);
253 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);
254 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);
255 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);
256 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);
258 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);
259 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);
260 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);
264 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, 100, hit_mintime, hit_maxtime);
265 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, 100, hit_mintime, hit_maxtime);
266 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, 100, hit_mintime, hit_maxtime);
267 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, 100, hit_mintime, hit_maxtime);
269 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, 100, hit_mintime, hit_maxtime);
270 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, 100, hit_mintime, hit_maxtime);
271 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, 100, hit_mintime, hit_maxtime);
275 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
276 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
277 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
278 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
280 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
281 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
282 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", 100, hit_mintime, hit_maxtime, hit_maxcharge, 0, hit_maxcharge);
286 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);
287 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);
288 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);
294 cout <<
"define_hit_in_time_histo" << endl;
296 double hit_mintime = -10000;
297 double hit_maxtime = -8000;
298 double hit_maxcharge = 70;
300 TString dname =
"hit_in_time_histo";
301 output-> mkdir(dname,
"histograms for the hits in time window");
306 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);
307 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);
308 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);
309 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);
311 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);
312 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);
313 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);
317 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);
318 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);
319 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);
320 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);
322 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);
323 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);
324 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);
328 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);
329 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);
330 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);
331 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);
333 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);
334 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);
335 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);
342 cout <<
"define_cluster1d_histo" << endl;
344 double cluster1d_max_charge = 250;
345 double cluster1d_max_size = 40;
347 TString dname =
"cluster1d_histo";
348 output-> mkdir(dname,
"histograms of all cluster 1D");
353 h_nofcluster1d_L1_S1_x =
new TH1F(
"h_nofcluster1d_L1_S1_x",
"number of cluster1d in L1, S1, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
354 h_nofcluster1d_L1_S2_x =
new TH1F(
"h_nofcluster1d_L1_S2_x",
"number of cluster1d in L1, S2, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
355 h_nofcluster1d_L2_S1_x =
new TH1F(
"h_nofcluster1d_L2_S1_x",
"number of cluster1d in L2, S1, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
356 h_nofcluster1d_L2_S2_x =
new TH1F(
"h_nofcluster1d_L2_S2_x",
"number of cluster1d in L2, S2, x view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
358 h_nofcluster1d_L1_S1_v =
new TH1F(
"h_nofcluster1d_L1_S1_v",
"number of cluster1d in L1, S1, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
359 h_nofcluster1d_L2_S1_v =
new TH1F(
"h_nofcluster1d_L2_S1_v",
"number of cluster1d in L2, S1, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
360 h_nofcluster1d_L2_S2_v =
new TH1F(
"h_nofcluster1d_L2_S2_v",
"number of cluster1d in L2, S2, v view",
MAXNOFCLUSTERS, 0,
MAXNOFCLUSTERS);
364 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);
365 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);
366 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);
367 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);
369 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);
370 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);
371 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);
374 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);
375 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);
376 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);
377 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);
380 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);
381 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);
382 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);
389 cout <<
"define_cluster_selected_histo" << endl;
391 double cluster1d_max_charge = 250;
392 double cluster1d_max_size = 40;
394 TString dname =
"cluster_selected_histo";
395 output->mkdir(dname,
"histograms of cluster 1D and 2D from selected clusters");
399 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);
400 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);
401 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);
402 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);
404 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);
405 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);
406 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);
407 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);
411 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);
412 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);
413 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);
414 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);
416 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);
417 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);
418 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);
419 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);
421 double cluster2d_max_charge = 500;
422 double cluster2d_max_size = 40;
425 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);
426 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);
427 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);
428 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);
460 cout <<
"define_cluster2d_histo" << endl;
462 double cluster2d_max_charge = 500;
463 double cluster2d_max_size = 40;
465 TString dname =
"cluster2d_histo";
466 output-> mkdir(dname,
"histograms of all cluster 2D");
482 h_cluster2d_charge_vs_phi_L1_S1 =
new TH2F(
"h_cluster2d_charge_vs_phi_L1_S1",
"cluster2d charge (fC) vs phi (deg) in L1, S1", 180, -180, 0, cluster2d_max_charge, 0, cluster2d_max_charge);
483 h_cluster2d_charge_vs_phi_L1_S2 =
new TH2F(
"h_cluster2d_charge_vs_phi_L1_S2",
"cluster2d charge (fC) vs phi (deg) in L1, S2", 180, 0, 180, cluster2d_max_charge, 0, cluster2d_max_charge);
484 h_cluster2d_charge_vs_phi_L2_S1 =
new TH2F(
"h_cluster2d_charge_vs_phi_L2_S1",
"cluster2d charge (fC) vs phi (deg) in L2, S1", 180, -180, 0, cluster2d_max_charge, 0, cluster2d_max_charge);
485 h_cluster2d_charge_vs_phi_L2_S2 =
new TH2F(
"h_cluster2d_charge_vs_phi_L2_S2",
"cluster2d charge (fC) vs phi (deg) in L2, S2", 180, 0, 180, cluster2d_max_charge, 0, cluster2d_max_charge);
488 h_cluster2d_charge_vs_z_L1_S1 =
new TH2F(
"h_cluster2d_charge_vs_z_L1_S1",
"cluster2d charge (fC) vs z (mm) in L1, S1",
MAXLENGTH_L1_x, -0.5*
MAXLENGTH_L1_x-20, 0.5*
MAXLENGTH_L1_x+20, cluster2d_max_charge, 0, cluster2d_max_charge);
489 h_cluster2d_charge_vs_z_L1_S2 =
new TH2F(
"h_cluster2d_charge_vs_z_L1_S2",
"cluster2d charge (fC) vs z (mm) in L1, S2",
MAXLENGTH_L1_x, -0.5*
MAXLENGTH_L1_x-20, 0.5*
MAXLENGTH_L1_x+20, cluster2d_max_charge, 0, cluster2d_max_charge);
490 h_cluster2d_charge_vs_z_L2_S1 =
new TH2F(
"h_cluster2d_charge_vs_z_L2_S1",
"cluster2d charge (fC) vs z (mm) in L2, S1",
MAXLENGTH_L2_x, -0.5*
MAXLENGTH_L2_x-20, 0.5*
MAXLENGTH_L2_x+20, cluster2d_max_charge, 0, cluster2d_max_charge);
491 h_cluster2d_charge_vs_z_L2_S2 =
new TH2F(
"h_cluster2d_charge_vs_z_L2_S2",
"cluster2d charge (fC) vs z (mm) in L2, S2",
MAXLENGTH_L2_x, -0.5*
MAXLENGTH_L2_x-20, 0.5*
MAXLENGTH_L2_x+20, cluster2d_max_charge, 0, cluster2d_max_charge);
505 cout <<
"define_track_histo" << endl;
507 TString dname =
"track_histo";
508 output-> mkdir(dname,
"histograms of fitted tracks");
515 h_track_chi2 =
new TH1F(
"h_track_chi2",
"fitted track chi2", 8000, 0, 8000);
518 h_track_xpoca =
new TH1F(
"h_track_xpoca",
"fitted track point of closest approach x (mm)", 100, -100, 100);
519 h_track_ypoca =
new TH1F(
"h_track_ypoca",
"fitted track point of closest approach y (mm)", 100, -100, 100);
520 h_track_zpoca =
new TH1F(
"h_track_zpoca",
"fitted track point of closest approach z (mm)", 100, -150, 150);
524 h_test_residual_rphi =
new TH1F(
"h_test_residual_rphi",
"test plane: residual in R * phi (mm)", 100, -5, 5);
525 h_test_res_rphi_vs_chi2 =
new TH2F(
"h_test_res_rphi_vs_chi2",
"test plane: residual in R * phi (mm) vs chi2", 100, -5, 5, 1000, 0, 1000);
528 h_test_residual_rphi_tpc =
new TH1F(
"h_test_residual_rphi_tpc",
"test plane: TPC residual in R * phi (mm)", 100, -5, 5);
529 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, -5, 5, 1000, 0, 1000);
532 h_test_residual_z =
new TH1F(
"h_test_residual_z",
"test plane: residual in z (mm)", 100, -5, 5);
533 h_test_res_z_vs_chi2 =
new TH2F(
"h_test_res_z_vs_chi2",
"test plane: residual in z (mm) vs chi2", 100, -5, 5, 1000, 0, 1000);
536 h_test_residual_z_tpc =
new TH1F(
"h_test_residual_z_tpc",
"test plane: TPC residual in z (mm)", 100, -5, 5);
537 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, -5, 5, 1000, 0, 1000);
541 h_residual_rphi_L1_S1 =
new TH1F(
"h_residual_rphi_L1_S1",
"residual in R * phi (mm) on L1, S1", 100, -5, 5);
542 h_residual_rphi_L1_S2 =
new TH1F(
"h_residual_rphi_L1_S2",
"residual in R * phi (mm) on L1, S2", 100, -5, 5);
543 h_residual_rphi_L2_S1 =
new TH1F(
"h_residual_rphi_L2_S1",
"residual in R * phi (mm) on L2, S1", 100, -5, 5);
544 h_residual_rphi_L2_S2 =
new TH1F(
"h_residual_rphi_L2_S2",
"residual in R * phi (mm) on L2, S2", 100, -5, 5);
546 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, -5, 5, 1000, 0, 1000);
547 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, -5, 5, 1000, 0, 1000);
548 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, -5, 5, 1000, 0, 1000);
549 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, -5, 5, 1000, 0, 1000);
552 h_residual_rphi_L1_S1_tpc =
new TH1F(
"h_residual_rphi_L1_S1_tpc",
"TPC residual in R * phi (mm) on L1, S1", 100, -5, 5);
553 h_residual_rphi_L1_S2_tpc =
new TH1F(
"h_residual_rphi_L1_S2_tpc",
"TPC residual in R * phi (mm) on L1, S2", 100, -5, 5);
554 h_residual_rphi_L2_S1_tpc =
new TH1F(
"h_residual_rphi_L2_S1_tpc",
"TPC residual in R * phi (mm) on L2, S1", 100, -5, 5);
555 h_residual_rphi_L2_S2_tpc =
new TH1F(
"h_residual_rphi_L2_S2_tpc",
"TPC residual in R * phi (mm) on L2, S2", 100, -5, 5);
557 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, -5, 5, 1000, 0, 1000);
558 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, -5, 5, 1000, 0, 1000);
559 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, -5, 5, 1000, 0, 1000);
560 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, -5, 5, 1000, 0, 1000);
563 h_residual_z_L1_S1 =
new TH1F(
"h_residual_z_L1_S1",
"residual in z (mm) on L1, S1", 100, -5, 5);
564 h_residual_z_L1_S2 =
new TH1F(
"h_residual_z_L1_S2",
"residual in z (mm) on L1, S2", 100, -5, 5);
565 h_residual_z_L2_S1 =
new TH1F(
"h_residual_z_L2_S1",
"residual in z (mm) on L2, S1", 100, -5, 5);
566 h_residual_z_L2_S2 =
new TH1F(
"h_residual_z_L2_S2",
"residual in z (mm) on L2, S2", 100, -5, 5);
568 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, -5, 5, 1000, 0, 1000);
569 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, -5, 5, 1000, 0, 1000);
570 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, -5, 5, 1000, 0, 1000);
571 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, -5, 5, 1000, 0, 1000);
574 h_residual_z_L1_S1_tpc =
new TH1F(
"h_residual_z_L1_S1_tpc",
"TPC residual in z (mm) on L1, S1", 100, -5, 5);
575 h_residual_z_L1_S2_tpc =
new TH1F(
"h_residual_z_L1_S2_tpc",
"TPC residual in z (mm) on L1, S2", 100, -5, 5);
576 h_residual_z_L2_S1_tpc =
new TH1F(
"h_residual_z_L2_S1_tpc",
"TPC residual in z (mm) on L2, S1", 100, -5, 5);
577 h_residual_z_L2_S2_tpc =
new TH1F(
"h_residual_z_L2_S2_tpc",
"TPC residual in z (mm) on L2, S2", 100, -5, 5);
579 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, -5, 5, 1000, 0, 1000);
580 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, -5, 5, 1000, 0, 1000);
581 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, -5, 5, 1000, 0, 1000);
582 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, -5, 5, 1000, 0, 1000);
585 h_signal_charge_2d =
new TH1F(
"h_signal_charge_2d",
"total charge of the signal (fC)", 500, 0, 500);
586 h_signal_charge_1d_x =
new TH1F(
"h_signal_charge_1d_x",
"charge x of the signal (fC)", 500, 0, 500);
587 h_signal_charge_1d_v =
new TH1F(
"h_signal_charge_1d_v",
"charge v of the signal (fC)", 500, 0, 500);
588 h_signal_size_1d_x =
new TH1F(
"h_signal_size_1d_x",
"cl.size x of the signal", 50, 0, 50);
589 h_signal_size_1d_v =
new TH1F(
"h_signal_size_1d_v",
"cl.size v of the signal", 50, 0, 50);
591 h_signal_charge_2d_chi2cut =
new TH1F(
"h_signal_charge_2d_chi2cut",
"total charge of the signal (fC) with a chi2 cut", 500, 0, 500);
592 h_signal_charge_1d_x_chi2cut =
new TH1F(
"h_signal_charge_1d_x_chi2cut",
"charge x of the signal (fC) with a chi2 cut", 500, 0, 500);
593 h_signal_charge_1d_v_chi2cut =
new TH1F(
"h_signal_charge_1d_v_chi2cut",
"charge v of the signal (fC) with a chi2 cut", 500, 0, 500);
594 h_signal_size_1d_x_chi2cut =
new TH1F(
"h_signal_size_1d_x_chi2cut",
"cl.size x of the signal with a chi2 cut", 50, 0, 50);
595 h_signal_size_1d_v_chi2cut =
new TH1F(
"h_signal_size_1d_v_chi2cut",
"cl.size v of the signal with a chi2 cut", 50, 0, 50);
598 h_background_charge_2d =
new TH1F(
"h_background_charge_2d",
"total charge of the background (fC)", 500, 0, 500);
599 h_background_charge_1d_x =
new TH1F(
"h_background_charge_1d_x",
"charge x of the background (fC)", 500, 0, 500);
600 h_background_charge_1d_v =
new TH1F(
"h_background_charge_1d_v",
"charge v of the background (fC)", 500, 0, 500);
601 h_background_size_1d_x =
new TH1F(
"h_background_size_1d_x",
"cl.size x of the background", 50, 0, 50);
602 h_background_size_1d_v =
new TH1F(
"h_background_size_1d_v",
"cl.size v of the background", 50, 0, 50);
609 h_eff_vs_z =
new TH1F(
"h_eff_vs_z",
"Track efficiency vs z (mm)",
MAX_Z_BIN,
MIN_Z,
MAX_Z);
616 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);
617 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);
619 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);
620 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);
625 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);
626 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);
629 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);
630 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);
633 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);
634 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);
637 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);
638 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);
873 int nhit_L1_S1_x = 0;
int nhit_L1_S2_x = 0;
int nhit_L2_S1_x = 0;
int nhit_L2_S2_x = 0;
874 int nhit_L1_S1_v = 0;
int nhit_L2_S1_v = 0;
int nhit_L2_S2_v = 0;
875 for(
int ihit = 0; ihit < nhit; ihit++) {
878 if(hit_layer[ihit] == 0) {
880 if(hit_view[ihit] == 0) {
883 if(hit_sheet[ihit] == 0) {
884 h_hit_charge_L1_S1_x->Fill(hit_q[ihit]);
885 h_hit_time_L1_S1_x->Fill(hit_t[ihit]);
886 h_hit_charge_vs_strip_L1_S1_x->Fill(hit_strip[ihit], hit_q[ihit]);
887 h_hit_time_vs_strip_L1_S1_x->Fill(hit_strip[ihit], hit_t[ihit]);
888 h_hit_charge_vs_time_L1_S1_x->Fill(hit_t[ihit], hit_q[ihit]);
892 h_hit_charge_L1_S2_x->Fill(hit_q[ihit]);
893 h_hit_time_L1_S2_x->Fill(hit_t[ihit]);
894 h_hit_charge_vs_strip_L1_S2_x->Fill(hit_strip[ihit], hit_q[ihit]);
895 h_hit_time_vs_strip_L1_S2_x->Fill(hit_strip[ihit], hit_t[ihit]);
896 h_hit_charge_vs_time_L1_S2_x->Fill(hit_t[ihit], hit_q[ihit]);
903 h_hit_charge_L1_S1_v->Fill(hit_q[ihit]);
904 h_hit_time_L1_S1_v->Fill(hit_t[ihit]);
905 h_hit_charge_vs_strip_L1_S1_v->Fill(hit_strip[ihit], hit_q[ihit]);
906 h_hit_time_vs_strip_L1_S1_v->Fill(hit_strip[ihit], hit_t[ihit]);
907 h_hit_charge_vs_time_L1_S1_v->Fill(hit_t[ihit], hit_q[ihit]);
908 h_hit_charge_vs_length_L1_S1_v->Fill(hit_length[ihit], hit_q[ihit]);
912 else if(hit_layer[ihit] == 1) {
914 if(hit_view[ihit] == 0) {
917 if(hit_sheet[ihit] == 0) {
918 h_hit_charge_L2_S1_x->Fill(hit_q[ihit]);
919 h_hit_time_L2_S1_x->Fill(hit_t[ihit]);
920 h_hit_charge_vs_strip_L2_S1_x->Fill(hit_strip[ihit], hit_q[ihit]);
921 h_hit_time_vs_strip_L2_S1_x->Fill(hit_strip[ihit], hit_t[ihit]);
922 h_hit_charge_vs_time_L2_S1_x->Fill(hit_t[ihit], hit_q[ihit]);
926 h_hit_charge_L2_S2_x->Fill(hit_q[ihit]);
927 h_hit_time_L2_S2_x->Fill(hit_t[ihit]);
928 h_hit_charge_vs_strip_L2_S2_x->Fill(hit_strip[ihit], hit_q[ihit]);
929 h_hit_time_vs_strip_L2_S2_x->Fill(hit_strip[ihit], hit_t[ihit]);
930 h_hit_charge_vs_time_L2_S2_x->Fill(hit_t[ihit], hit_q[ihit]);
937 if(hit_sheet[ihit] == 0) {
938 h_hit_charge_L2_S1_v->Fill(hit_q[ihit]);
939 h_hit_time_L2_S1_v->Fill(hit_t[ihit]);
940 h_hit_charge_vs_strip_L2_S1_v->Fill(hit_strip[ihit], hit_q[ihit]);
941 h_hit_time_vs_strip_L2_S1_v->Fill(hit_strip[ihit], hit_t[ihit]);
942 h_hit_charge_vs_time_L2_S1_v->Fill(hit_t[ihit], hit_q[ihit]);
943 h_hit_charge_vs_length_L2_S1_v->Fill(hit_length[ihit], hit_q[ihit]);
947 h_hit_charge_L2_S2_v->Fill(hit_q[ihit]);
948 h_hit_time_L2_S2_v->Fill(hit_t[ihit]);
949 h_hit_charge_vs_strip_L2_S2_v->Fill(hit_strip[ihit], hit_q[ihit]);
950 h_hit_time_vs_strip_L2_S2_v->Fill(hit_strip[ihit], hit_t[ihit]);
951 h_hit_charge_vs_time_L2_S2_v->Fill(hit_t[ihit], hit_q[ihit]);
952 h_hit_charge_vs_length_L2_S2_v->Fill(hit_length[ihit], hit_q[ihit]);
959 h_nofhit_L1_S1_x->Fill(nhit_L1_S1_x);
960 h_nofhit_L1_S2_x->Fill(nhit_L1_S2_x);
961 h_nofhit_L2_S1_x->Fill(nhit_L2_S1_x);
962 h_nofhit_L2_S2_x->Fill(nhit_L2_S2_x);
963 h_nofhit_L1_S1_v->Fill(nhit_L1_S1_v);
964 h_nofhit_L2_S1_v->Fill(nhit_L2_S1_v);
965 h_nofhit_L2_S2_v->Fill(nhit_L2_S2_v);
1044 for(
int iclu = 0; iclu < ncluster; iclu++) {
1046 if(cluster_1d_view[iclu] == -1)
continue;
1047 if(cluster_1d_view[iclu] != 0 && cluster_1d_view[iclu] != 1) cout <<
"ERROR " << cluster_1d_view[iclu] << endl;
1050 if(cluster_1d_layerid[iclu] == 0) {
1052 if(cluster_1d_view[iclu] == 0) {
1055 if(cluster_1d_phi[iclu] < 0) {
1056 h_cluster1d_size_L1_S1_x->Fill(cluster_1d_size[iclu]);
1057 h_cluster1d_charge_vs_phi_L1_S1_x->Fill(TMath::RadToDeg()*cluster_1d_phi[iclu], cluster_1d_q[iclu]);
1060 h_cluster1d_size_L1_S2_x->Fill(cluster_1d_size[iclu]);
1061 h_cluster1d_charge_vs_phi_L1_S2_x->Fill(TMath::RadToDeg()*cluster_1d_phi[iclu], cluster_1d_q[iclu]);
1066 h_cluster1d_size_L1_S1_v->Fill(cluster_1d_size[iclu]);
1067 h_cluster1d_charge_vs_v_L1_S1_v->Fill(cluster_1d_v[iclu], cluster_1d_q[iclu]);
1070 else if(cluster_1d_layerid[iclu] == 1) {
1072 if(cluster_1d_view[iclu] == 0) {
1075 if(cluster_1d_sheetid[iclu] == 0) {
1076 h_cluster1d_size_L2_S1_x->Fill(cluster_1d_size[iclu]);
1077 h_cluster1d_charge_vs_phi_L2_S1_x->Fill(TMath::RadToDeg()*cluster_1d_phi[iclu], cluster_1d_q[iclu]);
1080 h_cluster1d_size_L2_S2_x->Fill(cluster_1d_size[iclu]);
1081 h_cluster1d_charge_vs_phi_L2_S2_x->Fill(TMath::RadToDeg()*cluster_1d_phi[iclu], cluster_1d_q[iclu]);
1087 if(cluster_1d_sheetid[iclu] == 0) {
1088 h_cluster1d_size_L2_S1_v->Fill(cluster_1d_size[iclu]);
1089 h_cluster1d_charge_vs_v_L2_S1_v->Fill(cluster_1d_v[iclu], cluster_1d_q[iclu]);
1092 h_cluster1d_size_L2_S2_v->Fill(cluster_1d_size[iclu]);
1093 h_cluster1d_charge_vs_v_L2_S2_v->Fill(cluster_1d_v[iclu], cluster_1d_q[iclu]);
1099 h_nofcluster1d_L1_S1_x->Fill(ncluster_1d_L1_S1_x);
1101 h_nofcluster1d_L2_S1_x->Fill(ncluster_1d_L2_S1_x);
1102 h_nofcluster1d_L2_S2_x->Fill(ncluster_1d_L2_S2_x);
1103 h_nofcluster1d_L1_S1_v->Fill(ncluster_1d_L1_S1_v);
1104 h_nofcluster1d_L2_S1_v->Fill(ncluster_1d_L2_S1_v);
1105 h_nofcluster1d_L2_S2_v->Fill(ncluster_1d_L2_S2_v);
1107 if(ncluster_1d != counter) cout <<
"ERROR in fill_cluster1d_histo: ncluster_1d " << ncluster_1d <<
", counter " << counter <<endl;
1119 double tmp_charge_L1bot = 0;
1120 double tmp_charge_L1top = 0;
1121 double tmp_charge_L2bot = 0;
1122 double tmp_charge_L2top = 0;
1123 int tmp_cluster_L1bot = -1;
1124 int tmp_cluster_L1top = -1;
1125 int tmp_cluster_L2bot = -1;
1126 int tmp_cluster_L2top = -1;
1128 for(
int iclu = 0; iclu < ncluster; iclu++) {
1130 if(cluster_2d_view[iclu] == -1)
continue;
1131 if(cluster_2d_view[iclu] != 2) cout <<
"ERROR in fill_cluster2d_histo " << cluster_2d_view[iclu] << endl;
1133 if(cluster_2d_layerid[iclu] == 0) {
1135 if(cluster_2d_phi[iclu] < 0) {
1136 if(cluster_2d_q[iclu] > tmp_charge_L1bot) {
1137 tmp_charge_L1bot = cluster_2d_q[iclu];
1138 tmp_cluster_L1bot = iclu;
1142 if(cluster_2d_q[iclu] > tmp_charge_L1top) {
1143 tmp_charge_L1top = cluster_2d_q[iclu];
1144 tmp_cluster_L1top = iclu;
1148 else if(cluster_2d_layerid[iclu] == 1) {
1150 if(cluster_2d_sheetid[iclu] == 0) {
1151 if(cluster_2d_q[iclu] > tmp_charge_L2bot) {
1152 tmp_charge_L2bot = cluster_2d_q[iclu];
1153 tmp_cluster_L2bot = iclu;
1157 if(cluster_2d_q[iclu] > tmp_charge_L2top) {
1158 tmp_charge_L2top = cluster_2d_q[iclu];
1159 tmp_cluster_L2top = iclu;
1166 if(tmp_cluster_L1bot == -1 || tmp_cluster_L1top == -1 || tmp_cluster_L2bot == -1 || tmp_cluster_L2top == -1)
return;
1169 if(cluster_2d_idv[tmp_cluster_L1bot] == cluster_2d_idv[tmp_cluster_L1top])
return;
1172 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 ||
1173 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 ||
1174 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 ||
1175 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)
return;
1178 if(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1bot]] <= select_size || cluster_1d_size[cluster_2d_idv[tmp_cluster_L1bot]] <= select_size ||
1179 cluster_1d_size[cluster_2d_idx[tmp_cluster_L1top]] <= select_size || cluster_1d_size[cluster_2d_idv[tmp_cluster_L1top]] <= select_size ||
1180 cluster_1d_size[cluster_2d_idx[tmp_cluster_L2bot]] <= select_size || cluster_1d_size[cluster_2d_idv[tmp_cluster_L2bot]] <= select_size ||
1181 cluster_1d_size[cluster_2d_idx[tmp_cluster_L2top]] <= select_size || cluster_1d_size[cluster_2d_idv[tmp_cluster_L2top]] <= select_size)
return;
1184 h_cluster2d_charge_selected_L1_S1->Fill(tmp_charge_L1bot);
1185 h_cluster2d_charge_selected_L1_S2->Fill(tmp_charge_L1top);
1186 h_cluster2d_charge_selected_L2_S1->Fill(tmp_charge_L2bot);
1187 h_cluster2d_charge_selected_L2_S2->Fill(tmp_charge_L2top);
1190 h_cluster1d_charge_selected_L1_S1_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L1bot]]);
1191 h_cluster1d_charge_selected_L1_S2_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L1top]]);
1192 h_cluster1d_charge_selected_L2_S1_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L2bot]]);
1193 h_cluster1d_charge_selected_L2_S2_x->Fill(cluster_1d_q[cluster_2d_idx[tmp_cluster_L2top]]);
1196 h_cluster1d_charge_selected_L1_S1_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L1bot]]);
1197 h_cluster1d_charge_selected_L1_S2_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L1top]]);
1198 h_cluster1d_charge_selected_L2_S1_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L2bot]]);
1199 h_cluster1d_charge_selected_L2_S2_v->Fill(cluster_1d_q[cluster_2d_idv[tmp_cluster_L2top]]);
1202 h_cluster1d_size_selected_L1_S1_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1bot]]);
1203 h_cluster1d_size_selected_L1_S2_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L1top]]);
1204 h_cluster1d_size_selected_L2_S1_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L2bot]]);
1205 h_cluster1d_size_selected_L2_S2_x->Fill(cluster_1d_size[cluster_2d_idx[tmp_cluster_L2top]]);
1208 h_cluster1d_size_selected_L1_S1_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L1bot]]);
1209 h_cluster1d_size_selected_L1_S2_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L1top]]);
1210 h_cluster1d_size_selected_L2_S1_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L2bot]]);
1211 h_cluster1d_size_selected_L2_S2_v->Fill(cluster_1d_size[cluster_2d_idv[tmp_cluster_L2top]]);
1219 int ncluster_2d_L1_S1 = 0;
int ncluster_2d_L1_S2 = 0;
int ncluster_2d_L2_S1 = 0;
int ncluster_2d_L2_S2 = 0;
1221 for(
int iclu = 0; iclu < ncluster; iclu++) {
1223 if(cluster_2d_view[iclu] == -1)
continue;
1224 if(cluster_2d_view[iclu] != 2) cout <<
"ERROR in fill_cluster2d_histo " << cluster_2d_view[iclu] << endl;
1227 if(cluster_2d_layerid[iclu] == 0) {
1229 if(cluster_2d_phi[iclu] < 0) {
1231 h_cluster2d_charge_vs_phi_L1_S1->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_q[iclu]);
1232 h_cluster2d_charge_vs_z_L1_S1->Fill(cluster_2d_z[iclu], cluster_2d_q[iclu]);
1233 h_cluster2d_z_vs_phi_L1_S1->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_z[iclu]);
1234 ncluster_2d_L1_S1++;
1238 h_cluster2d_charge_vs_phi_L1_S2->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_q[iclu]);
1239 h_cluster2d_charge_vs_z_L1_S2->Fill(cluster_2d_z[iclu], cluster_2d_q[iclu]);
1240 h_cluster2d_z_vs_phi_L1_S2->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_z[iclu]);
1241 ncluster_2d_L1_S2++;
1244 else if(cluster_2d_layerid[iclu] == 1) {
1246 if(cluster_2d_sheetid[iclu] == 0) {
1248 h_cluster2d_charge_vs_phi_L2_S1->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_q[iclu]);
1249 h_cluster2d_charge_vs_z_L2_S1->Fill(cluster_2d_z[iclu], cluster_2d_q[iclu]);
1250 h_cluster2d_z_vs_phi_L2_S1->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_z[iclu]);
1251 ncluster_2d_L2_S1++;
1255 h_cluster2d_charge_vs_phi_L2_S2->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_q[iclu]);
1256 h_cluster2d_charge_vs_z_L2_S2->Fill(cluster_2d_z[iclu], cluster_2d_q[iclu]);
1257 h_cluster2d_z_vs_phi_L2_S2->Fill(TMath::RadToDeg()*cluster_2d_phi[iclu], cluster_2d_z[iclu]);
1258 ncluster_2d_L2_S2++;
1264 h_nofcluster2d_L1_S1->Fill(ncluster_2d_L1_S1);
1265 h_nofcluster2d_L1_S2->Fill(ncluster_2d_L1_S2);
1266 h_nofcluster2d_L2_S1->Fill(ncluster_2d_L2_S1);
1267 h_nofcluster2d_L2_S2->Fill(ncluster_2d_L2_S2);
1268 if(ncluster_2d != counter) cout <<
"ERROR in fill_cluster2d_histo: ncluster_2d " << ncluster_2d <<
", counter " << counter << endl;
1274 if(track_chi2 == 9999)
return;
1277 h_track_chi2->Fill(track_chi2);
1280 if(isgood ==
false)
return;
1283 h_track_xpoca->Fill(track_xpoca_glo);
1284 h_track_ypoca->Fill(track_ypoca_glo);
1285 h_track_zpoca->Fill(track_zpoca_glo);
1288 for(
int iclu = 0; iclu < track_nfitpoint; iclu++) {
1289 int ilay = track_layerid[iclu];
1290 int ishe = track_sheetid[iclu];
1291 int cluster2d_id = track_clusterid[iclu];
1292 int idx = cluster_2d_idx[cluster2d_id];
1293 int idv = cluster_2d_idv[cluster2d_id];
1294 if(ilay==0 && ishe==0) {
1295 h_cluster1d_charge_fitted_L1_S1_x->Fill(cluster_1d_q[idx]);
1296 h_cluster1d_charge_fitted_L1_S1_v->Fill(cluster_1d_q[idv]);
1298 else if(ilay==0 && ishe==1) {
1299 h_cluster1d_charge_fitted_L1_S2_x->Fill(cluster_1d_q[idx]);
1300 h_cluster1d_charge_fitted_L1_S2_v->Fill(cluster_1d_q[idv]);
1302 else if(ilay==1 && ishe==0) {
1303 h_cluster1d_charge_fitted_L2_S1_x->Fill(cluster_1d_q[idx]);
1304 h_cluster1d_charge_fitted_L2_S1_v->Fill(cluster_1d_q[idv]);
1306 else if(ilay==1 && ishe==1) {
1307 h_cluster1d_charge_fitted_L2_S2_x->Fill(cluster_1d_q[idx]);
1308 h_cluster1d_charge_fitted_L2_S2_v->Fill(cluster_1d_q[idv]);
1316 fit_phi[0][0] = track_phi1bot_loc;
1317 fit_phi[0][1] = track_phi1top_loc;
1318 fit_phi[1][0] = track_phi2bot_loc;
1319 fit_phi[1][1] = track_phi2top_loc;
1322 if(align_flag==
true) {
1324 HepPoint3D fit_L1_S1_glo(track_x1bot_glo, track_y1bot_glo, track_z1bot_glo);
1326 HepPoint3D fit_L1_S2_glo(track_x1top_glo, track_y1top_glo, track_z1top_glo);
1329 HepPoint3D fit_L2_S1_glo(track_x2bot_glo, track_y2bot_glo, track_z2bot_glo);
1331 HepPoint3D fit_L2_S2_glo(track_x2top_glo, track_y2top_glo, track_z2top_glo);
1334 fit_z[0][0] = fit_L1_S1_loc.z();
1335 fit_z[0][1] = fit_L1_S2_loc.z();
1336 fit_z[1][0] = fit_L2_S1_loc.z();
1337 fit_z[1][1] = fit_L2_S2_loc.z();
1341 fit_z[0][0] = track_z1bot_glo;
1342 fit_z[0][1] = track_z1top_glo;
1343 fit_z[1][0] = track_z2bot_glo;
1344 fit_z[1][1] = track_z2top_glo;
1356 bool stop_here=
false;
1358 for(
int iclu = 0; iclu < track_nfitpoint; iclu++) {
1359 int exp_lay = track_layerid[iclu];
1360 int exp_she = track_sheetid[iclu];
1362 exp_phi[exp_lay][exp_she] = cluster_2d_phi[track_clusterid[iclu]];
1363 exp_z[exp_lay][exp_she] = cluster_2d_z[track_clusterid[iclu]];
1365 exp_phi_tpc[exp_lay][exp_she] = cluster_2d_phi_tpc[track_clusterid[iclu]];
1366 exp_z_tpc[exp_lay][exp_she] = cluster_2d_z_tpc[track_clusterid[iclu]];
1374 double residual_rphi = anode_mid_gap_radius[ilay] * (exp_phi[ilay][ishe] - fit_phi[ilay][ishe]);
1375 double residual_z = exp_z[ilay][ishe] - fit_z[ilay][ishe];
1377 double residual_rphi_tpc = anode_mid_gap_radius[ilay] * (exp_phi_tpc[ilay][ishe] - fit_phi[ilay][ishe]);
1378 double residual_z_tpc = exp_z_tpc[ilay][ishe] - fit_z[ilay][ishe];
1380 if(ilay==0 && ishe==0) {
1381 h_residual_rphi_L1_S1->Fill(residual_rphi);
1382 h_residual_z_L1_S1->Fill(residual_z);
1384 h_res_rphi_vs_chi2_L1_S1->Fill(residual_rphi, track_chi2);
1385 h_res_z_vs_chi2_L1_S1->Fill(residual_z, track_chi2);
1387 h_residual_rphi_L1_S1_tpc->Fill(residual_rphi_tpc);
1388 h_residual_z_L1_S1_tpc->Fill(residual_z_tpc);
1390 h_res_rphi_vs_chi2_L1_S1_tpc->Fill(residual_rphi_tpc, track_chi2);
1391 h_res_z_vs_chi2_L1_S1_tpc->Fill(residual_z_tpc, track_chi2);
1393 else if(ilay==0 && ishe==1) {
1394 h_residual_rphi_L1_S2->Fill(residual_rphi);
1395 h_residual_z_L1_S2->Fill(residual_z);
1397 h_res_rphi_vs_chi2_L1_S2->Fill(residual_rphi, track_chi2);
1398 h_res_z_vs_chi2_L1_S2->Fill(residual_z, track_chi2);
1400 h_residual_rphi_L1_S2_tpc->Fill(residual_rphi_tpc);
1401 h_residual_z_L1_S2_tpc->Fill(residual_z_tpc);
1403 h_res_rphi_vs_chi2_L1_S2_tpc->Fill(residual_rphi_tpc, track_chi2);
1404 h_res_z_vs_chi2_L1_S2_tpc->Fill(residual_z_tpc, track_chi2);
1406 else if(ilay==1 && ishe==0) {
1407 h_residual_rphi_L2_S1->Fill(residual_rphi);
1408 h_residual_z_L2_S1->Fill(residual_z);
1410 h_res_rphi_vs_chi2_L2_S1->Fill(residual_rphi, track_chi2);
1411 h_res_z_vs_chi2_L2_S1->Fill(residual_z, track_chi2);
1413 h_residual_rphi_L2_S1_tpc->Fill(residual_rphi_tpc);
1414 h_residual_z_L2_S1_tpc->Fill(residual_z_tpc);
1416 h_res_rphi_vs_chi2_L2_S1_tpc->Fill(residual_rphi_tpc, track_chi2);
1417 h_res_z_vs_chi2_L2_S1_tpc->Fill(residual_z_tpc, track_chi2);
1419 else if(ilay==1 && ishe==1) {
1420 h_residual_rphi_L2_S2->Fill(residual_rphi);
1421 h_residual_z_L2_S2->Fill(residual_z);
1423 h_res_rphi_vs_chi2_L2_S2->Fill(residual_rphi, track_chi2);
1424 h_res_z_vs_chi2_L2_S2->Fill(residual_z, track_chi2);
1426 h_residual_rphi_L2_S2_tpc->Fill(residual_rphi_tpc);
1427 h_residual_z_L2_S2_tpc->Fill(residual_z_tpc);
1429 h_res_rphi_vs_chi2_L2_S2_tpc->Fill(residual_rphi_tpc, track_chi2);
1430 h_res_z_vs_chi2_L2_S2_tpc->Fill(residual_z_tpc, track_chi2);
1437 int exp_lay = track_test_layerid;
1438 int exp_she = track_test_sheetid;
1439 if(exp_lay != -1 && exp_she != -1) {
1441 if(closest_cluster2d_id == -1)
return;
1443 exp_phi[exp_lay][exp_she] = cluster_2d_phi[closest_cluster2d_id];
1444 exp_z[exp_lay][exp_she] = cluster_2d_z[closest_cluster2d_id];
1446 exp_phi_tpc[exp_lay][exp_she] = cluster_2d_phi_tpc[closest_cluster2d_id];
1447 exp_z_tpc[exp_lay][exp_she] = cluster_2d_z_tpc[closest_cluster2d_id];
1450 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]);
1451 double residual_z = exp_z[track_test_layerid][track_test_sheetid] - fit_z[track_test_layerid][track_test_sheetid];
1453 double exp_phi_test_layer = TMath::RadToDeg()*exp_phi[track_test_layerid][track_test_sheetid];
1454 vector_test_phi.push_back(exp_phi_test_layer);
1456 double exp_z_test_layer = exp_z[track_test_layerid][track_test_sheetid];
1457 vector_test_z.push_back(exp_z_test_layer);
1459 vector_chi2.push_back(track_chi2);
1461 if(track_chi2 <= cut_chi2) {
1468 if(exp_z_test_layer >=
MIN_Z+(
Z_STEP*jj) && exp_z_test_layer <
MIN_Z+(
Z_STEP*(jj+1))) n_validtrack_z_arr[jj]++;
1478 for(
int chi_i = 0; chi_i <
CHI_BIN; chi_i++) {
1480 if( track_chi2 < chi2_cut_arr[chi_i] && (exp_phi_test_layer >=
MIN_PHI+(
PHI_STEP*jj) && exp_phi_test_layer <
MIN_PHI+(
PHI_STEP*(jj+1)))) n_validtrack_phi_chi2_mat[chi_i][jj]++;
1483 if( track_chi2 < chi2_cut_arr[chi_i] && (exp_z_test_layer >=
MIN_Z+(
Z_STEP*jj) && exp_z_test_layer <
MIN_Z+(
Z_STEP*(jj+1)))) n_validtrack_z_chi2_mat[chi_i][jj]++;
1487 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]);
1488 double residual_z_tpc = exp_z_tpc[track_test_layerid][track_test_sheetid] - fit_z[track_test_layerid][track_test_sheetid];
1490 h_test_residual_rphi->Fill(residual_rphi);
1491 h_test_residual_z->Fill(residual_z);
1493 h_test_res_rphi_vs_chi2->Fill(residual_rphi, track_chi2);
1494 h_test_res_z_vs_chi2->Fill(residual_z, track_chi2);
1496 h_test_residual_rphi_tpc->Fill(residual_rphi_tpc);
1497 h_test_residual_z_tpc->Fill(residual_z_tpc);
1499 h_test_res_rphi_vs_chi2_tpc->Fill(residual_rphi_tpc, track_chi2);
1500 h_test_res_z_vs_chi2_tpc->Fill(residual_z_tpc, track_chi2);
1502 h_test_residual_rphi_vs_angxy_L1_cc ->Fill(residual_rphi , ang_xy_L1*TMath::RadToDeg());
1503 h_test_residual_rphi_vs_angxy_L1_tpc->Fill(residual_rphi_tpc, ang_xy_L1*TMath::RadToDeg());
1504 h_test_residual_rphi_vs_angxy_L2_cc ->Fill(residual_rphi , ang_xy_L2*TMath::RadToDeg());
1505 h_test_residual_rphi_vs_angxy_L2_tpc->Fill(residual_rphi_tpc, ang_xy_L2*TMath::RadToDeg());
1508 double q = cluster_2d_q[closest_cluster2d_id];
1510 int idx = cluster_2d_idx[closest_cluster2d_id];
1511 int idv = cluster_2d_idv[closest_cluster2d_id];
1512 double qx = cluster_1d_q[idx];
1513 double qv = cluster_1d_q[idv];
1514 double sizex = cluster_1d_size[idx];
1515 double sizev = cluster_1d_size[idv];
1517 vector_test_residual_rphi.push_back(residual_rphi);
1518 vector_test_residual_z.push_back(residual_z);
1519 vector_test_charge.push_back(
q);
1520 vector_test_charge_x.push_back(qx);
1521 vector_test_charge_v.push_back(qv);
1522 vector_test_size_x.push_back(sizex);
1523 vector_test_size_v.push_back(sizev);
1525 vector_test_clusterid.push_back(closest_cluster2d_id);
1526 vector_test_idx.push_back(idx);
1527 vector_test_idv.push_back(idv);
1567 nentries_residual_rphi = h_test_residual_rphi->GetEntries();
1568 nentries_residual_z = h_test_residual_z->GetEntries();
1571 if(nentries_residual_rphi > 0) {
1572 TF1*
f1 =
new TF1(
"f1",
"gaus", -5, 5);
1573 f1->SetParameters(1, 0, 1);
1574 h_test_residual_rphi->Fit(
"f1",
"WRN");
1576 f1->GetParameters(¶m1[0]);
1577 mean_residual_rphi = param1[1];
1578 sigma_residual_rphi = param1[2];
1583 if(nentries_residual_z > 0) {
1584 TF1 *f2 =
new TF1(
"f2",
"gaus", -5, 5);
1585 f2->SetParameters(1, 0, 1);
1586 h_test_residual_z->Fit(
"f2",
"WRN");
1588 f2->GetParameters(¶m2[0]);
1589 mean_residual_z = param2[1];
1590 sigma_residual_z = param2[2];
1595 TF1* f3 =
new TF1(
"f3",
"gaus", -5, 5); TF1* f4 =
new TF1(
"f4",
"gaus", -5, 5);
1596 TF1* f5 =
new TF1(
"f5",
"gaus", -5, 5); TF1* f6 =
new TF1(
"f6",
"gaus", -5, 5);
1598 TH1D *h1_dummy =
new TH1D(
"h1_dummy",
"h1_dummy", 100, -5, 5); TH1D *h2_dummy =
new TH1D(
"h2_dummy",
"h2_dummy", 100, -5, 5);
1599 TH1D *h3_dummy =
new TH1D(
"h3_dummy",
"h3_dummy", 100, -5, 5); TH1D *h4_dummy =
new TH1D(
"h4_dummy",
"h4_dummy", 100, -5, 5);
1604 double param3[3];
double param4[3];
1605 double param5[3];
double param6[3];
1607 for(
int i_chi = 0; i_chi <
CHI_BIN; i_chi++) {
1608 f3->SetParameters(1, 0, 1); f4->SetParameters(1, 0, 1);
1609 f5->SetParameters(1, 0, 1); f6->SetParameters(1, 0, 1);
1611 i_bin = j_dumbin*j_dumbin + 1;
1612 if(i_chi/3 == 1) i_bin = i_bin*10 ;
1613 if(i_chi/3 == 2) i_bin = i_bin*100 ;
1614 if(i_chi/3 == 3) i_bin = i_bin*1000;
1616 if(j_dumbin < 2) j_dumbin++;
1619 h1_dummy = h_test_res_rphi_vs_chi2->ProjectionX(
"h1_dummy", 1, i_bin);
1620 h2_dummy = h_test_res_z_vs_chi2 ->ProjectionX(
"h2_dummy", 1, i_bin);
1622 h3_dummy = h_test_res_rphi_vs_chi2_tpc->ProjectionX(
"h3_dummy", 1, i_bin);
1623 h4_dummy = h_test_res_z_vs_chi2_tpc ->ProjectionX(
"h4_dummy", 1, i_bin);
1625 if(h1_dummy->GetEntries() != 0) {
1626 h1_dummy->Fit(
"f3",
"WRN");
1627 f3->GetParameters(¶m3[0]);
1628 h_resolution_rphi_vs_chi2->SetBinContent(i_chi+1, param3[2]);
1630 else h_resolution_rphi_vs_chi2->SetBinContent(i_chi+1, -1);
1632 if(h2_dummy->GetEntries() != 0) {
1633 h2_dummy->Fit(
"f4",
"WRN");
1634 f4->GetParameters(¶m4[0]);
1635 h_resolution_z_vs_chi2 ->SetBinContent(i_chi+1, param4[2]);
1637 else h_resolution_z_vs_chi2 ->SetBinContent(i_chi+1, -1);
1639 if(h3_dummy->GetEntries() != 0) {
1640 h3_dummy->Fit(
"f5",
"WRN");
1641 f5->GetParameters(¶m5[0]);
1642 h_resolution_rphi_tpc_vs_chi2->SetBinContent(i_chi+1, param5[2]);
1644 else h_resolution_rphi_tpc_vs_chi2->SetBinContent(i_chi+1, -1);
1646 if(h4_dummy->GetEntries() != 0) {
1647 h4_dummy->Fit(
"f6",
"WRN");
1648 f6->GetParameters(¶m6[0]);
1649 h_resolution_z_tpc_vs_chi2 ->SetBinContent(i_chi+1, param6[2]);
1651 else h_resolution_z_tpc_vs_chi2 ->SetBinContent(i_chi+1, -1);
1653 h1_dummy->Reset(); h2_dummy->Reset();
1654 h3_dummy->Reset(); h4_dummy->Reset();
1657 for(
int i_clean = 0; i_clean < 3; i_clean++) {
1658 param3[i_clean] = 0; param4[i_clean] = 0;
1659 param5[i_clean] = 0; param6[i_clean] = 0;
1661 h1_dummy->Reset(); h2_dummy->Reset();
1662 h3_dummy->Reset(); h4_dummy->Reset();
1665 for(
int i_ang = 0; i_ang < 10; i_ang++) {
1667 f3->SetParameters(1, 0, 1); f4->SetParameters(1, 0, 1);
1668 f5->SetParameters(1, 0, 1); f6->SetParameters(1, 0, 1);
1670 h1_dummy = h_test_residual_rphi_vs_angxy_L1_cc->ProjectionX(
"h1_dummy", i_ang+1, i_ang+1);
1671 h2_dummy = h_test_residual_rphi_vs_angxy_L2_cc->ProjectionX(
"h2_dummy", i_ang+1, i_ang+1);
1673 h3_dummy = h_test_residual_rphi_vs_angxy_L1_tpc->ProjectionX(
"h3_dummy", i_ang+1, i_ang+1);
1674 h4_dummy = h_test_residual_rphi_vs_angxy_L2_tpc->ProjectionX(
"h4_dummy", i_ang+1, i_ang+1);
1676 if(h1_dummy->GetEntries() != 0) {
1677 h1_dummy->Fit(
"f3",
"WRN");
1678 f3->GetParameters(¶m3[0]);
1679 h_resolution_vs_ang_xy_L1->SetBinContent(i_ang+1, param3[2]);
1681 else h_resolution_vs_ang_xy_L1->SetBinContent(i_ang+1, -1);
1683 if(h2_dummy->GetEntries() != 0) {
1684 h2_dummy->Fit(
"f4",
"WRN");
1685 f4->GetParameters(¶m4[0]);
1686 h_resolution_vs_ang_xy_L2->SetBinContent(i_ang+1, param4[2]);
1688 else h_resolution_vs_ang_xy_L2->SetBinContent(i_ang+1, -1);
1690 if(h3_dummy->GetEntries() != 0) {
1691 h3_dummy->Fit(
"f5",
"WRN");
1692 f5->GetParameters(¶m5[0]);
1693 h_resolution_tpc_vs_ang_xy_L1->SetBinContent(i_ang+1, param5[2]);
1695 else h_resolution_tpc_vs_ang_xy_L1->SetBinContent(i_ang+1, -1);
1697 if(h4_dummy->GetEntries() != 0) {
1698 h4_dummy->Fit(
"f6",
"WRN");
1699 f6->GetParameters(¶m6[0]);
1700 h_resolution_tpc_vs_ang_xy_L2->SetBinContent(i_ang+1, param6[2]);
1702 else h_resolution_tpc_vs_ang_xy_L2->SetBinContent(i_ang+1, -1);
1704 h1_dummy->Reset(); h2_dummy->Reset();
1705 h3_dummy->Reset(); h4_dummy->Reset();
1707 delete f3;
delete f4;
1708 delete f5;
delete f6;
1710 delete h1_dummy;
delete h2_dummy;
1711 delete h3_dummy;
delete h4_dummy;
1714 int const nsigma_inside = 5;
1715 int const nsigma_outside = 10;
1717 for(
int ivec=0; ivec < vector_test_charge.size(); ivec++) {
1719 double residual_rphi = vector_test_residual_rphi.at(ivec);
1720 double residual_z = vector_test_residual_z.at(ivec);
1722 double q = vector_test_charge.at(ivec);
1723 double qx = vector_test_charge_x.at(ivec);
1724 double qv = vector_test_charge_v.at(ivec);
1725 double sizex = vector_test_size_x.at(ivec);
1726 double sizev = vector_test_size_v.at(ivec);
1727 double phi_t = vector_test_phi.at(ivec);
1728 double z_t = vector_test_z.at(ivec);
1730 double t_chi2 = vector_chi2.at(ivec);
1732 int clusterid = vector_test_clusterid.at(ivec);
1733 int idx = vector_test_idx.at(ivec);
1734 int idv = vector_test_idv.at(ivec);
1738 if((residual_rphi > mean_residual_rphi - nsigma_inside * sigma_residual_rphi && residual_rphi < mean_residual_rphi + nsigma_inside * sigma_residual_rphi)
1739 && (residual_z > mean_residual_z - nsigma_inside * sigma_residual_z && residual_z < mean_residual_z + nsigma_inside * sigma_residual_z)) {
1741 h_signal_charge_2d->Fill(
q);
1742 h_signal_charge_1d_x->Fill(qx);
1743 h_signal_charge_1d_v->Fill(qv);
1744 h_signal_size_1d_x->Fill(sizex);
1745 h_signal_size_1d_v->Fill(sizev);
1747 if(t_chi2 <= cut_chi2) {
1748 h_signal_charge_2d_chi2cut->Fill(
q);
1749 h_signal_charge_1d_x_chi2cut->Fill(qx);
1750 h_signal_charge_1d_v_chi2cut->Fill(qv);
1751 h_signal_size_1d_x_chi2cut->Fill(sizex);
1752 h_signal_size_1d_v_chi2cut->Fill(sizev);
1769 for(
int chi_i = 0; chi_i <
CHI_BIN; chi_i++) {
1771 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]++;
1774 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]++;
1782 if((residual_rphi < mean_residual_rphi - nsigma_outside * sigma_residual_rphi || residual_rphi > mean_residual_rphi + nsigma_outside * sigma_residual_rphi)
1783 && (residual_z < mean_residual_z - nsigma_outside * sigma_residual_z || residual_z > mean_residual_z + nsigma_outside * sigma_residual_z)) {
1785 h_background_charge_2d->Fill(
q);
1786 h_background_charge_1d_x->Fill(qx);
1787 h_background_charge_1d_v->Fill(qv);
1788 h_background_size_1d_x->Fill(sizex);
1789 h_background_size_1d_v->Fill(sizev);
1796 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
1797 if(n_validtrack_phi_arr[i_bin_phi] != 0) h_eff_vs_phi->SetBinContent(i_bin_phi+1, ((
double)n_insidetrack_phi_arr[i_bin_phi])/((
double)n_validtrack_phi_arr[i_bin_phi]));
1798 else h_eff_vs_phi->SetBinContent(i_bin_phi+1, 0);
1805 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
1806 if(n_validtrack_z_arr[i_bin_z] != 0) h_eff_vs_z->SetBinContent(i_bin_z+1, ((
double)n_insidetrack_z_arr[i_bin_z])/((
double)n_validtrack_z_arr[i_bin_z]));
1807 else h_eff_vs_z->SetBinContent(i_bin_z+1, 0);
1814 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
1815 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
1816 if(n_validtrack_phi_z_mat[i_bin_phi][i_bin_z] != 0) 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]));
1817 else h_eff_vs_phi_vs_z->SetBinContent(i_bin_phi+1, i_bin_z+1, 0);
1824 for(
int i_bin_chi = 0; i_bin_chi <
CHI_BIN; i_bin_chi++) {
1825 for(
int i_bin_phi = 0; i_bin_phi <
MAX_PHI_BIN; i_bin_phi++) {
1826 if(n_validtrack_phi_chi2_mat[i_bin_chi][i_bin_phi] != 0) 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]));
1827 else h_eff_vs_phi_vs_chi2->SetBinContent(i_bin_phi+1, i_bin_chi+1, 0);
1832 for(
int i_bin_z = 0; i_bin_z <
MAX_Z_BIN; i_bin_z++) {
1833 if(n_validtrack_z_chi2_mat[i_bin_chi][i_bin_z] != 0) 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]));
1834 else h_eff_vs_z_vs_chi2->SetBinContent(i_bin_z+1, i_bin_chi+1, 0);
1848 int lastbin = h_nofhit_L1_S1_x->FindLastBinAbove(0);
1849 h_nofhit_L1_S1_x->GetXaxis()->SetRangeUser(0, lastbin);
1850 lastbin = h_nofhit_L1_S2_x->FindLastBinAbove(0);
1851 h_nofhit_L1_S2_x->GetXaxis()->SetRangeUser(0, lastbin);
1852 lastbin = h_nofhit_L2_S1_x->FindLastBinAbove(0);
1853 h_nofhit_L2_S1_x->GetXaxis()->SetRangeUser(0, lastbin);
1854 lastbin = h_nofhit_L2_S2_x->FindLastBinAbove(0);
1855 h_nofhit_L2_S2_x->GetXaxis()->SetRangeUser(0, lastbin);
1857 lastbin = h_nofhit_L1_S1_v->FindLastBinAbove(0);
1858 h_nofhit_L1_S1_v->GetXaxis()->SetRangeUser(0, lastbin);
1859 lastbin = h_nofhit_L2_S1_v->FindLastBinAbove(0);
1860 h_nofhit_L2_S1_v->GetXaxis()->SetRangeUser(0, lastbin);
1861 lastbin = h_nofhit_L2_S2_v->FindLastBinAbove(0);
1862 h_nofhit_L2_S2_v->GetXaxis()->SetRangeUser(0, lastbin);
1864 lastbin = h_nofcluster1d_L1_S1_x->FindLastBinAbove(0);
1865 h_nofcluster1d_L1_S1_x->GetXaxis()->SetRangeUser(0, lastbin);
1866 lastbin = h_nofcluster1d_L1_S2_x->FindLastBinAbove(0);
1867 h_nofcluster1d_L1_S2_x->GetXaxis()->SetRangeUser(0, lastbin);
1868 lastbin = h_nofcluster1d_L2_S1_x->FindLastBinAbove(0);
1869 h_nofcluster1d_L2_S1_x->GetXaxis()->SetRangeUser(0, lastbin);
1870 lastbin = h_nofcluster1d_L2_S2_x->FindLastBinAbove(0);
1871 h_nofcluster1d_L2_S2_x->GetXaxis()->SetRangeUser(0, lastbin);
1873 lastbin = h_nofcluster1d_L1_S1_v->FindLastBinAbove(0);
1874 h_nofcluster1d_L1_S1_v->GetXaxis()->SetRangeUser(0, lastbin);
1875 lastbin = h_nofcluster1d_L2_S1_v->FindLastBinAbove(0);
1876 h_nofcluster1d_L2_S1_v->GetXaxis()->SetRangeUser(0, lastbin);
1877 lastbin = h_nofcluster1d_L2_S2_v->FindLastBinAbove(0);
1878 h_nofcluster1d_L2_S2_v->GetXaxis()->SetRangeUser(0, lastbin);