184 if (RunPeriod >= 1 && RunPeriod <= 7) {
185 sprintf(mapping,
"TOF700_map_period_%d.txt", RunPeriod);
187 printf(
"Non-existing run period number %d!", RunPeriod);
192 TClonesArray *tof700Digits = NULL, *eventHeader = NULL, *mcmatch = NULL, *stspoints = NULL;
193 TClonesArray *tracks = NULL, *mtracks = NULL, *MCtracks = NULL, *tofpoints = NULL;
200 if (strstr(TracksGemDch,
".root")) {
201 bmnTree->
Add(TracksGemDch);
202 strcpy(fnameMC, TracksGemDch);
204 ifstream fin(TracksGemDch);
206 for (
int idx = 0; idx < 1000; idx++) {
210 if (strlen(filename.Data()) == 0)
212 if ((filename.Data())[0] ==
'#')
214 cout <<
" GEM+DCH tracks file #" << idx + 1 <<
" " << filename.
Data() << endl;
215 bmnTree->
Add(filename);
216 strcpy(fnameMC, filename.Data());
220 printf(
"Non-existing run list file: %s!", TracksGemDch);
273 Double_t xmintof700 = +1000., xmaxtof700 = -1000., ymintof700 = +1000., ymaxtof700 = -1000.;
274 Float_t xs = 0., ys = 0., zs = 0.;
275 Double_t xsmin = 0., ysmin = 0., xsmax = 0., ysmax = 0.;
286 TOF2->get_strip_xyz(c, 0, &xs, &ys, &zs);
291 if (xsmin < xmintof700)
293 if (xsmax > xmaxtof700)
295 if (ysmin < ymintof700)
297 if (ysmax > ymaxtof700)
299 TOF2->get_strip_xyz(c, nstr - 1, &xs, &ys, &zs);
304 if (xsmin < xmintof700)
306 if (xsmax > xmaxtof700)
308 if (ysmin < ymintof700)
310 if (ysmax > ymaxtof700)
318 char name[128], title[128];
321 gStyle->SetOptStat(111111);
324 if (strlen(fnameMC)) {
325 char fname_root[128], *delim = 0;
326 strcpy(fname_root,
gSystem->BaseName(fnameMC));
327 if ((delim = strrchr(fname_root, (
int)
'.')))
329 strcat(fname_root,
"_MC_efficiency_results.root");
330 f =
new TFile(fname_root,
"RECREATE",
"Results of BmnTOF700 MC");
332 TH1F* hMCmass0 =
new TH1F(
"hMCmass0",
"Mass/Z, Monte-Carlo, nominal", 200, -0.5, 9.5);
333 TH1F* hMCrmass0 =
new TH1F(
"hMCrmass0",
"Mass/Z, Monte-Carlo, nominal", 200, -0.5, 9.5);
334 TH1F* hMCamass =
new TH1F(
"hMCamass",
"Mass/Z, Monte-Carlo, nominal", 200, -0.5, 9.5);
335 TH1F* h1MCmass0 =
new TH1F(
"h1MCmass0",
"Mass/Z, Monte-Carlo, reconstructable", 200, -0.5, 9.5);
336 TH1F* h1MCrmass0 =
new TH1F(
"h1MCrmass0",
"Mass/Z, Monte-Carlo, reconstructable", 200, -0.5, 9.5);
337 TH1F* h1MCamass =
new TH1F(
"h1MCamass",
"Mass/Z, Monte-Carlo, reconstructable", 200, -0.5, 9.5);
338 TH1F* h1MCeffmass =
new TH1F(
"h1MCeffmass",
"Eff Mass/Z, Monte-Carlo, reconstructable", 200, -0.5, 9.5);
339 TH1F* h2MCamass =
new TH1F(
"h2MCamass",
"Mass/Z, Monte-Carlo, reconstructable, p<2", 200, -0.5, 9.5);
340 TH1F* h2MCeffmass =
new TH1F(
"h2MCeffmass",
"Eff Mass/Z, Monte-Carlo, reconstructable, p<2", 200, -0.5, 9.5);
341 TH1F* h3MCamass =
new TH1F(
"h3MCamass",
"Mass/Z, Monte-Carlo, NDF>5", 200, -0.5, 9.5);
342 TH1F* h3MCeffmass =
new TH1F(
"h3MCeffmass",
"Eff Mass/Z, Monte-Carlo, NDF>5", 200, -0.5, 9.5);
343 TH1F* h4MCamass =
new TH1F(
"h4MCamass",
"Mass/Z, Monte-Carlo, TOF700 only", 200, -0.5, 9.5);
344 TH1F* h4MCeffmass =
new TH1F(
"h4MCeffmass",
"Eff Mass/Z, Monte-Carlo, TOF700 only", 200, -0.5, 9.5);
345 TH1F* hMCmass2 =
new TH1F(
"hMCmass2",
"Mass2/Z2, Monte-Carlo, simple reconstion", 200, -0.5, 9.5);
346 TH1F* hMCmass =
new TH1F(
"hMCmass",
"Mass/Z, Monte-Carlo, simple reconstion", 200, -0.5, 9.5);
347 TH1F* hMCmassr =
new TH1F(
"hMCmassr",
"Mass/Z, Monte-Carlo, simple reconstion", 200, -0.5, 9.5);
348 TH1F* hMCmassrp =
new TH1F(
"hMCmassrp",
"Mass/Z, Monte-Carlo, simple reconstion, p<2", 200, -0.5, 9.5);
349 TH1F* hMCeffmass =
new TH1F(
"hMCeffmass",
"Eff Mass/Z, Monte-Carlo, simple reconstruction", 200, -0.5, 9.5);
350 TH1F* hMCeffmassp =
new TH1F(
"hMCeffmassp",
"Eff Mass/Z, Monte-Carlo, simple reconstruction, p<2", 200, -0.5, 9.5);
351 TH2F* hMCavsz =
new TH2F(
"hMCavsz",
"A vs Z, Monte-Carlo", 30, 0, 30, 30, 0, 30);
353 TH2F* hMCravsz =
new TH2F(
"hMCravsz",
"A vs Z, Monte-Carlo, reconstructable", 30, 0, 30, 30, 0, 30);
355 TH2F* h1MCavsz =
new TH2F(
"h1MCavsz",
"A vs Z, Monte-Carlo", 30, 0, 30, 30, 0, 30);
357 TH2F* h1MCravsz =
new TH2F(
"h1MCravsz",
"A vs Z, Monte-Carlo, reconstructable", 30, 0, 30, 30, 0, 30);
359 TH2F* hpbetamc =
new TH2F(
"hpbetamc",
"Beta vs momentum, Monte-Carlo", 200, 0, 10, 220, 0, 1.1f);
362 new TProfile(
"hpanglep",
"Average Angle vs momentum, fragments, Monte-Carlo", 150, 0, 15, 0, 70.f,
"e");
363 TH2F* hpangle =
new TH2F(
"hpangle",
"Angle vs momentum, fragments, Monte-Carlo", 200, -5, 15, 50, 0, 50.f);
365 TH1F* hangle =
new TH1F(
"hangle",
"Theta angle of tracks at vertex", 100, 0, 50);
367 "hpanglep1",
"Average Angle vs momentum, fragments, Monte-Carlo, reconstructable", 150, 0, 15, 0, 70.f,
"e");
369 new TH2F(
"hpangle1",
"Angle vs momentum, fragments, Monte-Carlo, reconstructable", 200, -5, 15, 50, 0, 50.f);
371 TH1F* hangle1 =
new TH1F(
"hangle1",
"Theta angle of tracks at vertex, reconstructable", 100, 0, 50);
372 TProfile* hpanglep2 =
new TProfile(
"hpanglep2",
"Average Angle vs momentum, fragments, Monte-Carlo, TOF700 hit",
373 150, 0, 15, 0, 70.f,
"e");
375 new TH2F(
"hpangle2",
"Angle vs momentum, fragments, Monte-Carlo, TOF700 hit", 200, -5, 15, 50, 0, 50.f);
377 TH1F* hangle2 =
new TH1F(
"hangle2",
"Theta angle of tracks at vertex, TOF700 hit", 100, 0, 50);
378 TH1F* hangleff =
new TH1F(
"hangleff",
"Efficiency vs Theta angle of tracks at vertex", 100, 0, 50);
379 TH1F* hangleff2 =
new TH1F(
"hangleff2",
"Efficiency vs Theta angle of tracks at vertex, TOF700 only", 100, 0, 50);
380 TH1F* hMCpndf =
new TH1F(
"hMCpndf",
"Momentum of tracks", 1000, -5, 15);
381 TH1F* hMCpndf0 =
new TH1F(
"hMCpndf0",
"Momentum of tracks, NDF<6", 1000, -5, 15);
382 TH1F* hMCpndf1 =
new TH1F(
"hMCpndf1",
"Momentum of tracks, NDF>=6", 1000, -5, 15);
383 TH1F* hMCpndf2 =
new TH1F(
"hMCpndf2",
"Momentum of tracks, NDF>=6, NTOF>0", 1000, -5, 15);
388 TH1F* hnsts =
new TH1F(
"hnsts",
"Number of STS points", 20, 0, 20);
389 TH1F* hntr =
new TH1F(
"hntr",
"Number of all tracks", 200, 0, 200);
390 TH1F* hntr0 =
new TH1F(
"hntr0",
"Number of selected tracks", 200, 0, 200);
391 TH1F* hntr1 =
new TH1F(
"hntr1",
"Number of tracks with FLAG conditions", 200, 0, 200);
392 TH2F* hxydch =
new TH2F(
"hxydch",
"XY DCH tracks", 70, -140, 140, 60, -90, 90);
393 TH2F* hxygem =
new TH2F(
"hxygem",
"XY GEM tracks", 70, -140, 140, 60, -90, 90);
394 TH2F* hpxysts =
new TH2F(
"hpxysts",
"XY GEM points (P/Z > 7)", 140, -70, 70, 120, -60, 60);
395 TH2F* hpxygem =
new TH2F(
"hpxygem",
"XY GEM REC tracks (P/Z > 7)", 70, -140, 140, 60, -90, 90);
396 TH2F* hp0xygem =
new TH2F(
"hp0xygem",
"XY GEM MC tracks (P/Z > 7)", 70, -140, 140, 60, -90, 90);
397 TH1F* hptr =
new TH1F(
"hptr",
"Momentum of GEM tracks", 1000, -10, 10);
398 TH1F* hpgemdch =
new TH1F(
"hpgemdch",
"Momentum of GEM+DCH tracks", 1000, -10, 10);
399 TH1F* hpgoodhit =
new TH1F(
"hpgoodhit",
"Momentum of GEM+DCH+TOF700 tracks", 1000, -10, 10);
400 TH1F* hpbadhit =
new TH1F(
"hpbadhit",
"Momentum of GEM+DCH+NoTOF700 tracks", 1000, -10, 10);
401 TH1F* htruehits =
new TH1F(
"htruehits",
"True hits fraction in reconstructed GEM track", 110, 0, 1.1);
402 TH1F* hallhits =
new TH1F(
"hallhits",
"Number of hits in reconstructed GEM track", 20, 0, 20);
403 TH1F* hp0 =
new TH1F(
"hp0",
"Momentum of tracks (all)", 1000, -10, 10);
404 TH1F* hltr =
new TH1F(
"hltr",
"Lenght of GEM tracks", 100, 500, 700);
405 TH1F* hltra =
new TH1F(
"hltra",
"Lenght of GEM+DCH tracks", 100, 500, 700);
406 TH2F* hxytrtof =
new TH2F(
"hxytrtof",
"XY tracks with TOF700 hits", 1500, -150, 150, 1000, -100, 100);
408 TH2F* hxyhit =
new TH2F(
"hxyhit",
"XY track hit distance from TOF700 hit", 100, -50, 50, 40, -10, 10);
409 TH1F* hxdiff =
new TH1F(
"hxdiff",
"X difference for TOF700 hits with track", 100, -50, +50);
410 TH2F* hxxhits =
new TH2F(
"hxxhits",
"X track hit vs TOF700 hit (small chambers)", 200, -100, 100, 200, -100, 100);
411 TH2F* hxxhitb =
new TH2F(
"hxxhitb",
"X track hit vs TOF700 hit (big chambers)", 200, -100, 100, 200, -100, 100);
413 TH1F* htoftr =
new TH1F(
"htoftr",
"TOF of tracks with TOF700 hits", 600, -20, 40);
414 TH1F* htof =
new TH1F(
"htof",
"TOF for hits", 600, -20, 40);
415 TH1F* hntof =
new TH1F(
"hntof",
"Number of hits", 100, 0, 100);
416 TH1F* hnhit =
new TH1F(
"hnhit",
"Number of hits in width limits", 100, 0, 100);
417 TH2F* hxytof =
new TH2F(
"hxytof",
"XY TOF700 hits", 1500, -150, 150, 1000, -100, 100);
419 TH2F* hpbeta =
new TH2F(
"hpbeta",
"Beta vs momentum", 200, 0, 10, 220, 0, 1.1f);
421 TH2F* hpbetac =
new TH2F(
"hpbetac",
"Beta vs momentum, chamber corrections", 200, 0, 10, 220, 0, 1.1f);
423 TH2F* hpbetas =
new TH2F(
"hpbetas",
"Beta vs momentum, strip corrections", 200, 0, 10, 220, 0, 1.1f);
425 TH2F* hpbetacm =
new TH2F(
"hpbetacm",
"Beta vs momentum, Z<0, chamber corrections", 200, 0, 10, 220, 0, 1.1f);
427 TH2F* hpbetasm =
new TH2F(
"hpbetasm",
"Beta vs momentum, Z<0, strip corrections", 200, 0, 10, 220, 0, 1.1f);
429 TH1F* hmass =
new TH1F(
"hmass",
"Mass, p<2", 200, -0.5, 9.5);
430 TH1F* hmassc =
new TH1F(
"hmassc",
"Mass, chamber corrections", 100, -0.5, 4.5);
431 TH1F* hmassc15 =
new TH1F(
"hmassc15",
"Mass, chamber corrections, p<1.5", 100, -0.5, 4.5);
432 TH1F* hmassc20 =
new TH1F(
"hmassc20",
"Mass, chamber corrections, p<2.0", 100, -0.5, 4.5);
433 TH1F* hmasss =
new TH1F(
"hmasss",
"Mass, strip corrections", 100, -0.5, 4.5);
434 TH1F* hmasss15 =
new TH1F(
"hmasss15",
"Mass, strip corrections, p<1.5", 100, -0.5, 4.5);
435 TH1F* hmasss20 =
new TH1F(
"hmasss20",
"Mass, strip corrections, p<2.0", 100, -0.5, 4.5);
436 TH1F* hmasscm =
new TH1F(
"hmasscm",
"Mass, Z<0, chamber corrections", 200, -1, 4);
437 TH1F* hmasssm =
new TH1F(
"hmasssm",
"Mass, Z<0, strip corrections", 200, -1, 4);
439 TH1F* hdtps =
new TH1F(
"hdtps",
"Time resolution, protons, strip corrections", 200, -1., +1.);
441 new TH2F(
"hdtpsvsp",
"Time resolution vs momentum, protons, strip corrections", 240, 0., 6., 200, -1., +1.);
444 TH1F* hdtpc =
new TH1F(
"hdtpc",
"Time resolution, protons, chamber corrections", 200, -1., +1.);
446 new TH2F(
"hdtpcvsp",
"Time resolution vs momentum, protons, chamber corrections", 240, 0., 6., 200, -1., +1.);
448 TH1F* hdtpcplim =
new TH1F(
"hdtpcplim",
"Time resolution, protons, p>3", 200, -1., +1.);
449 TH1F* hdtpcp1lim =
new TH1F(
"hdtpcp1lim",
"Time resolution, protons, p>4", 200, -1., +1.);
450 TH1F* hdtpcp2lim =
new TH1F(
"hdtpcp2lim",
"Time resolution, protons, p<2", 200, -1., +1.);
451 TH1F* hdtpcp3lim =
new TH1F(
"hdtpcp3lim",
"Time resolution, protons, 2<p<5", 200, -1., +1.);
453 TH2F* hmassvsp =
new TH2F(
"hmassvsp",
"Mass vs momentum", 240, 0., 6., 200, -0.2, 4.8);
455 TH2F* hmasssvsp =
new TH2F(
"hmasssvsp",
"Mass vs momentum, strip correction", 240, 0., 6., 200, -0.2, 4.8);
457 TH2F* hmasscvsp =
new TH2F(
"hmasscvsp",
"Mass vs momentum, chamber corrections", 240, 0., 6., 200, -0.2, 4.8);
459 TH2F* hmasssmvsp =
new TH2F(
"hmasssmvsp",
"Mass vs momentum, Z<0, strip correction", 240, 0., 6., 200, -0.2, 4.8);
462 new TH2F(
"hmasscmvsp",
"Mass vs momentum, Z<0, chamber corrections", 240, 0., 6., 200, -0.2, 4.8);
465 TH1F* htofp =
new TH1F(
"htofp",
"TOF for proton hits, p<2", 600, -20, 40);
467 TH1F* hstr =
new TH1F(
"hstr",
"Strips", 32, 0, 32);
468 TH1F* hcha =
new TH1F(
"hcha",
"Chambers", 60, 0, 60);
469 TH1F* hstrtr =
new TH1F(
"hstrtr",
"Strips with tracks", 32, 0, 32);
470 TH1F* hchatr =
new TH1F(
"hchatr",
"Chambers with tracks", 60, 0, 60);
472 TH2F* hdxy0 =
new TH2F(
"hdxy0",
"DxDy all", 40, -5, +5, 40, -5, +5);
474 TH1F* hdx =
new TH1F(
"hdx",
"dx all", 40, -5, +5);
475 TH1F* hdy =
new TH1F(
"hdy",
"dy all", 40, -5, +5);
476 TH2F* hdxy =
new TH2F(
"hdxy",
"DxDy selected", 40, -5, +5, 40, -5, +5);
478 TH2F* hdxytof =
new TH2F(
"hdxytof",
"DxDy with TOF700 hits", 40, -5, +5, 40, -5, +5);
480 TH2F* hdxyeff =
new TH2F(
"hdxyeff",
"Efficiency vs DxDy", 40, -5, +5, 40, -5, +5);
482 TH1F* hdxeff =
new TH1F(
"hdxeff",
"Efficiency vs Dx", 40, -5, +5);
483 TH1F* hdyeff =
new TH1F(
"hdyeff",
"Efficiency vs Dy", 40, -5, +5);
484 TH2F* hxygoodtr =
new TH2F(
"hxygoodtr",
"XY(dch) GEM+DCH good tracks", 70, -140, 140, 60, -90, 90);
486 TH2F* hxygoodtrgem =
new TH2F(
"hxygoodtrgem",
"XY(gem) GEM+DCH good tracks", 70, -140, 140, 60, -90, 90);
488 TH2F* hxygoodhit =
new TH2F(
"hxygoodhit",
"XY good tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
490 TH2F* hxygoodhita =
new TH2F(
"hxygoodhita",
"XY good tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
492 TH2F* hxybadhit =
new TH2F(
"hxybadhit",
"XY good tracks (GEM+DCH) with no hits", 70, -140, 140, 60, -90, 90);
494 TH2F* hxybadhita =
new TH2F(
"hxybadhita",
"XY good tracks (GEM+DCH) with no hits", 70, -140, 140, 60, -90, 90);
496 TH2F* hxygoodhit1 =
new TH2F(
"hxygoodhit1",
"XY good tracks (DCH) with good hits", 70, -140, 140, 60, -90, 90);
498 TH2F* hxygoodhit1a =
new TH2F(
"hxygoodhit1a",
"XY good tracks (DCH) with good hits", 70, -140, 140, 60, -90, 90);
501 new TH2F(
"hxyeff",
"Efficiency GEM+DCH+TOF700 vs XY good GEM+DCH tracks", 70, -140, 140, 60, -90, 90);
504 new TH2F(
"hxyeffa",
"Efficiency GEM+DCH+TOF700 vs XY good GEM+DCH tracks", 70, -140, 140, 60, -90, 90);
506 TH1F* hxeff =
new TH1F(
"hxeff",
"Efficiency GEM+DCH+TOF700 vs X good GEM+DCH tracks", 70, -140, 140);
507 TH1F* hxeffa =
new TH1F(
"hxeffa",
"Efficiency GEM+DCH+TOF700 vs X good GEM+DCH tracks", 70, -140, 140);
508 TH1F* hyeff =
new TH1F(
"hyeff",
"Efficiency GEM+DCH+TOF700 vs Y good GEM+DCH tracks", 60, -90, 90);
509 TH1F* hyeffa =
new TH1F(
"hyeffa",
"Efficiency GEM+DCH+TOF700 vs Y good GEM+DCH tracks", 60, -90, 90);
510 TH2F* hxyeffmg =
new TH2F(
"hxyeffmg",
"Efficiency GEM+DCH vs XY good GEM tracks", 70, -140, 140, 60, -90, 90);
512 TH2F* hxyeffmd =
new TH2F(
"hxyeffmd",
"Efficiency GEM+DCH vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
514 TH2F* hxyeffm1d =
new TH2F(
"hxyeffm1d",
"Efficiency DCH+TOF700 vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
517 new TH2F(
"hxyeffm1da",
"Efficiency DCH+TOF700 vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
519 TH1F* hpeff =
new TH1F(
"hpeff",
"Efficiency GEM+DCH+TOF700 vs P good GEM+DCH tracks", 1000, -10, 10);
520 TH1F* hpeffmg =
new TH1F(
"hpeffmg",
"Efficiency GEM+DCH vs P good GEM tracks", 1000, -10, 10);
521 TH2F* hxyeffdg =
new TH2F(
"hxyeffdg",
"Efficiency DCH vs XY good GEM tracks", 70, -140, 140, 60, -90, 90);
523 TH2F* hxyeffgd =
new TH2F(
"hxyeffgd",
"Efficiency GEM vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
526 TH1F* hdtx =
new TH1F(
"hdtx",
"dtx", 100, -0.25, +0.25);
527 TH1F* hdty =
new TH1F(
"hdty",
"dty", 100, -0.25, +0.25);
528 TH1F* hDdx =
new TH1F(
"hDdx",
"Err dx", 100, 0, 10);
529 TH1F* hDdy =
new TH1F(
"hDdy",
"Err dy", 100, 0, 10);
530 TH1F* hDdtx =
new TH1F(
"hDdtx",
"Err dtx", 100, 0, 0.05);
531 TH1F* hDdty =
new TH1F(
"hDdty",
"Err dty", 100, 0, 0.05);
532 TH1F* hpdx =
new TH1F(
"hpdx",
"Pull dx", 500, -2.5, +2.5);
533 TH1F* hpdy =
new TH1F(
"hpdy",
"Pull dy", 500, -2.5, +2.5);
534 TH1F* hpdtx =
new TH1F(
"hpdtx",
"Pull dtx", 500, -25., +25.);
535 TH1F* hpdty =
new TH1F(
"hpdty",
"Pull dty", 500, -25., +25.);
536 TH1F* hchi2m =
new TH1F(
"hChi2m",
"Chi2 GemDch track", 1000, 0, 100);
537 TH1F* hchi2 =
new TH1F(
"hchi2",
"Chi2 tracks matching", 1000, 0, 100);
539 TH1F* hrej1 =
new TH1F(
"hrej1",
"Reject because not own hit", 5, 0, 5);
540 TH1F* hrej2 =
new TH1F(
"hrej2",
"Reject because DX", 5, 0, 5);
541 TH1F* hrej3 =
new TH1F(
"hrej3",
"Reject because DY", 5, 0, 5);
542 TH1F* hrej5 =
new TH1F(
"hrej5",
"Reject because DIST", 5, 0, 5);
543 TH1F* hrej6 =
new TH1F(
"hrej6",
"Reject because TIME", 5, 0, 5);
554 char nam[64], tit[64];
556 float cvel = 29.97925f;
557 float ekin = 3.2f, ebeam = ekin +
MP, pbeam =
TMath::Sqrt(ebeam * ebeam +
MP *
MP);
558 float cbeam = pbeam / ebeam;
559 float cpeak = cbeam *
CFACTOR * cvel;
565 TOF2->get_chamber_z(
i, &zc[
i]);
568 Int_t startEvent = 0;
570 Int_t nEventsMC = nEvents;
571 printf(
"\nNumber of events in tracks chain is %d (MC chain %d)\n", nEvents, nEventsMC);
573 int Ntr = 0, Ntr1 = 0, Ntr1g = 0, Ntr0 = 0, Ntr700 = 0;
574 Int_t iEv = 0, iEvMC = 0, fCurrent = -1;
575 UInt_t trackEvId = 0, MCEvId = 0;
576 UInt_t trackRunId = 0, MCRunId = 0;
578 TH1D *projtmp = 0, *projtmp1 = 0;
579 for (
Int_t iEv0 = startEvent; iEv0 < startEvent + nEvents; iEv0++) {
580 if (iEv % 10000 == 0) {
581 cout <<
"Event: " << iEv <<
"/" << startEvent + nEvents <<
" ( Run " << trackRunId <<
" EvId " << trackEvId
646 for (
int j = 0; j < 32; j++)
648 for (
int j = 0; j < 32; j++)
653 int nsts = stspoints->GetEntriesFast();
657 int ntrmc = MCtracks->GetEntriesFast();
659 float x = 0., y = 0., z = 0.;
660 int hchamb[1000] = {0}, hstrip[1000] = {0};
661 int hmctr[1000] = {0};
662 int clchamb[1000] = {0}, clstrip[1000] = {0};
663 Bool_t usedstrip[1000] = {
false};
664 Bool_t usedstrip1[1000] = {
false};
666 BmnTOFPoint *tofpoint[1000] = {NULL}, *tofpoin = NULL;
667 Int_t toftrackid[1000] = {-1}, toftrid = -1;
670 printf(
"\n*************** TOF hits %d %d **********************\n", iEv0, ntof);
671 for (
Int_t iDig = 0; iDig < ntof; ++iDig) {
675 UInt_t DetId = digit->GetDetectorID();
676 Short_t plane = ((DetId & 0xFFFF) >> 8) - 1;
678 Short_t strip = (DetId & 0xFF) - 1;
679 Float_t time = digit->GetTimeStamp();
691 nhits[plane][strip]++;
692 tof[plane][strip] = time;
701 TOF2->get_strip_xyz(plane, strip, &x, &y, &z);
707 numhit[plane][strip] =
nhi;
708 indpoint = digit->GetRefIndex();
709 tofpoin = (BmnTOFPoint*)tofpoints->At(indpoint);
712 toftrid = tofpoin->GetTrackID();
715 printf(
" *********\n");
721 printf(
" hit %d\n", iDig);
723 printf(
" point %d\n", indpoint);
725 printf(
" track %d\n", toftrid);
726 LOG(info) <<
"Track " << toftrid <<
", mother : " << mctrack->
GetMotherId() <<
", Type "
728 << mctrack->
GetPy() <<
", " << mctrack->
GetPz() <<
") GeV";
729 LOG(info) <<
", vertex (" << mctrack->
GetStartX() <<
", " << mctrack->
GetStartY() <<
", "
735 tofpoint[
nhi] = (BmnTOFPoint*)tofpoints->At(indpoint);
736 toftrackid[
nhi] = tofpoint[
nhi]->GetTrackID();
739 printf(
" reject hit %d\n", iDig);
741 printf(
" reject point %d\n", indpoint);
743 printf(
" reject track %d\n", toftrid);
744 LOG(info) <<
"Track " << toftrid <<
", mother : " << mctrack->
GetMotherId() <<
", Type "
746 << mctrack->
GetPy() <<
", " << mctrack->
GetPz() <<
") GeV";
747 LOG(info) <<
", vertex (" << mctrack->
GetStartX() <<
", " << mctrack->
GetStartY() <<
", "
753 tofpoint[
nhi] = NULL;
754 toftrackid[
nhi] = -10;
758 printf(
" hit %d\n", iDig);
760 printf(
" point %d\n", indpoint);
762 printf(
" track %d null\n", toftrid);
769 float xyz[3] = {0.}, cxyz[3] = {0.}, xrpc = 0., yrpc = 0., dz = 100., tx = 0., ty = 0., zcha = 0.;
770 float beta = 1.0f, mass = 1.0f, mass2 = 1.0f, tcor = 0., tcorc = 0., tcors = 0., tcorspi = 0., tcorcpi = 0.;
772 int ntr = mtracks->GetEntriesFast();
776 nmatch = mcmatch->GetEntriesFast();
779 int ntr0 = 0, ntr700 = 0;
780 int ntr1 = 0, ntr1g = 0;
781 int iflag = 0, igem = 0, idch = 0;
787 Bool_t gooddch =
false, goodgem =
false, goodgemdch =
false, gooddchtof =
false, goodgemdchtof =
false;
810 Double_t le = 0., p = 0., ps = 0., pmod = 0., lenr = 0.;
811 int himin = -1, himin1 = -1;
813 double dist = 0., distmin = 1000000000.0f, distmin1 = 1000000000.0f, tofmin = 1000000000.0f;
828 float massmaxpi = 0.;
829 float massminpi = 0.;
839 double timepeak = 0., betapeak = 0.;
840 Int_t mctrid = -1, ntrue = 0, nwrong = 0, nfake = 0, nhall = 0, nmctr = 0;
843 Double_t MCm = 0., MCp = 0., MCe = 0., MCmz = 0., MCpz = 0., MCl = 0., MCt = 0., sMCpz = 0., sMCl = 0.,
844 sMCt = 0., sMCb = 0., rMCmz2 = 0.;
845 Int_t MCim = 0, MCrim = 0, ipart = 0;
846 Int_t pdg = 0, MCn = 0, MCz = 0, MCnt = 0;
848 Double_t pfra[15000], pzfra[15000] = {0.}, mfra[15000] = {0.}, gfra[15000] = {0.};
849 Int_t index[15000] = {0};
851 for (
Int_t iTrmc = 0; iTrmc < ntrmc; ++iTrmc) {
855 pfra[iTrmc] = mctrack->
GetP();
857 if (pdg < 1000000000) {
862 MCm = particle->
Mass();
865 MCim = (int)(MCm / 0.93);
871 pdg = pdg % 10000000;
873 MCim = (int)(pdg / 10);
878 gfra[iTrmc] = pfra[iTrmc] / MCim;
883 printf(
"\n*************** MC tracks %d %d **********************\n", iEv0, ntrmc);
885 Int_t SumA = 0, SumA0 = 0;
886 for (
Int_t iTrmc0 = 0; iTrmc0 < ntrmc; ++iTrmc0) {
889 iTrmc = index[iTrmc0];
894 SumA0 += (int)mfra[iTrmc];
897 printf(
"iTrmc0 %d iTrmc %d gamma %f A %d SumA %d\n", iTrmc0, iTrmc, gfra[iTrmc], (
int)mfra[iTrmc],
900 LOG(info) <<
"Track " << iTrmc <<
", mother : " << mctrack->
GetMotherId() <<
", Type "
902 <<
", " << mctrack->
GetPz() <<
") GeV";
903 LOG(info) <<
", vertex (" << mctrack->
GetStartX() <<
", " << mctrack->
GetStartY() <<
", "
914 if (pdg < 1000000000) {
921 MCz = (int)(particle->
Charge() / 3.);
922 MCm = particle->
Mass();
927 MCim = (int)(MCm / 0.93);
928 MCmz = ((double)MCim) / MCz;
933 hMCamass->
Fill(MCmz);
934 hMCmass0->
Fill(MCmz);
935 hMCavsz->
Fill(MCz, MCim);
940 pdg = pdg % 10000000;
945 MCim = (int)(pdg / 10);
947 MCmz = ((double)MCim) / MCz;
949 hMCamass->
Fill(MCmz);
950 hMCrmass0->
Fill(MCmz);
951 hMCravsz->
Fill(MCz, MCim);
955 if (
SORT && MCim >= 1) {
961 MCp = mctrack->
GetP();
962 if (((MCp / MCim) > MCpmold) &&
SORT && (MCim >= 1.)) {
966 MCpmold = MCp / MCim;
979 pzfra[iTrmc0] = MCp / MCz;
980 hMCpndf->
Fill(MCp / MCz);
986 hMCpndf0->
Fill(MCp / MCz);
989 h3MCamass->
Fill(MCmz);
990 hMCpndf1->
Fill(MCp / MCz);
992 hMCpndf2->
Fill(MCp / MCz);
996 if (MCm > 0.93 && ipart) {
997 h4MCamass->
Fill(MCmz);
1002 if (MCm > 0.93 && !ipart) {
1003 h4MCamass->
Fill(MCmz);
1010 if (MCm > 0.93 && ipart) {
1011 h1MCamass->
Fill(MCmz);
1012 h1MCmass0->
Fill(MCmz);
1013 h1MCavsz->
Fill(MCz, MCim);
1018 if (MCm > 0.93 && !ipart) {
1019 h1MCamass->
Fill(MCmz);
1020 h1MCrmass0->
Fill(MCmz);
1021 h1MCravsz->
Fill(MCz, MCim);
1026 if (MCm > 0.93 && MCp < 2.0) {
1027 h2MCamass->
Fill(MCmz);
1033 Int_t hused[10000] = {0};
1034 for (
int ih = 0; ih <
nhi; ih++) {
1035 if (iTrmc == toftrackid[ih]) {
1036 MCl = tofpoint[ih]->GetLength();
1039 MCt = tofpoint[ih]->GetTime();
1042 sMCb = sMCl / sMCt / cvel;
1043 rMCmz2 = sMCpz * sMCpz * (1.f / sMCb / sMCb - 1.f);
1044 hMCmass2->
Fill(rMCmz2);
1046 if (hused[iTrmc] == 0) {
1047 hMCmassr->
Fill(MCmz);
1049 hMCmassrp->
Fill(MCmz);
1052 hpbetamc->
Fill(sMCpz, sMCb);
1053 if (pzfra[iTrmc0] > 7.)
1054 hp0xygem->
Fill(tofpoint[ih]->GetX(), tofpoint[ih]->GetY());
1058 Double_t x_sts = 0., y_sts = 0., z_sts = 0.;
1059 for (
int ih = 0; ih < nsts; ih++) {
1061 if (stspoint == NULL)
1063 if (iTrmc == stspoint->GetTrackID()) {
1064 x_sts = stspoint->
GetXIn();
1065 y_sts = stspoint->
GetYIn();
1066 z_sts = stspoint->
GetZIn();
1067 if (pzfra[iTrmc0] > 7.)
1068 hpxysts->
Fill(x_sts, y_sts);
1073 for (
Int_t iTr = 0; iTr < ntr; ++iTr) {
1075 if (gemdchtrack == NULL)
1079 if (track != NULL) {
1088 cxyz[0] = tx /
TMath::Sqrt(1. + tx * tx + ty * ty);
1089 cxyz[1] = ty /
TMath::Sqrt(1. + tx * tx + ty * ty);
1090 cxyz[2] = 1. /
TMath::Sqrt(1. + tx * tx + ty * ty);
1091 xgoodtr = xyz[0] + tx * 100.;
1092 ygoodtr = xyz[1] + ty * 100.;
1093 hxydch->
Fill(xgoodtr, ygoodtr);
1104 if (matchinfo == NULL)
1117 htruehits->
Fill(ptrue);
1118 hallhits->
Fill(nhall);
1122 if (mctrid >= 0 && mctrid < ntrmc)
1125 mcp = mctrack->
GetP();
1134 hp0->
Fill(1. / QpGem);
1147 Xpv = gemdchtrack->
GetXpv();
1148 Ypv = gemdchtrack->
GetYpv();
1156 if (primaryVertex->
GetX() < -1 || primaryVertex->
GetX() > 1 || primaryVertex->
GetY() < -1
1157 || primaryVertex->
GetY() > 1 || primaryVertex->
GetZ() < -5 || primaryVertex->
GetZ() > 3)
1160 if ((!goodpv) || nGemHits <
MINGEMNDF || nSiHits <
MINSIHITS || xGem < -140.f || xGem > 240.f
1161 || yGem < -40.f || yGem > 200.f || txGem < -0.5f || txGem > 1.0f || tyGem < -0.1f
1162 || tyGem > 0.5f || Xpv < -1.0f || Xpv > 1.0f || Ypv < -1.0f || Ypv > 1.0f || QpGem == 0.0f
1166 printf(
"Nhits %d xGem %f yGem %f zGem %f txGem %f tyGem %f Xpv %f Ypv %f QpGem %f\n",
1167 nGemHits, xGem, yGem, zGem, txGem, tyGem, Xpv, Ypv, QpGem);
1170 printf(
"Good GEM track!\n");
1172 Double_t xgema = xGem + txGem * 100.;
1173 Double_t ygema = yGem + tyGem * 100.;
1174 if (xgema >= xmintof700 && xgema <= xmaxtof700 && ygema >= ymintof700
1175 && ygema <= ymaxtof700)
1186 hxygem->
Fill(xGem, yGem);
1188 hpxygem->
Fill(xGem, yGem);
1189 else if (pzfra[mctrid] > 7.)
1190 hpxygem->
Fill(xGem, yGem);
1202 hxygem->
Fill(xGem, yGem);
1204 hpxygem->
Fill(xGem, yGem);
1205 else if (pzfra[mctrid] > 7.)
1206 hpxygem->
Fill(xGem, yGem);
1210 if (nGemHits >=
MINGEMNDF && nSiHits >=
MINSIHITS && QpGem != 0.0f && zGem >= 500.f) {
1212 Double_t xgema = xGem + txGem * 100.;
1213 Double_t ygema = yGem + tyGem * 100.;
1214 if (xgema >= xmintof700 && xgema <= xmaxtof700 && ygema >= ymintof700
1215 && ygema <= ymaxtof700)
1226 hxygem->
Fill(xGem, yGem);
1228 hpxygem->
Fill(xGem, yGem);
1229 else if (pzfra[mctrid] > 7.)
1230 hpxygem->
Fill(xGem, yGem);
1242 hxygem->
Fill(xGem, yGem);
1244 hpxygem->
Fill(xGem, yGem);
1245 else if (pzfra[mctrid] > 7.)
1246 hpxygem->
Fill(xGem, yGem);
1252 if (track == NULL) {
1258 if (primaryVertex->
GetX() < -1 || primaryVertex->
GetX() > 1 || primaryVertex->
GetY() < -1
1259 || primaryVertex->
GetY() > 1 || primaryVertex->
GetZ() < -5 || primaryVertex->
GetZ() > 3)
1262 if ((!goodpv) || nGemHits <
MINGEMNDF || nSiHits <
MINSIHITS || xGem < -140.f || xGem > 240.f
1263 || yGem < -40.f || yGem > 200.f || txGem < -0.5f || txGem > 1.0f || tyGem < -0.1f
1264 || tyGem > 0.5f || Xpv < -1.0f || Xpv > 1.0f || Ypv < -1.0f || Ypv > 1.0f || QpGem == 0.0f
1275 cxyz[0] = tx /
TMath::Sqrt(1. + tx * tx + ty * ty);
1276 cxyz[1] = ty /
TMath::Sqrt(1. + tx * tx + ty * ty);
1277 cxyz[2] = 1. /
TMath::Sqrt(1. + tx * tx + ty * ty);
1278 xgoodtr = xyz[0] + tx * 100.;
1279 ygoodtr = xyz[1] + ty * 100.;
1281 if (xgoodtr >= xmintof700 && xgoodtr <= xmaxtof700 && ygoodtr >= ymintof700
1282 && ygoodtr <= ymaxtof700)
1284 hxydch->
Fill(xgoodtr, ygoodtr);
1294 int nrej1 = 0, nrej2 = 0, nrej3 = 0, nrej4 = 0, nrej5 = 0, nrej6 = 0;
1295 if (goodgem && gooddch) {
1298 dxm = gemdchtrack->
GetDx();
1299 dym = gemdchtrack->
GetDy();
1300 dtx = gemdchtrack->
GetDtx();
1301 dty = gemdchtrack->
GetDty();
1302 Ddx = gemdchtrack->
GetDdx();
1303 Ddy = gemdchtrack->
GetDdy();
1304 Ddtx = gemdchtrack->
GetDdtx();
1305 Ddty = gemdchtrack->
GetDdty();
1306 Chi2m = gemdchtrack->
GetChi2();
1309 hdxy0->
Fill(dxm, dym);
1320 hchi2m->
Fill(Chi2m);
1321 chi2 = dxm * dxm / Ddx + dym * dym / Ddy;
1328 hdxy->
Fill(dxm, dym);
1329 hxygoodtr->
Fill(xgoodtr, ygoodtr);
1330 hxygoodtrgem->
Fill(xGem, yGem);
1380 distmin = 1000000000.0f;
1381 for (
int ih = 0; (ih < nh) && goodgemdch; ih++) {
1384 if (mctrid != toftrackid[ih] &&
USETRUEHIT) {
1390 dz =
zhi[ih] - xyz[2];
1391 xrpc = xyz[0] + dz * tx;
1392 yrpc = xyz[1] + dz * ty;
1399 dx = xrpc -
xhi[ih];
1400 dy = yrpc -
yhi[ih];
1414 if (
dist < distmin) {
1423 distmin1 = 1000000000.0f;
1424 for (
int ih = 0; (ih < nh) && gooddch; ih++) {
1431 dz =
zhi[ih] - xyz[2];
1432 xrpc = xyz[0] + dz * tx;
1433 yrpc = xyz[1] + dz * ty;
1440 dx = xrpc -
xhi[ih];
1441 dy = yrpc -
yhi[ih];
1451 if (
dist < distmin1) {
1462 ic = hchamb[himin1];
1463 is = hstrip[himin1];
1466 usedstrip1[himin1] =
true;
1467 hxygoodhit1->
Fill(xgoodtr, ygoodtr);
1468 hxygoodhit1a->
Fill(
xhi[himin1],
yhi[himin1]);
1474 goodgemdchtof =
false;
1484 goodgemdchtof =
true;
1485 usedstrip[himin] =
true;
1487 hdxytof->
Fill(dxm, dym);
1492 dz =
zhi[himin] - xyz[2];
1493 xrpc = xyz[0] + dz * tx;
1494 yrpc = xyz[1] + dz * ty;
1495 hxygoodhit->
Fill(xgoodtr, ygoodtr);
1498 hxyhit->
Fill(xrpc -
xhi[himin], yrpc -
yhi[himin]);
1499 hxdiff->
Fill(
xhi[himin] - xc);
1501 hxxhits->
Fill(
xhi[himin] - xc, xrpc - xc);
1503 hxxhitb->
Fill(
xhi[himin] - xc, xrpc - xc);
1505 cosa =
sqrt(1. + tx * tx + ty * ty);
1509 hidist =
TMath::Sqrt(xc * xc + yc * yc + (zcc - ztarg) * (zcc - ztarg));
1512 hxytrtof->
Fill(xrpc, yrpc);
1517 tofr0 =
tof[ic][is];
1520 beta = lenr / tofr / cvel;
1524 mass2 = p * p * (1.f /
beta /
beta - 1.f);
1532 if (p > 0.f && mass2 > massmin1 && mass2 < massmax1 && pmod >
PMIN && pmod <
PMAX) {
1537 tcalibrc->
Fill(ic, tcorc);
1538 tcalibrs->
Fill(ic, is, tcors);
1542 if (mass2 > massmin2 && mass2 < massmax2) {
1544 hdtpcvsp->
Fill(p, tcorc);
1546 hdtpsvsp->
Fill(p, tcors);
1548 hdtpcplim->
Fill(tcorc);
1550 hdtpcp1lim->
Fill(tcorc);
1552 hdtpcp2lim->
Fill(tcorc);
1553 if (p >= 2.0f && p < 5.0f)
1554 hdtpcp3lim->
Fill(tcorc);
1559 if (p > 0 && massmaxpi > massmin1)
1560 massmaxpi = massmin1;
1563 if (mass2 < massmaxpi && mass2 > massminpi && pmod >
PMIN && pmod <
PMAXPI) {
1565 tcorpi = tofpi - tofr;
1568 tcalibrc->
Fill(ic, tcorcpi);
1569 tcalibrs->
Fill(ic, is, tcorspi);
1573 betac = lenr / tofrc / cvel;
1574 betas = lenr / tofrs / cvel;
1575 masss2 = p * p * (1.f / betas / betas - 1.f);
1577 massc2 = p * p * (1.f / betac / betac - 1.f);
1580 hpbetac->
Fill(p, betac);
1581 hmassc->
Fill(massc2);
1582 hmasscvsp->
Fill(p, massc2);
1583 hpbetas->
Fill(p, betas);
1584 hmasss->
Fill(masss2);
1585 hmasssvsp->
Fill(p, masss2);
1587 hmasss15->
Fill(masss2);
1588 hmassc15->
Fill(massc2);
1591 hmasss20->
Fill(masss2);
1592 hmassc20->
Fill(massc2);
1596 hmasscm->
Fill(massc2);
1599 hmasssm->
Fill(masss2);
1620 if (iEv % 50000 == 0) {
1621 hdxyeff->
Divide(hdxytof, hdxy);
1632 hxyeff->
Divide(hxygoodhit, hxygoodtr);
1644 hxyeffa->
Divide(hxygoodhita, hxygoodtr);
1656 hpeff->
Divide(hpgoodhit, hpgemdch);
1657 hpeffmg->
Divide(hpgemdch, hptr);
1658 hxyeffmg->
Divide(hxygoodtrgem, hxygem);
1659 hxyeffmd->
Divide(hxygoodtr, hxydch);
1660 hxyeffdg->
Divide(hxydch, hxygem);
1661 hxyeffgd->
Divide(hxygem, hxydch);
1662 hxyeffm1d->
Divide(hxygoodhit1, hxydch);
1663 hxyeffm1da->
Divide(hxygoodhit1a, hxydch);
1664 hxybadhit->
Add(hxygoodtr, hxygoodhit, 1., -1.);
1665 hxybadhita->
Add(hxygoodtr, hxygoodhita, 1., -1.);
1666 hpbadhit->
Add(hpgemdch, hpgoodhit, 1., -1.);
1668 h1MCeffmass->
Divide(h1MCamass, hMCamass);
1669 h2MCeffmass->
Divide(h2MCamass, hMCamass);
1670 h3MCeffmass->
Divide(h3MCamass, hMCamass);
1671 h4MCeffmass->
Divide(h4MCamass, hMCamass);
1672 hMCeffmass->
Divide(hMCmassr, hMCamass);
1673 hMCeffmassp->
Divide(hMCmassrp, hMCamass);
1674 hangleff->
Divide(hangle1, hangle);
1675 hangleff2->
Divide(hangle2, hangle);
1679 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
1680 printf(
"GEM+DCH tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
1681 Ntr > 0 ? (
float)Ntr1 / Ntr * 100.f : 0.f);
1682 printf(
"Good GEM+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr1g, (
float)Ntr1g / nEvents,
1683 Ntr1 > 0 ? (
float)Ntr1g / Ntr1 * 100.f : 0.f);
1684 printf(
"Matched GEM+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr0, (
float)Ntr0 / nEvents,
1685 Ntr1g > 0 ? (
float)Ntr0 / Ntr1g * 100.f : 0.f);
1696 hdxyeff->
Divide(hdxytof, hdxy);
1707 hxyeff->
Divide(hxygoodhit, hxygoodtr);
1719 hxyeffa->
Divide(hxygoodhita, hxygoodtr);
1731 hpeff->
Divide(hpgoodhit, hpgemdch);
1732 hpeffmg->
Divide(hpgemdch, hptr);
1733 hxyeffmg->
Divide(hxygoodtrgem, hxygem);
1734 hxyeffmd->
Divide(hxygoodtr, hxydch);
1735 hxyeffdg->
Divide(hxydch, hxygem);
1736 hxyeffgd->
Divide(hxygem, hxydch);
1737 hxyeffm1d->
Divide(hxygoodhit1, hxydch);
1738 hxyeffm1da->
Divide(hxygoodhit1a, hxydch);
1739 hxybadhit->
Add(hxygoodtr, hxygoodhit, 1., -1.);
1740 hxybadhita->
Add(hxygoodtr, hxygoodhita, 1., -1.);
1741 hpbadhit->
Add(hpgemdch, hpgoodhit, 1., -1.);
1743 h1MCeffmass->
Divide(h1MCamass, hMCamass);
1744 h2MCeffmass->
Divide(h2MCamass, hMCamass);
1745 h3MCeffmass->
Divide(h3MCamass, hMCamass);
1746 h4MCeffmass->
Divide(h4MCamass, hMCamass);
1747 hMCeffmass->
Divide(hMCmassr, hMCamass);
1748 hMCeffmassp->
Divide(hMCmassrp, hMCamass);
1749 hangleff->
Divide(hangle1, hangle);
1750 hangleff2->
Divide(hangle2, hangle);
1754 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
1755 printf(
"GEM+DCH tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
1756 Ntr > 0 ? (
float)Ntr1 / Ntr * 100.f : 0.f);
1757 printf(
"Good GEM+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr1g, (
float)Ntr1g / nEvents,
1758 Ntr1 > 0 ? (
float)Ntr1g / Ntr1 * 100.f : 0.f);
1759 printf(
"Matched GEM+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr0, (
float)Ntr0 / nEvents,
1760 Ntr1g > 0 ? (
float)Ntr0 / Ntr1g * 100.f : 0.f);