363 const char* DigitsTOF700 =
"argon_tof700_digits_files_pro_full_new.txt")
367#if ROOT_VERSION_CODE < ROOT_VERSION(5, 99, 99)
368 gROOT->LoadMacro(
"$VMCWORKDIR/macro/run/bmnloadlibs.C");
374 if (RunPeriod >= 1 && RunPeriod <= 7) {
375 sprintf(mapping,
"TOF700_map_period_%d.txt", RunPeriod);
377 printf(
"Non-existing run period number %d!", RunPeriod);
388 if (strstr(TracksGemDch,
".root")) {
389 bmnTree->
Add(TracksGemDch);
391 ifstream fin(TracksGemDch);
393 for (
int idx = 0; idx < 1000; idx++) {
397 if (strlen(filename.Data()) == 0)
399 if ((filename.Data())[0] ==
'#')
401 cout <<
" GEM+DCH tracks file #" << idx + 1 <<
" " << filename.
Data() << endl;
402 bmnTree->
Add(filename);
406 printf(
"Non-existing run list file: %s!", TracksGemDch);
414 char fnametof700[256];
416 if (strstr(DigitsTOF700,
".root")) {
417 bmnTreetof700->
Add(DigitsTOF700);
418 strcpy(fnametof700, DigitsTOF700);
420 ifstream fin(DigitsTOF700);
422 for (
int idx = 0; idx < 1000; idx++) {
426 if (strlen(filename.Data()) == 0)
428 if ((filename.Data())[0] ==
'#')
430 cout <<
" TOF digits file #" << idx + 1 <<
" " << filename.
Data() << endl;
431 bmnTreetof700->
Add(filename);
432 strcpy(fnametof700, filename.Data());
436 printf(
"Non-existing run list file: %s!", DigitsTOF700);
443 char fnametof700raw[256];
444 strcpy(fnametof700raw, fnametof700);
445 strcpy(strstr(fnametof700raw,
"digi.root"),
"raw.root");
451 Double_t xmintof700 = +1000., xmaxtof700 = -1000., ymintof700 = +1000., ymaxtof700 = -1000.;
452 Float_t xs = 0., ys = 0., zs = 0.;
453 Double_t xsmin = 0., ysmin = 0., xsmax = 0., ysmax = 0.;
467 TOF2->get_strip_xyz(c, 0, &xs, &ys, &zs);
469 z_tof700_average += zs;
474 if (xsmin < xmintof700)
476 if (xsmax > xmaxtof700)
478 if (ysmin < ymintof700)
480 if (ysmax > ymaxtof700)
482 TOF2->get_strip_xyz(c, nstr - 1, &xs, &ys, &zs);
487 if (xsmin < xmintof700)
489 if (xsmax > xmaxtof700)
491 if (ysmin < ymintof700)
493 if (ysmax > ymaxtof700)
503 char name[128], title[128];
506 gStyle->SetOptStat(111111);
511 char fname_calib_root[128];
513 TString dir = getenv(
"VMCWORKDIR");
519 strcpy(fname_calib_root, path.Data());
522 strcpy(fname_calib_root,
gSystem->BaseName(fnametof700));
523 if ((delim = strrchr(fname_calib_root, (
int)
'.')))
525 strcat(fname_calib_root,
"_calibration.root");
527 TFile* fc =
new TFile(fname_calib_root,
"READ",
"Proton mass based calibration of BmnTOF700");
535 printf(
"\n ******************* Time offsets for whole chamber **********************\n");
538 printf(
"%d %f\n", c,
tofcalc[c]);
542 printf(
"\n ******************* Time offsets for one strip **************************\n");
545 printf(
"\n Chamber %d %.1f\n", c,
idchambers[c]);
549 for (
int s = 0; s < smax; s++) {
552 printf(
" strip %d %f\n", s,
tofcals[c][s]);
555 printf(
"\n *************************************************************************\n");
560 if (strlen(fnametof700)) {
561 char fname_root[128], *delim = 0;
562 strcpy(fname_root,
gSystem->BaseName(fnametof700));
563 if ((delim = strrchr(fname_root, (
int)
'.')))
566 strcat(fname_root,
"_efficiency_ntr_results.root");
568 strcat(fname_root,
"_efficiency_results.root");
569 f =
new TFile(fname_root,
"RECREATE",
"Results of BmnTOF700");
582 TH1D* htarget =
new TH1D(
"htarget",
"Statistic vs target", 10, 0, 10);
583 TH1D* hntr =
new TH1D(
"hntr",
"Number of all tracks", 200, 0, 200);
584 TH1D* hntr0 =
new TH1D(
"hntr0",
"Number of selected tracks", 200, 0, 200);
585 TH1D* hntr1 =
new TH1D(
"hntr1",
"Number of tracks with FLAG conditions", 200, 0, 200);
587 TH1D* hntrgem0 =
new TH1D(
"hntrgem0",
"Number of GEM tracks", 200, 0, 200);
588 TH1D* hntrgemcut =
new TH1D(
"hntrgemcut",
"Number of GEM tracks after cuts", 200, 0, 200);
589 TH1D* hntrgem =
new TH1D(
"hntrgem",
"Number of good GEM tracks", 200, 0, 200);
590 TH1D* hntrdch0 =
new TH1D(
"hntrdch0",
"Number of DCH tracks", 200, 0, 200);
591 TH1D* hntrdch =
new TH1D(
"hntrdch",
"Number of good DCH tracks", 200, 0, 200);
592 TH2D* hntrgemdch =
new TH2D(
"hntrgemdch",
"Number of good DCH vs GEM tracks", 50, 0, 50, 50, 0, 50);
594 TH2D* hxydch =
new TH2D(
"hxydch",
"XY DCH refitted tracks", 70, -140, 140, 60, -90, 90);
597 TH2D* hxydch1 =
new TH2D(
"hxydch1",
"XY DCH tracks", 70, -140, 140, 60, -90, 90);
600 TH2D* hxygem =
new TH2D(
"hxygem",
"XY GEM tracks", 70, -140, 140, 60, -90, 90);
603 TProfile2D* pxygem_p =
new TProfile2D(
"pxygem_p",
"Momentum variation vs XY GEM positive tracks", 70, -140, 140, 60,
606 TProfile2D* pxygem_pn =
new TProfile2D(
"pxygem_pn",
"Momentum variation vs XY GEM negative tracks", 70, -140, 140,
607 60, -90, 90, 0, 5,
"s");
609 TProfile2D* pxygem_tx =
new TProfile2D(
"pxygem_tx",
"TX variation vs XY GEM positive tracks", 70, -140, 140, 60,
610 -90, 90, -0.5, +0.5,
"s");
612 TProfile2D* pxygem_txn =
new TProfile2D(
"pxygem_txn",
"TX variation vs XY GEM negative tracks", 70, -140, 140, 60,
613 -90, 90, -0.5, +0.5,
"s");
615 TProfile2D* pxygem_ty =
new TProfile2D(
"pxygem_ty",
"TY variation vs XY GEM positive tracks", 70, -140, 140, 60,
616 -90, 90, -0.5, +0.5,
"s");
618 TProfile2D* pxygem_tyn =
new TProfile2D(
"pxygem_tyn",
"TY variation vs XY GEM negative tracks", 70, -140, 140, 60,
619 -90, 90, -0.5, +0.5,
"s");
622 TH2D* hxygem0 =
new TH2D(
"hxygem0",
"XY GEM tracks (1st plane)", 20, -10, 10, 20, -10, 10);
625 TH2D* hxygem0p =
new TH2D(
"hxygem0p",
"XY GEM positive tracks (1st plane)", 20, -10, 10, 20, -10, 10);
628 TH2D* hxygem0n =
new TH2D(
"hxygem0n",
"XY GEM negative tracks (1st plane)", 20, -10, 10, 20, -10, 10);
631 TProfile2D* pxygem0_p =
new TProfile2D(
"pxygem0_p",
"Momentum variation vs XY GEM positive tracks (1st plane)", 20,
632 -10, 10, 20, -10, 10, 0, 5,
"s");
634 TProfile2D* pxygem0_pn =
new TProfile2D(
"pxygem0_pn",
"Momentum variation vs XY GEM negative tracks (1st plane)",
635 20, -10, 10, 20, -10, 10, 0, 5,
"s");
637 TProfile2D* pxygem0_tx =
new TProfile2D(
"pxygem0_tx",
"TX variation vs XY GEM positive tracks (1st plane)", 20, -10,
638 10, 20, -10, 10, -0.5, +0.5,
"s");
640 TProfile2D* pxygem0_txn =
new TProfile2D(
"pxygem0_txn",
"TX variation vs XY GEM negative tracks (1st plane)", 20,
641 -10, 10, 20, -10, 10, -0.5, +0.5,
"s");
642 pxygem0_txn->
Sumw2();
643 TProfile2D* pxygem0_ty =
new TProfile2D(
"pxygem0_ty",
"TY variation vs XY GEM positive tracks (1st plane)", 20, -10,
644 10, 20, -10, 10, -0.5, +0.5,
"s");
646 TProfile2D* pxygem0_tyn =
new TProfile2D(
"pxygem0_tyn",
"TY variation vs XY GEM negative tracks (1st plane)", 20,
647 -10, 10, 20, -10, 10, -0.5, +0.5,
"s");
648 pxygem0_tyn->
Sumw2();
649 TH2D* hxygoodtrgem0 =
650 new TH2D(
"hxygoodtrgem0",
"XY (gem 1st plane) GEM+DCH+TOF700 good tracks", 20, -10, 10, 20, -10, 10);
652 hxygoodtrgem0->
Sumw2();
654 new TH2D(
"hxyefftrgem0",
"XY (gem 1st plane) GEM+DCH+TOF700 good tracks", 20, -10, 10, 20, -10, 10);
656 hxyefftrgem0->
Sumw2();
657 TH2D* hxygoodtrgem0p =
658 new TH2D(
"hxygoodtrgem0p",
"XY (gem 1st plane) GEM+DCH+TOF700 good positive tracks", 20, -10, 10, 20, -10, 10);
660 hxygoodtrgem0p->
Sumw2();
661 TH2D* hxyefftrgem0p =
new TH2D(
"hxyefftrgem0p",
"XY (gem 1st plane) GEM+DCH+TOF700 efficiency positive tracks", 20,
662 -10, 10, 20, -10, 10);
664 hxyefftrgem0p->
Sumw2();
665 TH2D* hxygoodtrgem0n =
666 new TH2D(
"hxygoodtrgem0n",
"XY (gem 1st plane) GEM+DCH+TOF700 good negative tracks", 20, -10, 10, 20, -10, 10);
668 hxygoodtrgem0n->
Sumw2();
669 TH2D* hxyefftrgem0n =
new TH2D(
"hxyefftrgem0n",
"XY (gem 1st plane) GEM+DCH+TOF700 efficiency negative tracks", 20,
670 -10, 10, 20, -10, 10);
672 hxyefftrgem0n->
Sumw2();
674 TH1D* hptr =
new TH1D(
"hptr",
"Momentum of GEM tracks", 1000, -10, 10);
675 TH1D* hpgemdch =
new TH1D(
"hpgemdch",
"Momentum of GEM+DCH tracks", 1000, -10, 10);
677 TH1D* hpgemtof =
new TH1D(
"hpgemtof",
"Momentum of GEMTOF tracks", 1000, -10, 10);
679 TH1D* hpgemdch2 =
new TH1D(
"hpgemdch2",
"Momentum of GEMTOF+DCH tracks", 1000, -10, 10);
681 TH1D* hpgoodhit =
new TH1D(
"hpgoodhit",
"Momentum of GEM+DCH+TOF700 tracks", 1000, -10, 10);
683 TH1D* hpgoodhit2 =
new TH1D(
"hpgoodhit2",
"Momentum of GEMTOF+DCH+TOF700 tracks", 1000, -10, 10);
685 TH1D* hpbadhit =
new TH1D(
"hpbadhit",
"Momentum of GEM+DCH+NoTOF700 tracks", 1000, -10, 10);
686 TH1D* hp0 =
new TH1D(
"hp0",
"Momentum of tracks (all)", 1000, -10, 10);
687 TH1D* hltr =
new TH1D(
"hltr",
"Lenght of GEM tracks", 100, 500, 700);
688 TH1D* hltra =
new TH1D(
"hltra",
"Lenght of GEM+DCH tracks", 100, 500, 700);
689 TH2D* hxytrtof =
new TH2D(
"hxytrtof",
"XY tracks with TOF700 hits", 1500, -150, 150, 1000, -100, 100);
693 TH2D* hxyhit =
new TH2D(
"hxyhit",
"XY track hit distance from TOF700 hit", 200, -50, 50, 40, -10, 10);
695 TH2D* hxyghit =
new TH2D(
"hxyghit",
"XY GEM track hit distance from DCH1 hit", 200, -50, 50, 40, -10, 10);
697 TH2D* hxyhit1 =
new TH2D(
"hxyhit1",
"XY track hit distance from TOF700 hit (DCH track)", 200, -50, 50, 40, -10, 10);
700 new TH2D(
"hxyhit2",
"XY track hit distance from TOF700 hit (GEMTOFDCH track)", 200, -50, 50, 40, -10, 10);
703 new TH2D(
"hxyhit2g",
"XY track hit distance from TOF700 hit (GEMTOF track)", 200, -50, 50, 40, -10, 10);
706 TH2D* hhitdxvsx =
new TH2D(
"hhitdxvsx",
"X track distance from TOF700 hit vs X", 50, -50, 150, 50, -2.5, 2.5);
712 new TProfile(
"phitdxvsx",
"Average X track hit distance from TOF700 hit vs X", 50, -50, 150, -10, 10,
"s");
714 new TProfile(
"phitdxvsy",
"Average X track hit distance from TOF700 hit vs Y", 25, -10, 90, -10, 10,
"s");
716 new TProfile(
"phitdyvsx",
"Average Y track hit distance from TOF700 hit vs X", 50, -50, 150, -10, 10,
"s");
718 new TProfile(
"phitdyvsy",
"Average Y track hit distance from TOF700 hit vs Y", 25, -10, 90, -10, 10,
"s");
719 TH2D* hhitdxvsp =
new TH2D(
"hhitdxvsp",
"X track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
722 new TH2D(
"hhitdxvspn",
"X track distance from TOF700 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
725 new TH2D(
"hhitdxvsp1",
"X track distance from TOF700 hit vs momentum (X<0)", 50, 0, 5, 100, -5, 5);
727 new TH2D(
"hhitdxvsp2",
"X track distance from TOF700 hit vs momentum (0<X<40)", 50, 0, 5, 100, -5, 5);
729 new TH2D(
"hhitdxvsp3",
"X track distance from TOF700 hit vs momentum (40<X<80)", 50, 0, 5, 100, -5, 5);
731 new TH2D(
"hhitdxvsp4",
"X track distance from TOF700 hit vs momentum (80<X<120)", 50, 0, 5, 100, -5, 5);
733 new TH2D(
"hhitdxvsp5",
"X track distance from TOF700 hit vs momentum (X>120)", 50, 0, 5, 100, -5, 5);
734 TH2D* hhitdyvsp =
new TH2D(
"hhitdyvsp",
"Y track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
737 new TH2D(
"hhitdyvspn",
"Y track distance from TOF700 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
742 new TH2D(
"hhitdxvsx2",
"X track distance from TOF700 hit vs X (GEMTOFDCH track)", 50, -50, 150, 50, -2.5, 2.5);
745 new TProfile(
"phitdxvsx2",
"Average X track hit distance from TOF700 hit vs X (GEMTOFDCH track)", 50, -50, 150,
748 "phitdxvsy2",
"Average X track hit distance from TOF700 hit vs Y (GEMTOFDCH track)", 25, -10, 90, -10, 10,
"s");
750 new TProfile(
"phitdyvsx2",
"Average Y track hit distance from TOF700 hit vs X (GEMTOFDCH track)", 50, -50, 150,
753 "phitdyvsy2",
"Average Y track hit distance from TOF700 hit vs Y (GEMTOFDCH track)", 25, -10, 90, -10, 10,
"s");
755 new TH2D(
"hhitdxvsp22",
"X GEMTOFDCH track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
757 TH2D* hhitdxvspn2 =
new TH2D(
"hhitdxvspn2",
"X GEMTOFDCH track distance from TOF700 hit vs momentum (negative)", 50,
761 new TH2D(
"hhitdyvsp2",
"Y GEMTOFDCH track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
763 TH2D* hhitdyvspn2 =
new TH2D(
"hhitdyvspn2",
"Y GEMTOFDCH track distance from TOF700 hit vs momentum (negative)", 50,
768 new TH2D(
"hhitdxvsx2g",
"X track distance from TOF700 hit vs X (GEMTOF track)", 50, -50, 150, 50, -2.5, 2.5);
771 new TH2D(
"hhitdxvsp2g",
"X GEMTOF track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
773 TH2D* hhitdxvspn2g =
new TH2D(
"hhitdxvspn2g",
"X GEMTOF track distance from TOF700 hit vs momentum (negative)", 50,
777 new TH2D(
"hhitdyvsp2g",
"Y GEMTOF track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
779 TH2D* hhitdyvspn2g =
new TH2D(
"hhitdyvspn2g",
"Y GEMTOFDCH track distance from TOF700 hit vs momentum (negative)",
780 50, 0, 5, 100, -5, 5);
785 new TH2D(
"hhitdxvsx1",
"X track distance from TOF700 hit vs X (DCH track)", 50, -50, 150, 50, -2.5, 2.5);
787 TProfile* phitdxvsx1 =
new TProfile(
"phitdxvsx1",
"Average X track hit distance from TOF700 hit vs X (DCH track)",
788 50, -50, 150, -10, 10,
"s");
789 TProfile* phitdxvsy1 =
new TProfile(
"phitdxvsy1",
"Average X track hit distance from TOF700 hit vs Y (DCH track)",
790 25, -10, 90, -10, 10,
"s");
791 TProfile* phitdyvsx1 =
new TProfile(
"phitdyvsx1",
"Average Y track hit distance from TOF700 hit vs X (DCH track)",
792 50, -50, 150, -10, 10,
"s");
793 TProfile* phitdyvsy1 =
new TProfile(
"phitdyvsy1",
"Average Y track hit distance from TOF700 hit vs Y (DCH track)",
794 25, -10, 90, -10, 10,
"s");
796 new TH2D(
"hhitdxvsp11",
"X DCH track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
799 new TH2D(
"hhitdxvspn1",
"X DCH track distance from TOF700 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
801 TH2D* hhitdyvsp1 =
new TH2D(
"hhitdyvsp1",
"Y DCH track distance from TOF700 hit vs momentum", 50, 0, 5, 100, -5, 5);
804 new TH2D(
"hhitdyvspn1",
"Y DCH track distance from TOF700 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
807 TH1D* hdxrefit1 =
new TH1D(
"hdxrefit1",
"TX(refit)-TX(dch)", 200, -5, +5);
808 TH1D* hdyrefit1 =
new TH1D(
"hdyrefit1",
"TX(refit)-TX(dch)", 200, -5, +5);
809 TH1D* hdtxrefit1 =
new TH1D(
"hdtxrefit1",
"TX(refit)-TX(dch)", 500, -0.5, +0.5);
810 TH1D* hdtyrefit1 =
new TH1D(
"hdtyrefit1",
"TY(refit)-TY(dch)", 500, -0.5, +0.5);
811 TH1D* hdxrefit =
new TH1D(
"hdxrefit",
"TX(refit)-TX(gem)", 200, -5, +5);
812 TH1D* hdyrefit =
new TH1D(
"hdyrefit",
"TX(refit)-TX(gem)", 200, -5, +5);
813 TH1D* hdtxrefit =
new TH1D(
"hdtxrefit",
"TX(refit)-TX(gem)", 500, -0.5, +0.5);
814 TH1D* hdtyrefit =
new TH1D(
"hdtyrefit",
"TY(refit)-TY(gem)", 500, -0.5, +0.5);
815 TH1D* hdprefit =
new TH1D(
"hdprefit",
"P(refit)-P(gem)", 200, -0.5, +0.5);
819 TH2D* hghitdxvsx =
new TH2D(
"hghitdxvsx",
"X track distance from DCH1 hit vs X", 50, -50, 150, 50, -2.5, 2.5);
821 TH2D* hghitdxvsp =
new TH2D(
"hghitdxvsp",
"X GEM track distance from DCH1 hit vs momentum", 50, 0, 5, 100, -5, 5);
824 new TH2D(
"hghitdxvspn",
"X GEM track distance from DCH1 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
826 TH2D* hghitdxvspa =
new TH2D(
"hghitdxvspa",
"X GEM track distance from DCH1 hit vs momentum (all combinations)", 50,
830 new TH2D(
"hghitdxvspw1",
"X GEM track distance from DCH1 hit vs momentum (all combinations, default window)",
831 50, 0, 5, 200, -10, 10);
834 new TH2D(
"hghitdxvspw2",
"X GEM track distance from DCH1 hit vs momentum (all combinations, double window)", 50,
838 new TH2D(
"hghitdxvspw3",
"X GEM track distance from DCH1 hit vs momentum (all combinations, 2*sigma window)",
839 50, 0, 5, 200, -10, 10);
843 new TH2D(
"hghitdxvspan",
"X GEM track distance from DCH1 hit vs momentum (negative, all combinations)", 50, 0,
847 "hghitdxvspw1n",
"X GEM track distance from DCH1 hit vs momentum (negative, all combinations, default window)",
848 50, 0, 5, 200, -10, 10);
851 "hghitdxvspw2n",
"X GEM track distance from DCH1 hit vs momentum (negative, all combinations, double window)",
852 50, 0, 5, 200, -10, 10);
855 "hghitdxvspw3n",
"X GEM track distance from DCH1 hit vs momentum (negative, all combinations, 2*sigma window)",
856 50, 0, 5, 200, -10, 10);
860 new TH2D(
"hghitdxvspar",
"X GEM track distance from DCH1 hit vs momentum (non-shifted, all combinations)", 50,
863 TH2D* hghitdxvspw1r =
864 new TH2D(
"hghitdxvspw1r",
865 "X GEM track distance from DCH1 hit vs momentum (non-shifted, all combinations, default window)", 50,
868 TH2D* hghitdxvspw2r =
869 new TH2D(
"hghitdxvspw2r",
870 "X GEM track distance from DCH1 hit vs momentum (non-shifted, all combinations, double window)", 50, 0,
873 TH2D* hghitdxvspw3r =
874 new TH2D(
"hghitdxvspw3r",
875 "X GEM track distance from DCH1 hit vs momentum (non-shifted, all combinations, 2*sigma window)", 50,
880 "hghitdxvsparn",
"X GEM track distance from DCH1 hit vs momentum (negative, non-shifted, all combinations)", 50,
885 "X GEM track distance from DCH1 hit vs momentum (negative, non-shifted, all combinations, default window)", 50,
890 "X GEM track distance from DCH1 hit vs momentum (negative, non-shifted, all combinations, double window)", 50,
895 "X GEM track distance from DCH1 hit vs momentum (negative, non-shifted, all combinations, 2*sigma window)", 50,
900 new TH2D(
"hghitdxvsp1",
"X GEM track distance from DCH1 hit vs momentum (X<0)", 50, 0, 5, 100, -5, 5);
902 new TH2D(
"hghitdxvsp2",
"X GEM track distance from DCH1 hit vs momentum (0<X<40)", 50, 0, 5, 100, -5, 5);
904 new TH2D(
"hghitdxvsp3",
"X GEM track distance from DCH1 hit vs momentum (40<X<80)", 50, 0, 5, 100, -5, 5);
906 new TH2D(
"hghitdxvsp4",
"X GEM track distance from DCH1 hit vs momentum (80<X<120)", 50, 0, 5, 100, -5, 5);
908 new TH2D(
"hghitdxvsp5",
"X GEM track distance from DCh1 hit vs momentum (X>120)", 50, 0, 5, 100, -5, 5);
910 TH2D* hghitdyvsp =
new TH2D(
"hghitdyvsp",
"Y GEM track distance from DCH1 hit vs momentum", 50, 0, 5, 100, -5, 5);
913 new TH2D(
"hghitdyvspn",
"Y GEM track distance from DCH1 hit vs momentum (negative)", 50, 0, 5, 100, -5, 5);
915 TH2D* hghitdyvspa =
new TH2D(
"hghitdyvspa",
"Y GEM track distance from DCH1 hit vs momentum (all combinations)", 50,
919 new TH2D(
"hghitdyvspw1",
"Y GEM track distance from DCH1 hit vs momentum (all combinations, default window)",
920 50, 0, 5, 200, -10, 10);
923 new TH2D(
"hghitdyvspw2",
"Y GEM track distance from DCH1 hit vs momentum (all combinations, double window)", 50,
927 new TH2D(
"hghitdyvspw3",
"Y GEM track distance from DCH1 hit vs momentum (all combinations, 2*sigma window)",
928 50, 0, 5, 200, -10, 10);
931 TH1D* hnwin1 =
new TH1D(
"hnwin1",
"Number of pairs in default DXDY window", 10, 0, 10);
932 TH1D* hnwin2 =
new TH1D(
"hnwin2",
"Number of pairs in twice wider DXDY window", 10, 0, 10);
933 TH1D* hnwins =
new TH1D(
"hnwins",
"Number of pairs in default DXDY N-sigma window", 10, 0, 10);
935 TH1D* hchambigx =
new TH1D(
"hchambigx",
"Chambers for X > 110", 60, 0, 60);
936 TH1D* hchambigy =
new TH1D(
"hchambigy",
"Chambers for Y > 75", 60, 0, 60);
937 TH2D* hxvsxbigx =
new TH2D(
"hxvsxbigx",
"Xtr vs Xhit for big X", 25, 100, 150, 25, 100, 150);
938 TH2D* hyvsybigy =
new TH2D(
"hyvsybigy",
"Ytr vs Yhit for big Y", 40, 70, 90, 40, 70, 90);
939 TH1D* hpbigx =
new TH1D(
"hpbigx",
"Momentum for X > 110", 500, -10, 10);
940 TH1D* hpbigy =
new TH1D(
"hpbigy",
"Momentum for Y > 75", 500, -10, 10);
941 TH1D* hybigx =
new TH1D(
"hybigx",
"Y for X > 110", 25, -10, 90);
942 TH1D* hxbigy =
new TH1D(
"hxbigy",
"X for Y > 75", 50, -50, 150);
943 TH1D* hlrbigx =
new TH1D(
"hlrbigx",
"LR difference for TOF700 hits with track (big X)", 100, -5, +5);
944 TH2D* hxxhitbigx =
new TH2D(
"hxxhitbigx",
"X-X0 track hit vs TOF700 hit (big X)", 200, -100, 100, 200, -100, 100);
945 TH2D* hxyhitlr =
new TH2D(
"hxyhitlr",
"XY track hit distance from TOF700 hit (lr cut)", 200, -50, 50, 40, -10, 10);
946 TH1D* hxdiffs =
new TH1D(
"hxdiffs",
"X-X0 difference for TOF700 hits with track (small chambers)", 100, -50, +50);
947 TH1D* hxdiffb =
new TH1D(
"hxdiffb",
"X-X0 difference for TOF700 hits with track (big chambers)", 100, -50, +50);
949 new TH2D(
"hxxhits",
"X-X0 track hit vs TOF700 hit (small chambers)", 200, -100, 100, 200, -100, 100);
950 TH2D* hxxhitb =
new TH2D(
"hxxhitb",
"X-X0 track hit vs TOF700 hit (big chambers)", 200, -100, 100, 200, -100, 100);
951 TH1D* hlrs =
new TH1D(
"hlrs",
"LR difference for TOF700 hits with track (small chambers)", 100, -5, +5);
952 TH1D* hlrb =
new TH1D(
"hlrb",
"LR difference for TOF700 hits with track (big chambers)", 100, -5, +5);
954 TH1D* htoftr =
new TH1D(
"htoftr",
"TOF of tracks with TOF700 hits", 600, -20, 40);
955 TH1D* htof =
new TH1D(
"htof",
"TOF for hits", 600, -20, 40);
956 TH1D* hntof =
new TH1D(
"hntof",
"Number of hits", 100, 0, 100);
957 TH1D* hncl =
new TH1D(
"hncl",
"Number of all clusters", 100, 0, 100);
958 TH1D* hncln =
new TH1D(
"hncln",
"Number of all clusters without 19.2 chamber", 100, 0, 100);
959 TH1D* hncls =
new TH1D(
"hncls",
"Number of clusters (small chambers)", 100, 0, 100);
960 TH1D* hnclsn =
new TH1D(
"hnclsn",
"Number of clusters (small chambers without 19.2)", 100, 0, 100);
961 TH1D* hnclb =
new TH1D(
"hnclb",
"Number of clusters (big chambers)", 100, 0, 100);
962 TH2D* hnclvschambs =
new TH2D(
"hnclvschambs",
"Number of clusters vs chamber vs ncl (small)", 50, 0, 50, 10, 0, 10);
963 TH2D* hnclvschambb =
new TH2D(
"hnclvschambb",
"Number of clusters vs chamber vs ncl (big)", 50, 0, 50, 10, 0, 10);
964 TH1D* hnclvschambs1 =
new TH1D(
"hnclvschambs1",
"Number of clusters vs chamber(small)", 50, 0, 50);
965 TH1D* hnclvschambb1 =
new TH1D(
"hnclvschambb1",
"Number of clusters vs chamber (big)", 50, 0, 50);
966 TH1D* hncltr =
new TH1D(
"hncltr",
"Number of clusters with a track", 100, 0, 100);
967 TH2D* hncltrvschambs =
968 new TH2D(
"hncltrvschambs",
"Number of clusters with a track vs chamber vs ncl (small)", 50, 0, 50, 10, 0, 10);
969 TH2D* hncltrvschambb =
970 new TH2D(
"hncltrvschambb",
"Number of clusters with a track vs chamber vs ncl (big)", 50, 0, 50, 10, 0, 10);
971 TH1D* hncltrvschambs1 =
972 new TH1D(
"hncltrvschambs1",
"Number of clusters with a track vs chamber (small)", 50, 0, 50);
973 TH1D* hncltrvschambb1 =
new TH1D(
"hncltrvschambb1",
"Number of clusters with a track vs chamber (big)", 50, 0, 50);
978 new TH1D(
"hchambeffs",
"Efficiency of clusters with a track vs chamber vs ncl (small)", 50, 0, 50);
979 TH1D* hchambeffb =
new TH1D(
"hchambeffb",
"Efficiency of clusters with a track vs chamber vs ncl (big)", 50, 0, 50);
980 TH1D* hclnums =
new TH1D(
"hclnums",
"Number of strips in cluster (small chambers)", 10, 0, 10);
981 TH1D* hclnumb =
new TH1D(
"hclnumb",
"Number of strips in cluster (big chambers)", 10, 0, 10);
982 TH2D* hclwids =
new TH2D(
"hclwids",
"Cluser amp vs chamber ID (small chambers)", 50, 0, 50, 250, 0, 25000);
983 TH2D* hclwidb =
new TH2D(
"hclwidb",
"Cluser amp vs chamber ID (big chambers)", 50, 0, 50, 250, 0, 25000);
984 TH2D* hclamps =
new TH2D(
"hclamps",
"Strip amp vs chamber ID (small chambers)", 50, 0, 50, 250, 0, 25000);
985 TH2D* hclampb =
new TH2D(
"hclampb",
"Strip amp vs chamber ID (big chambers)", 50, 0, 50, 250, 0, 25000);
986 TH2D* hxycluster =
new TH2D(
"hxycluster",
"XY TOF700 cluster", 70, -140, 140, 60, -90, 90);
989 TH2D* hxyhits =
new TH2D(
"hxyhits",
"XY TOF700 hits", 20, 0, 20, 128, 0, 128);
992 TH2D* hxystrips =
new TH2D(
"hxystrips",
"XY TOF700 strips", 20, 0, 20, 128, 0, 128);
995 TH2D* hxygoodcluster =
996 new TH2D(
"hxygoodcluster",
"XY TOF700 cluster with GEM+DCH tracks", 70, -140, 140, 60, -90, 90);
998 hxygoodcluster->
Sumw2();
999 TH2D* hxygoodstrips =
1000 new TH2D(
"hxygoodstrips",
"XY TOF700 strips with matched GEM+DCH tracks", 20, 0, 20, 128, 0, 128);
1002 hxygoodstrips->
Sumw2();
1003 TH2D* hxygood1strips =
1004 new TH2D(
"hxygood1strips",
"XY TOF700 strips with matched(1) GEM+DCH tracks", 20, 0, 20, 128, 0, 128);
1006 hxygood1strips->
Sumw2();
1007 TH2D* hxytrackstrips =
new TH2D(
"hxytrackstrips",
"XY TOF700 strips for GEM+DCH tracks", 20, 0, 20, 128, 0, 128);
1009 hxytrackstrips->
Sumw2();
1010 TH2D* hxygoodclustergem =
1011 new TH2D(
"hxygoodclustergem",
"XY TOF700 cluster with GEM tracks", 70, -140, 140, 60, -90, 90);
1013 hxygoodclustergem->
Sumw2();
1014 TH2D* hxygoodclusterdch =
1015 new TH2D(
"hxygoodclusterdch",
"XY TOF700 cluster with DCH tracks", 70, -140, 140, 60, -90, 90);
1017 hxygoodclusterdch->
Sumw2();
1018 TH2D* hxyclustereff =
1019 new TH2D(
"hxyclustereff",
"Efficiency GEM+DCH vs XY TOF700 cluster", 70, -140, 140, 60, -90, 90);
1021 hxyclustereff->
Sumw2();
1022 TH2D* hxystripseff =
new TH2D(
"hxystripseff",
"XY TOF700 strips efficiency (over hits)", 20, 0, 20, 128, 0, 128);
1024 hxystripseff->
Sumw2();
1025 TH2D* hxytrackstripseff =
1026 new TH2D(
"hxytrackstripseff",
"XY TOF700 strips efficiency (over tracks)", 20, 0, 20, 128, 0, 128);
1028 hxytrackstripseff->
Sumw2();
1029 TH2D* hxytrackstripseff1 =
1030 new TH2D(
"hxytrackstripseff1",
"XY TOF700 strips efficiency (1) (over tracks)", 20, 0, 20, 128, 0, 128);
1032 hxytrackstripseff1->
Sumw2();
1033 TH2D* hxyclustereffgem =
1034 new TH2D(
"hxyclustereffgem",
"Efficiency GEM vs XY TOF700 cluster", 70, -140, 140, 60, -90, 90);
1036 hxyclustereffgem->
Sumw2();
1037 TH2D* hxyclustereffdch =
1038 new TH2D(
"hxyclustereffdch",
"Efficiency DCH vs XY TOF700 cluster", 70, -140, 140, 60, -90, 90);
1040 hxyclustereffdch->
Sumw2();
1042 TH1D* hnhit =
new TH1D(
"hnhit",
"Number of hits in width limits", 100, 0, 100);
1043 TH2D* hxytof =
new TH2D(
"hxytof",
"XY TOF700 hits", 1500, -150, 150, 1000, -100, 100);
1046 TH2D* hpbeta =
new TH2D(
"hpbeta",
"Beta vs momentum", 200, 0, 10, 220, 0, 1.1f);
1048 TH2D* hpbetac =
new TH2D(
"hpbetac",
"Beta vs momentum, chamber corrections", 200, 0, 10, 220, 0, 1.1f);
1050 TH2D* hpbetas =
new TH2D(
"hpbetas",
"Beta vs momentum, strip corrections", 200, 0, 10, 220, 0, 1.1f);
1052 TH2D* hpbetacm =
new TH2D(
"hpbetacm",
"Beta vs momentum, Z<0, chamber corrections", 200, 0, 10, 220, 0, 1.1f);
1054 TH2D* hpbetasm =
new TH2D(
"hpbetasm",
"Beta vs momentum, Z<0, strip corrections", 200, 0, 10, 220, 0, 1.1f);
1056 TH1D* hmass =
new TH1D(
"hmass",
"Mass, p<2", 400, -0.5, 9.5);
1057 TH1D* hmassc =
new TH1D(
"hmassc",
"Mass, chamber corrections", 400, -0.5, 9.5);
1058 TH1D* hmassc15 =
new TH1D(
"hmassc15",
"Mass, chamber corrections, p<1.5", 400, -0.5, 9.5);
1059 TH1D* hmassc20 =
new TH1D(
"hmassc20",
"Mass, chamber corrections, p<2.0", 400, -0.5, 9.5);
1060 TH1D* hmasss =
new TH1D(
"hmasss",
"Mass, strip corrections", 400, -0.5, 9.5);
1061 TH1D* hmasss15 =
new TH1D(
"hmasss15",
"Mass, strip corrections, p<1.5", 400, -0.5, 9.5);
1062 TH1D* hmasss20 =
new TH1D(
"hmasss20",
"Mass, strip corrections, p<2.0", 400, -0.5, 9.5);
1064 new TH3D(
"hmasss15tt",
"Mass vs trigger vs target, strip corrections, p<1.5", 400, -0.5, 9.5, 5, 1, 6, 6, 0, 6);
1066 new TH3D(
"hmasss20tt",
"Mass vs trigger vs target, strip corrections, p<2.0", 400, -0.5, 9.5, 5, 1, 6, 6, 0, 6);
1067 TH1D* hmasscm =
new TH1D(
"hmasscm",
"Mass, Z<0, chamber corrections", 200, -1, 4);
1068 TH1D* hmasssm =
new TH1D(
"hmasssm",
"Mass, Z<0, strip corrections", 200, -1, 4);
1070 TH1D* hdtps =
new TH1D(
"hdtps",
"Time resolution, protons, strip corrections", 200, -1., +1.);
1072 new TH2D(
"hdtpsvsp",
"Time resolution vs momentum, protons, strip corrections", 240, 0., 6., 200, -1., +1.);
1074 TH3D* hdtpsvscvss =
new TH3D(
"hdtpsvscvss",
"Time resolution vs chamber vs strip, strip corrections", 59, 0, 59, 32,
1075 0., 32., 200, -1., +1.);
1076 TH3D* hdtpcvscvsp =
new TH3D(
"hdtpcvscvsp",
"Time resolution vs chamber vs momentum, chamber corrections", 59, 0,
1077 59, 60, 0., 6., 200, -1., +1.);
1079 TH1D* hdtpc =
new TH1D(
"hdtpc",
"Time resolution, protons, chamber corrections", 200, -1., +1.);
1081 new TH2D(
"hdtpcvsp",
"Time resolution vs momentum, protons, chamber corrections", 240, 0., 6., 200, -1., +1.);
1083 TH2D* hdtpcvspwlim =
new TH2D(
"hdtpcvspwlim",
"Time resolution vs momentum, protons, chamber corrections, w>3000",
1084 240, 0., 6., 200, -1., +1.);
1086 TH1D* hdtpcplim =
new TH1D(
"hdtpcplim",
"Time resolution, protons, p>3", 200, -1., +1.);
1087 TH1D* hdtpcp1lim =
new TH1D(
"hdtpcp1lim",
"Time resolution, protons, p>4", 200, -1., +1.);
1088 TH1D* hdtpcp2lim =
new TH1D(
"hdtpcp2lim",
"Time resolution, protons, p<2", 200, -1., +1.);
1089 TH1D* hdtpcp3lim =
new TH1D(
"hdtpcp3lim",
"Time resolution, protons, 2<p<5", 200, -1., +1.);
1090 TH1D* hdtpcwlim =
new TH1D(
"hdtpcwlim",
"Time resolution, protons, w>3000", 200, -1., +1.);
1091 TH1D* hdtpcwplim =
new TH1D(
"hdtpcwplim",
"Time resolution, protons, p>3, w>3000", 200, -1., +1.);
1092 TH1D* hdtpcwp1lim =
new TH1D(
"hdtpcwp1lim",
"Time resolution, protons, p>4, w>3000", 200, -1., +1.);
1094 TH2D* hmassvsp =
new TH2D(
"hmassvsp",
"Mass vs momentum", 240, 0., 6., 200, -0.2, 4.8);
1096 TH2D* hmasssvsp =
new TH2D(
"hmasssvsp",
"Mass vs momentum, strip correction", 240, 0., 6., 200, -0.2, 4.8);
1098 TH2D* hmasscvsp =
new TH2D(
"hmasscvsp",
"Mass vs momentum, chamber corrections", 240, 0., 6., 200, -0.2, 4.8);
1100 TH2D* hmasssmvsp =
new TH2D(
"hmasssmvsp",
"Mass vs momentum, Z<0, strip correction", 240, 0., 6., 200, -0.2, 4.8);
1103 new TH2D(
"hmasscmvsp",
"Mass vs momentum, Z<0, chamber corrections", 240, 0., 6., 200, -0.2, 4.8);
1106 TH1D* htofp =
new TH1D(
"htofp",
"TOF for proton hits, p<2", 600, -20, 40);
1108 TH1D* hstr =
new TH1D(
"hstr",
"Strips", 32, 0, 32);
1109 TH1D* hcha =
new TH1D(
"hcha",
"Chambers", 60, 0, 60);
1110 TH1D* hstrtr =
new TH1D(
"hstrtr",
"Strips with tracks", 32, 0, 32);
1111 TH1D* hchatr =
new TH1D(
"hchatr",
"Chambers with tracks", 60, 0, 60);
1113 TH2D* hdxy0 =
new TH2D(
"hdxy0",
"DxDy all", 40, -5, +5, 40, -5, +5);
1115 TH2D* hgdtxvsp =
new TH2D(
"hgdtxvsp",
"DTX vs P GEM-DCH (positive)", 50, 0, 5, 250, -0.5, +0.5);
1117 TH2D* hgdtxvspn =
new TH2D(
"hgdtxvspn",
"DTX vs P GEM-DCH (negative)", 50, 0, 5, 250, -0.5, +0.5);
1119 TH2D* hgdtxrvsp =
new TH2D(
"hgdtxrvsp",
"DTX vs P GEMDCH-DCH (positive)", 50, 0, 5, 250, -0.5, +0.5);
1121 TH2D* hgdtxrvspn =
new TH2D(
"hgdtxrvspn",
"DTX vs P GEMDCH-DCH (negative)", 50, 0, 5, 250, -0.5, +0.5);
1123 TH2D* hgdtxvspall =
new TH2D(
"hgdtxvspall",
"DTX vs P GEM-DCH (all pairs, positive)", 50, 0, 5, 250, -0.5, +0.5);
1125 TH2D* hgdtxvspnall =
new TH2D(
"hgdtxvspnall",
"DTX vs P GEM-DCH (all pairs, negative)", 50, 0, 5, 250, -0.5, +0.5);
1127 TH2D* hgdtxvsdxall =
1128 new TH2D(
"hgdtxvsdxall",
"DTX vs DX GEM-DCH (all pairs, positive)", 100, -5, 5, 250, -0.5, +0.5);
1130 TH2D* hgdtx1vsp =
new TH2D(
"hgdtx1vsp",
"DX/LENG vs P GEM-DCH (positive)", 50, 0, 5, 250, -0.1, +0.1);
1132 TH2D* hgdtx1vspn =
new TH2D(
"hgdtx1vspn",
"DX/LENG vs P GEM-DCH (negative)", 50, 0, 5, 250, -0.1, +0.1);
1134 TH2D* hgdtx1vspall =
1135 new TH2D(
"hgdtx1vspall",
"DX/LENG vs P GEM-DCH (all pairs, positive)", 50, 0, 5, 250, -0.5, +0.5);
1137 TH2D* hgdtx1vspnall =
1138 new TH2D(
"hgdtx1vspnall",
"DX/LENG vs P GEM-DCH (all pairs, negative)", 50, 0, 5, 250, -0.5, +0.5);
1140 TH2D* hgdtxty =
new TH2D(
"hgdtxty",
"DTY vs DTX GEM-DCH (positive)", 250, -0.5, +0.5, 250, -0.5, +0.5);
1142 TH2D* hgdtxtyn =
new TH2D(
"hgdtxtyn",
"DTY vs DTX GEM-DCH (negative)", 250, -0.5, +0.5, 250, -0.5, +0.5);
1144 TH2D* hdxyreal =
new TH2D(
"hdxyreal",
"DxDy all real", 40, -5, +5, 40, -5, +5);
1146 TH2D* hdtxtyreal =
new TH2D(
"hdtxtyreal",
"DtxDty all real", 250, -0.5, +0.5, 250, -0.5, +0.5);
1148 TH2D* hdxyrealall =
new TH2D(
"hdxyrealall",
"DxDy all combinations real", 40, -5, +5, 40, -5, +5);
1150 TH2D* hdtxtyrealall =
new TH2D(
"hdtxtyrealall",
"DtxDty all combinations real", 250, -0.5, +0.5, 250, -0.5, +0.5);
1152 TH2D* hdtxtyrealallw =
1153 new TH2D(
"hdtxtyrealallw",
"DtxDty all combinations real in window", 250, -0.5, +0.5, 250, -0.5, +0.5);
1155 TH1D* hdx =
new TH1D(
"hdx",
"dx all", 40, -5, +5);
1156 TH1D* hdy =
new TH1D(
"hdy",
"dy all", 40, -5, +5);
1157 TH2D* hdxy =
new TH2D(
"hdxy",
"DxDy selected", 40, -5, +5, 40, -5, +5);
1160 TH2D* hdxy2 =
new TH2D(
"hdxy2",
"DxDy selected (GEMTOF tracks)", 40, -5, +5, 40, -5, +5);
1163 TH2D* hdxytof =
new TH2D(
"hdxytof",
"DxDy with TOF700 hits", 40, -5, +5, 40, -5, +5);
1166 TH2D* hdxytof2 =
new TH2D(
"hdxytof2",
"DxDy with TOF700 hits (GEMTOF tracks)", 40, -5, +5, 40, -5, +5);
1169 TH2D* hdxyeff =
new TH2D(
"hdxyeff",
"Efficiency vs DxDy", 40, -5, +5, 40, -5, +5);
1172 TH2D* hdxyeff2 =
new TH2D(
"hdxyeff2",
"Efficiency vs DxDy (GEMTOF tracks)", 40, -5, +5, 40, -5, +5);
1175 TH1D* hdxeff =
new TH1D(
"hdxeff",
"Efficiency vs Dx", 40, -5, +5);
1176 TH1D* hdyeff =
new TH1D(
"hdyeff",
"Efficiency vs Dy", 40, -5, +5);
1177 TH2D* hxygoodtr =
new TH2D(
"hxygoodtr",
"XY(dch) GEM+DCH good tracks", 70, -140, 140, 60, -90, 90);
1180 TH2D* hxygoodtrp =
new TH2D(
"hxygoodtrp",
"XY(dch) GEM+DCH good positive tracks", 70, -140, 140, 60, -90, 90);
1182 hxygoodtrp->
Sumw2();
1183 TH2D* hxygoodtrn =
new TH2D(
"hxygoodtrn",
"XY(dch) GEM+DCH good negative tracks", 70, -140, 140, 60, -90, 90);
1185 hxygoodtrn->
Sumw2();
1186 TH2D* hxygoodtrgem =
new TH2D(
"hxygoodtrgem",
"XY(gem) GEM+DCH good tracks", 70, -140, 140, 60, -90, 90);
1188 hxygoodtrgem->
Sumw2();
1189 TH2D* hxygoodtr2 =
new TH2D(
"hxygoodtr2",
"XY(dch) GEMTOF+DCH good tracks", 70, -140, 140, 60, -90, 90);
1191 hxygoodtr2->
Sumw2();
1192 TH2D* hxygoodtrgem2 =
new TH2D(
"hxygoodtrgem2",
"XY(gem) GEMTOF+DCH good tracks", 70, -140, 140, 60, -90, 90);
1194 hxygoodtrgem2->
Sumw2();
1195 TH2D* hxygoodhit =
new TH2D(
"hxygoodhit",
"XY good tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1197 hxygoodhit->
Sumw2();
1199 new TH2D(
"hxygoodhitp",
"XY good positive tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1201 hxygoodhitp->
Sumw2();
1203 new TH2D(
"hxygoodhitn",
"XY good negative tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1205 hxygoodhitn->
Sumw2();
1207 new TH2D(
"hxygoodhit2",
"XY good tracks (GEMTOF+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1209 hxygoodhit2->
Sumw2();
1210 TH2D* hxygoodhitgem2 =
1211 new TH2D(
"hxygoodhitgem2",
"XY (gem) good tracks (GEMTOF+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1213 hxygoodhitgem2->
Sumw2();
1214 TH2D* hxygoodhita =
new TH2D(
"hxygoodhita",
"XY good tracks (GEM+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1216 hxygoodhita->
Sumw2();
1217 TH2D* hxygoodhita2 =
1218 new TH2D(
"hxygoodhita2",
"XY good tracks (GEMTOF+DCH) with good hits", 70, -140, 140, 60, -90, 90);
1220 hxygoodhita2->
Sumw2();
1221 TH2D* hxygoodhit1 =
new TH2D(
"hxygoodhit1",
"XY good tracks (DCH) with good hits", 70, -140, 140, 60, -90, 90);
1223 hxygoodhit1->
Sumw2();
1224 TH2D* hxybadhit =
new TH2D(
"hxybadhit",
"XY good tracks (GEM+DCH) with no hits", 70, -140, 140, 60, -90, 90);
1226 TH2D* hxybadhita =
new TH2D(
"hxybadhita",
"XY good tracks (GEM+DCH) with no hits", 70, -140, 140, 60, -90, 90);
1229 TH2D* hxygemtofdchtof =
1230 new TH2D(
"hxygemtofdchtof",
"XY(gem) GEMTOF and DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1232 hxygemtofdchtof->
Sumw2();
1233 TH2D* hxygemtofdchtofd =
1234 new TH2D(
"hxygemtofdchtofd",
"XY(dch) GEMTOF and DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1236 hxygemtofdchtofd->
Sumw2();
1237 TH2D* hxygemtofdchtof1 =
1238 new TH2D(
"hxygemtofdchtof1",
"XY(gem) GEMTOF+DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1240 hxygemtofdchtof1->
Sumw2();
1241 TH2D* hxygemtofdchtofd1 =
1242 new TH2D(
"hxygemtofdchtofd1",
"XY(dch) GEMTOF+DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1244 hxygemtofdchtofd1->
Sumw2();
1245 TH2D* hxygemtofdchtof2 =
1246 new TH2D(
"hxygemtofdchtof2",
"XY(gem) GEMTOF+DCHTOF good tracks (same TOF hit)", 70, -140, 140, 60, -90, 90);
1248 hxygemtofdchtof2->
Sumw2();
1249 TH2D* hxygemtofdchtofd2 =
1250 new TH2D(
"hxygemtofdchtofd2",
"XY(dch) GEMTOF+DCHTOF good tracks (same TOF hit)", 70, -140, 140, 60, -90, 90);
1252 hxygemtofdchtofd2->
Sumw2();
1254 TH1D* hpgemtofdchtof =
new TH1D(
"hpgemtofdchtof",
"P GEMTOF and DCHTOF good tracks", 1000, -10, 10);
1256 hpgemtofdchtof->
Sumw2();
1257 TH1D* hpgemtofdchtof1 =
new TH1D(
"hpgemtofdchtof1",
"P GEMTOF+DCHTOF good tracks", 1000, -10, 10);
1259 hpgemtofdchtof1->
Sumw2();
1260 TH1D* hpgemtofdchtof2 =
new TH1D(
"hpgemtofdchtof2",
"P GEMTOF+DCHTOF good tracks (same TOF hit)", 1000, -10, 10);
1262 hpgemtofdchtof2->
Sumw2();
1266 new TH2D(
"hxyeff",
"Efficiency GEM+DCH+TOF700 vs XY good GEM+DCH tracks", 70, -140, 140, 60, -90, 90);
1270 new TH2D(
"hxyeffp",
"Efficiency GEM+DCH+TOF700 vs XY good GEM+DCH positive tracks", 70, -140, 140, 60, -90, 90);
1274 new TH2D(
"hxyeffn",
"Efficiency GEM+DCH+TOF700 vs XY good GEM+DCH negative tracks", 70, -140, 140, 60, -90, 90);
1278 new TH2D(
"hxyeff2",
"Efficiency GEMTOF+DCH+TOF700 vs XY good GEMTOF+DCH tracks", 70, -140, 140, 60, -90, 90);
1281 TH1D* hxeff =
new TH1D(
"hxeff",
"Efficiency GEM+DCH+TOF700 vs X good GEM+DCH tracks", 70, -140, 140);
1282 TH1D* hyeff =
new TH1D(
"hyeff",
"Efficiency GEM+DCH+TOF700 vs Y good GEM+DCH tracks", 60, -90, 90);
1283 TH2D* hxyeffmg =
new TH2D(
"hxyeffmg",
"Efficiency GEM+DCH vs XY good GEM tracks", 70, -140, 140, 60, -90, 90);
1287 new TH2D(
"hxyeffmg2",
"Efficiency GEMTOF+DCH vs XY good GEMTOF tracks", 70, -140, 140, 60, -90, 90);
1291 new TH2D(
"hxyeffmg2f",
"Efficiency GEMTOF+DCH vs XY good GEM tracks (full)", 70, -140, 140, 60, -90, 90);
1293 hxyeffmg2f->
Sumw2();
1294 TH2D* hxyeffmd =
new TH2D(
"hxyeffmd",
"Efficiency GEM+DCH vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
1297 TH2D* hxyeffm1d =
new TH2D(
"hxyeffm1d",
"Efficiency DCH+TOF700 vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
1300 TH2D* hxyeffdg =
new TH2D(
"hxyeffdg",
"Efficiency DCH vs XY good GEM tracks", 70, -140, 140, 60, -90, 90);
1303 TH2D* hxyeffgd =
new TH2D(
"hxyeffgd",
"Efficiency GEM vs XY good DCH tracks", 70, -140, 140, 60, -90, 90);
1306 TH2D* hxyeffgemtof =
1307 new TH2D(
"hxyeffgemtof",
"Efficiency GEMTOF vs XY good GEM tracks", 70, -140, 140, 60, -90, 90);
1309 hxyeffgemtof->
Sumw2();
1310 TH2D* hxyeffgemtofdchtof1 =
1311 new TH2D(
"hxyeffgemtofdchtof1",
"Efficiency vs XY(gem) GEMTOF+DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1313 hxyeffgemtofdchtof1->
Sumw2();
1314 TH2D* hxyeffgemtofdchtofd1 =
1315 new TH2D(
"hxyeffgemtofdchtofd1",
"Efficiency vs XY(dch) GEMTOF+DCHTOF good tracks", 70, -140, 140, 60, -90, 90);
1316 hxyeffgemtofdchtofd1->
SetOption(
"COLZ");
1317 hxyeffgemtofdchtofd1->
Sumw2();
1318 TH2D* hxyeffgemtofdchtof2 =
1319 new TH2D(
"hxyeffgemtofdchtof2",
"Efficiency vs XY(gem) GEMTOF+DCHTOF good tracks (same TOF hit)", 70, -140, 140,
1322 hxyeffgemtofdchtof2->
Sumw2();
1323 TH2D* hxyeffgemtofdchtofd2 =
1324 new TH2D(
"hxyeffgemtofdchtofd2",
"Efficiency vs XY(dch) GEMTOF+DCHTOF good tracks (same TOF hit)", 70, -140,
1326 hxyeffgemtofdchtofd2->
SetOption(
"COLZ");
1327 hxyeffgemtofdchtofd2->
Sumw2();
1330 TH1D* hpeff =
new TH1D(
"hpeff",
"Efficiency GEM+DCH+TOF700 vs P good GEM+DCH tracks", 1000, -10, 10);
1332 TH1D* hpeff2 =
new TH1D(
"hpeff2",
"Efficiency GEMTOF+DCH+TOF700 vs P good GEMTOF+DCH tracks", 1000, -10, 10);
1334 TH1D* hpeff2gt =
new TH1D(
"hpeff2gt",
"Efficiency GEMTOF+DCH+TOF700 vs P good GEMTOF tracks", 1000, -10, 10);
1336 TH1D* hpeffmg =
new TH1D(
"hpeffmg",
"Efficiency GEM+DCH vs P good GEM tracks", 1000, -10, 10);
1338 TH1D* hpeffmg2 =
new TH1D(
"hpeffmg2",
"Efficiency GEMTOF+DCH vs P good GEMTOF tracks", 1000, -10, 10);
1340 TH1D* hpeffmg2f =
new TH1D(
"hpeffmg2f",
"Efficiency GEMTOF+DCH vs P good GEM tracks", 1000, -10, 10);
1342 TH1D* hpeffgemtof =
new TH1D(
"hpeffgemtof",
"Efficiency GEMTOFvs P good GEM tracks", 1000, -10, 10);
1343 hpeffgemtof->
Sumw2();
1345 TH1D* hpeffgemtofdchtof =
1346 new TH1D(
"hpeffgemtofdchtof",
"Efficiency vs P GEMTOF and DCHTOF good tracks", 1000, -10, 10);
1348 hpeffgemtofdchtof->
Sumw2();
1349 TH1D* hpeffgemtofdchtof1 =
1350 new TH1D(
"hpeffgemtofdchtof1",
"Efficiency vs P P GEMTOF+DCHTOF good tracks", 1000, -10, 10);
1352 hpeffgemtofdchtof1->
Sumw2();
1353 TH1D* hpeffgemtofdchtof2 =
1354 new TH1D(
"hpeffgemtofdchtof2",
"Efficiency vs P P GEMTOF+DCHTOF good tracks (same TOF hit)", 1000, -10, 10);
1356 hpeffgemtofdchtof2->
Sumw2();
1364 TH1D* hmfr0 =
new TH1D(
"hmfr0",
"M2 all particles", 400, -0.5, 9.5);
1365 TH1D* hmfrall =
new TH1D(
"hmfrall",
"M2 all fragments", 400, -0.5, 9.5);
1366 TH1D* hmfr =
new TH1D(
"hmfr",
"M2 selected fragments", 400, -0.5, 9.5);
1368 TH3D* hmfr0tt =
new TH3D(
"hmfr0tt",
"M2 vs trigger vs target all particles", 400, -0.5, 9.5, 5, 1, 6, 6, 0, 6);
1369 TH3D* hmfralltt =
new TH3D(
"hmfralltt",
"M2 vs trigger vs target all fragments", 400, -0.5, 9.5, 5, 1, 6, 6, 0, 6);
1370 TH3D* hmfrtt =
new TH3D(
"hmfrtt",
"M2 vs trigger vs target selected fragments", 400, -0.5, 9.5, 5, 1, 6, 6, 0, 6);
1412 TH2D* hghitdxvsp_pi =
1413 new TH2D(
"hghitdxvsp_pi",
"X GEM track distance from DCH1 hit vs momentum (pions)", 50, 0, 5, 100, -5, 5);
1416 TH2D* hghitdxvsp_p =
1417 new TH2D(
"hghitdxvsp_p",
"X GEM track distance from DCH1 hit vs momentum (protons)", 50, 0, 5, 100, -5, 5);
1420 TH2D* hghitdxvsp_d =
1421 new TH2D(
"hghitdxvsp_d",
"X GEM track distance from DCH1 hit vs momentum (deuterons)", 50, 0, 5, 100, -5, 5);
1424 TH2D* hhitdxvsp_pi =
1425 new TH2D(
"hhitdxvsp_pi",
"X track distance from TOF700 hit vs momentum (pions)", 50, 0, 5, 100, -5, 5);
1429 new TH2D(
"hhitdxvsp_p",
"X track distance from TOF700 hit vs momentum (protons)", 50, 0, 5, 100, -5, 5);
1433 new TH2D(
"hhitdxvsp_d",
"X track distance from TOF700 hit vs momentum (deuterons)", 50, 0, 5, 100, -5, 5);
1436 TH1F* hplaz =
new TH1F(
"hplaz",
"Z hits coordinates TOF700 planes", 100, 600, 650);
1437 TH1F* hpla =
new TH1F(
"hpla",
"X hits on all TOF700 planes", 300, -150, 150);
1438 TH1F* hpla1a =
new TH1F(
"hpla1a",
"X hits on TOF700 plane 1A", 300, -150, 150);
1439 TH1F* hpla1b =
new TH1F(
"hpla1b",
"X hits on TOF700 plane 1B", 300, -150, 150);
1440 TH1F* hpla2ac =
new TH1F(
"hpla2ac",
"X hits on TOF700 plane 2A, central row", 300, -150, 150);
1441 TH1F* hpla2au =
new TH1F(
"hpla2au",
"X hits on TOF700 plane 2A, upper row", 300, -150, 150);
1442 TH1F* hpla2bc =
new TH1F(
"hpla2bc",
"X hits on TOF700 plane 2B, central row", 300, -150, 150);
1443 TH1F* hpla2bu =
new TH1F(
"hpla2bu",
"X hits on TOF700 plane 2B, upper row", 300, -150, 150);
1444 TH1F* hpla2abc =
new TH1F(
"hpla2abc",
"X hits on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1446 TH2F* h2pla1a =
new TH2F(
"h2pla1a",
"XY hits on TOF700 plane 1A", 300, -150, 150, 170, -85, +85);
1447 TH2F* h2pla1b =
new TH2F(
"h2pla1b",
"XY hits on TOF700 plane 1B", 300, -150, 150, 170, -85, +85);
1448 TH2F* h2pla2ac =
new TH2F(
"h2pla2ac",
"XY hits on TOF700 plane 2A, central row", 300, -150, 150, 170, -85, +85);
1449 TH2F* h2pla2au =
new TH2F(
"h2pla2au",
"XY hits on TOF700 plane 2A, upper row", 300, -150, 150, 170, -85, +85);
1450 TH2F* h2pla2bc =
new TH2F(
"h2pla2bc",
"XY hits on TOF700 plane 2B, central row", 300, -150, 150, 170, -85, +85);
1451 TH2F* h2pla2bu =
new TH2F(
"h2pla2bu",
"XY hits on TOF700 plane 2B, upper row", 300, -150, 150, 170, -85, +85);
1453 new TH2F(
"h2pla2abc",
"XY hits on TOF700 plane 2A & 2B, central row", 300, -150, 150, 170, -85, +85);
1455 TH1F* hplatrz =
new TH1F(
"hplatrz",
"Z matched hits coordinates TOF700 planes", 100, 600, 650);
1456 TH1F* hplatr =
new TH1F(
"hplatr",
"X matched hits on all TOF700 planes", 300, -150, 150);
1457 TH1F* hplatr1a =
new TH1F(
"hplatr1a",
"X matched hits on TOF700 plane 1A", 300, -150, 150);
1458 TH1F* hplatr1b =
new TH1F(
"hplatr1b",
"X matched hits on TOF700 plane 1B", 300, -150, 150);
1459 TH1F* hplatr2ac =
new TH1F(
"hplatr2ac",
"X matched hits on TOF700 plane 2A, central row", 300, -150, 150);
1460 TH1F* hplatr2au =
new TH1F(
"hplatr2au",
"X matched hits on TOF700 plane 2A, upper row", 300, -150, 150);
1461 TH1F* hplatr2bc =
new TH1F(
"hplatr2bc",
"X matched hits on TOF700 plane 2B, central row", 300, -150, 150);
1462 TH1F* hplatr2bu =
new TH1F(
"hplatr2bu",
"X matched hits on TOF700 plane 2B, upper row", 300, -150, 150);
1463 TH1F* hplatr2abc =
new TH1F(
"hplatr2abc",
"X matched hits on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1465 TH1F* hplaeffz =
new TH1F(
"hplaeffz",
"Z efficiency (hits) TOF700 planes", 100, 600, 650);
1466 TH1F* hplaeff =
new TH1F(
"hplaeff",
"X efficiency (hits) on all TOF700 planes", 300, -150, 150);
1467 TH1F* hplaeff1a =
new TH1F(
"hplaeff1a",
"X efficiency (hits) on TOF700 plane 1A", 300, -150, 150);
1468 TH1F* hplaeff1b =
new TH1F(
"hplaeff1b",
"X efficiency (hits) on TOF700 plane 1B", 300, -150, 150);
1469 TH1F* hplaeff2ac =
new TH1F(
"hplaeff2ac",
"X efficiency (hits) on TOF700 plane 2A, central row", 300, -150, 150);
1470 TH1F* hplaeff2au =
new TH1F(
"hplaeff2au",
"X efficiency (hits) on TOF700 plane 2A, upper row", 300, -150, 150);
1471 TH1F* hplaeff2bc =
new TH1F(
"hplaeff2bc",
"X efficiency (hits) on TOF700 plane 2B, central row", 300, -150, 150);
1472 TH1F* hplaeff2bu =
new TH1F(
"hplaeff2bu",
"X efficiency (hits) on TOF700 plane 2B, upper row", 300, -150, 150);
1474 new TH1F(
"hplaeff2abc",
"X efficiency (hits) on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1476 TH1F* hplatraz =
new TH1F(
"hplatraz",
"Z tracks coordinates TOF700 planes", 100, 600, 650);
1477 TH1F* hplatra =
new TH1F(
"hplatra",
"X tracks on all TOF700 planes", 300, -150, 150);
1478 TH1F* hplatra1a =
new TH1F(
"hplatra1a",
"X tracks on TOF700 plane 1A", 300, -150, 150);
1479 TH1F* hplatra1b =
new TH1F(
"hplatra1b",
"X tracks on TOF700 plane 1B", 300, -150, 150);
1480 TH1F* hplatra2ac =
new TH1F(
"hplatra2ac",
"X tracks on TOF700 plane 2A, central row", 300, -150, 150);
1481 TH1F* hplatra2au =
new TH1F(
"hplatra2au",
"X tracks on TOF700 plane 2A, upper row", 300, -150, 150);
1482 TH1F* hplatra2bc =
new TH1F(
"hplatra2bc",
"X tracks on TOF700 plane 2B, central row", 300, -150, 150);
1483 TH1F* hplatra2bu =
new TH1F(
"hplatra2bu",
"X tracks on TOF700 plane 2B, upper row", 300, -150, 150);
1484 TH1F* hplatra2abc =
new TH1F(
"hplatra2abc",
"X tracks on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1486 TH1F* hplatramz =
new TH1F(
"hplatramz",
"Z matched tracks coordinates TOF700 planes", 100, 600, 650);
1487 TH1F* hplatram =
new TH1F(
"hplatram",
"X matched tracks on all TOF700 planes", 300, -150, 150);
1488 TH1F* hplatram1a =
new TH1F(
"hplatram1a",
"X matched tracks on TOF700 plane 1A", 300, -150, 150);
1489 TH1F* hplatram1b =
new TH1F(
"hplatram1b",
"X matched tracks on TOF700 plane 1B", 300, -150, 150);
1490 TH1F* hplatram2ac =
new TH1F(
"hplatram2ac",
"X matched tracks on TOF700 plane 2A, central row", 300, -150, 150);
1491 TH1F* hplatram2au =
new TH1F(
"hplatram2au",
"X matched tracks on TOF700 plane 2A, upper row", 300, -150, 150);
1492 TH1F* hplatram2bc =
new TH1F(
"hplatram2bc",
"X matched tracks on TOF700 plane 2B, central row", 300, -150, 150);
1493 TH1F* hplatram2bu =
new TH1F(
"hplatram2bu",
"X matched tracks on TOF700 plane 2B, upper row", 300, -150, 150);
1494 TH1F* hplatram2abc =
1495 new TH1F(
"hplatram2abc",
"X matched tracks on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1497 TH1F* hplaeffaz =
new TH1F(
"hplaeffaz",
"Z efficiency (tracks) TOF700 planes", 100, 600, 650);
1498 TH1F* hplaeffa =
new TH1F(
"hplaeffa",
"X efficiency (tracks) on all TOF700 planes", 300, -150, 150);
1499 TH1F* hplaeffa1a =
new TH1F(
"hplaeffa1a",
"X efficiency (tracks) on TOF700 plane 1A", 300, -150, 150);
1500 TH1F* hplaeffa1b =
new TH1F(
"hplaeffa1b",
"X efficiency (tracks) on TOF700 plane 1B", 300, -150, 150);
1502 new TH1F(
"hplaeffa2ac",
"X efficiency (tracks) on TOF700 plane 2A, central row", 300, -150, 150);
1503 TH1F* hplaeffa2au =
new TH1F(
"hplaeffa2au",
"X efficiency (tracks) on TOF700 plane 2A, upper row", 300, -150, 150);
1505 new TH1F(
"hplaeffa2bc",
"X efficiency (tracks) on TOF700 plane 2B, central row", 300, -150, 150);
1506 TH1F* hplaeffa2bu =
new TH1F(
"hplaeffa2bu",
"X efficiency (tracks) on TOF700 plane 2B, upper row", 300, -150, 150);
1507 TH1F* hplaeffa2abc =
1508 new TH1F(
"hplaeffa2abc",
"X efficiency (tracks) on TOF700 plane 2A & 2B, central row", 300, -150, 150);
1512 TTree* tfr =
new TTree(
"tfr",
"Tree with fragments");
1513 Int_t nurun = 0, nuev = 0, tri = 0, tar = 0;
1514 Double_t pfr = 0., yfr = 0., ptfr = 0., efr = 0., pxfr = 0., pyfr = 0., pzfr = 0., bfr = 0., m2fr = 0.;
1516 tfr->
Branch(
"x700fr", &x700fr,
"x700fr/D");
1517 tfr->
Branch(
"y700fr", &y700fr,
"y700fr/D");
1518 tfr->
Branch(
"m2fr", &m2fr,
"m2fr/D");
1519 tfr->
Branch(
"pxfr", &pxfr,
"px/D");
1520 tfr->
Branch(
"pyfr", &pyfr,
"py/D");
1521 tfr->
Branch(
"pzfr", &pzfr,
"pz/D");
1522 tfr->
Branch(
"pfr", &pfr,
"pfr/D");
1523 tfr->
Branch(
"yfr", &yfr,
"yfr/D");
1524 tfr->
Branch(
"ptfr", &ptfr,
"ptfr/D");
1525 tfr->
Branch(
"bfr", &bfr,
"bfr/D");
1526 tfr->
Branch(
"efr", &efr,
"efr/D");
1527 tfr->
Branch(
"tri", &tri,
"tri/i");
1528 tfr->
Branch(
"tar", &tar,
"tar/i");
1529 tfr->
Branch(
"nurun", &nurun,
"nurun/i");
1530 tfr->
Branch(
"nuev", &nuev,
"nuev/i");
1532 TH1D* hdtx =
new TH1D(
"hdtx",
"dtx", 100, -0.25, +0.25);
1533 TH1D* hdty =
new TH1D(
"hdty",
"dty", 100, -0.25, +0.25);
1534 TH1D* hDdx =
new TH1D(
"hDdx",
"Err dx", 100, 0, 10);
1535 TH1D* hDdy =
new TH1D(
"hDdy",
"Err dy", 100, 0, 10);
1536 TH1D* hDdtx =
new TH1D(
"hDdtx",
"Err dtx", 100, 0, 0.05);
1537 TH1D* hDdty =
new TH1D(
"hDdty",
"Err dty", 100, 0, 0.05);
1538 TH1D* hpdx =
new TH1D(
"hpdx",
"Pull dx", 500, -2.5, +2.5);
1539 TH1D* hpdy =
new TH1D(
"hpdy",
"Pull dy", 500, -2.5, +2.5);
1540 TH1D* hpdtx =
new TH1D(
"hpdtx",
"Pull dtx", 500, -25., +25.);
1541 TH1D* hpdty =
new TH1D(
"hpdty",
"Pull dty", 500, -25., +25.);
1542 TH1D* hchi2m =
new TH1D(
"hChi2m",
"Chi2 GemDch track", 1000, 0, 100);
1543 TH1D* hchi2 =
new TH1D(
"hchi2",
"Chi2 tracks matching", 1000, 0, 100);
1554 char nam[64], tit[64];
1556 float cvel = 29.97925f;
1557 float ekin = 3.2f, ebeam = ekin +
MP, pbeam =
TMath::Sqrt(ebeam * ebeam +
MP *
MP);
1558 float cbeam = pbeam / ebeam;
1559 float cpeak = cbeam *
CFACTOR * cvel;
1563 TOF2->get_chamber_z(
i, &zca[
i]);
1566 Int_t startEvent = 0;
1569 printf(
"\nNumber of events in tracks chain is %d (tof700 chain %d)\n", nEvents, nEventstof700);
1571 int Ntr = 0, Ntr1 = 0, Ntr1g = 0, Ntr2g = 0, Ntr0 = 0, Ntr02 = 0;
1572 Int_t iEv = 0, iEvtof700 = 0, fCurrent = -1, nevs = 0;
1573 UInt_t trackEvId = 0, tof700EvId = 0;
1574 UInt_t trackRunId = 0, tof700RunId = 0;
1575 TH1D *projtmp = 0, *projtmp1 = 0;
1576 for (
Int_t iEv0 = startEvent; iEv0 < startEvent + nEvents; iEv0++) {
1577 if (iEv % 10000 == 0) {
1578 cout <<
"Event: " << iEv <<
"/" << startEvent + nEvents <<
" ( Run " << trackRunId <<
" EvId " << trackEvId
1586 if (mtracks == NULL) {
1594 }
while (gemdchtrack0 == NULL);
1601 if (eventHeader == NULL)
1606 if (tof700RunId == trackRunId && tof700EvId > trackEvId)
1608 if (tof700RunId > trackRunId)
1611 if (!(tof700EvId == trackEvId && tof700RunId == trackRunId)) {
1613 bmnTreetof700->
GetEntry(iEvtof700);
1614 if (eventHeadertof700 == NULL)
1616 tof700EvId = eventHeadertof700->
GetEventId();
1618 tof700RunId = eventHeadertof700->GetRunId();
1625 if (iEvtof700 >= nEventstof700)
1627 if (tof700RunId > trackRunId)
1629 if (tof700RunId == trackRunId && tof700EvId > trackEvId)
1631 }
while (!(tof700EvId == trackEvId && tof700RunId == trackRunId));
1633 if (eventHeadertof700 == NULL)
1635 if (!(tof700EvId == trackEvId && tof700RunId == trackRunId)) {
1636 cout <<
"Not found EventId " << trackEvId <<
" in tof700 digits file" << endl;
1637 cout <<
"Tracks Event: " << iEv <<
", TOF700 Event: " << iEvtof700 << endl;
1638 cout <<
"Tracks RunId: " << trackRunId <<
", TOF700 RunId: " << tof700RunId << endl;
1639 cout <<
"Tracks EventId: " << trackEvId <<
", TOF700 EventId: " << tof700EvId << endl;
1640 if (iEvtof700 >= nEventstof700)
1642 if (tof700RunId > trackRunId)
1644 if (tof700RunId == trackRunId && tof700EvId > trackEvId)
1651 if (
fSp41[trackRunId] <= 0)
1654 tar =
Ntar[trackRunId];
1666 tmax[
i] = -1000000.;
1670 for (
int j = 0; j < 32; j++)
1672 for (
int j = 0; j < 32; j++)
1674 for (
int j = 0; j < 32; j++)
1681 float x = 0., y = 0., z = 0.;
1682 int hchamb[1000] = {0}, hstrip[1000] = {0};
1683 int clchamb[1000] = {0}, clstrip[1000] = {0};
1685 Bool_t usedstrip[1000] = {
false};
1686 Bool_t usedstrip1[1000] = {
false};
1687 Bool_t usedstrip2[1000] = {
false};
1688 Bool_t usedtrack[1000] = {
false};
1689 Bool_t usedtrack1[1000] = {
false};
1690 Bool_t usedtrack2[1000] = {
false};
1692 for (
Int_t iDig = 0; iDig < ntof; ++iDig) {
1701 Float_t lrdiff = digit->GetDiff();
1707 if (
XYPANIN && (
TOF2->get_hit_xp(plane, strip, lrdiff) == 0.))
1711 if (width <
wmi[plane] || width >
wma[plane])
1715 TOF2->get_hit_xyzp(plane, strip, lrdiff, &x, &y, &z);
1717 TOF2->get_hit_xyzng(plane, strip, lrdiff, &x, &y, &z);
1719 TOF2->get_hit_xyz(plane, strip, lrdiff, &x, &y, &z);
1723 TOF2->get_hit_xyz(plane, strip, lrdiff, &x, &y, &z);
1726 hchamb[
nhi] = plane;
1727 hstrip[
nhi] = strip;
1728 smax1[plane] = strip;
1729 if (width > wmax[plane]) {
1730 wmax[plane] = width;
1732 smax[plane] = strip;
1735 nhits[plane][strip]++;
1736 tof[plane][strip] = time;
1738 istr[plane] = strip;
1756 TOF2->get_strip_xyz(plane, strip, &x, &y, &z);
1762 numhit[plane][strip] =
nhi;
1768 int ncln = 0, nclsn = 0;
1776 int clstart = -1, clwidth = -1, cstr = -1;
1777 float samps = 0., timemin = 1000000000.;
1778 float widthmax = 0.;
1782 for (
int j = 0; j < nstr; j++) {
1789 timemin =
tof[
i][j];
1793 if (
tof[
i][j] < timemin) {
1794 timemin =
tof[
i][j];
1809 if (j == (nstr - 1)) {
1811 clstrip[ncl0] = cstr;
1812 clwid[ncl0] = samps;
1813 clwidth = (j + 1 - clstart);
1814 tcl[
i][ncl[
i]] = timemin;
1815 acl[
i][ncl[
i]] = samps;
1816 wcl[
i][ncl[
i]] = clwidth;
1820 timemin = 1000000000.;
1822 int ih = numhit[
i][cstr];
1824 hclnums->
Fill(clwidth);
1826 hclnumb->
Fill(clwidth);
1837 if (
zhi[numhit[
i][cstr]] < 600)
1838 hpla1a->
Fill(
xhi[numhit[
i][cstr]]);
1839 if (
zhi[numhit[
i][cstr]] > 605 &&
zhi[numhit[
i][cstr]] < 610)
1840 hpla1b->
Fill(
xhi[numhit[
i][cstr]]);
1841 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] < 20)
1842 hpla2ac->
Fill(
xhi[numhit[
i][cstr]]);
1843 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] > 20)
1844 hpla2au->
Fill(
xhi[numhit[
i][cstr]]);
1845 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1846 hpla2bc->
Fill(
xhi[numhit[
i][cstr]]);
1847 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] > 20)
1848 hpla2bu->
Fill(
xhi[numhit[
i][cstr]]);
1849 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1850 hpla2abc->
Fill(
xhi[numhit[
i][cstr]]);
1851 if (
zhi[numhit[
i][cstr]] < 600)
1852 h2pla1a->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1853 if (
zhi[numhit[
i][cstr]] > 605 &&
zhi[numhit[
i][cstr]] < 610)
1854 h2pla1b->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1855 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] < 20)
1856 h2pla2ac->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1857 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] > 20)
1858 h2pla2au->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1859 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1860 h2pla2bc->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1861 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] > 20)
1862 h2pla2bu->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1863 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1864 h2pla2abc->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1866 }
else if (clstart >= 0) {
1868 clstrip[ncl0] = cstr;
1869 clwid[ncl0] = samps;
1870 clwidth = (j - clstart);
1871 tcl[
i][ncl[
i]] = timemin;
1872 acl[
i][ncl[
i]] = samps;
1873 wcl[
i][ncl[
i]] = clwidth;
1877 timemin = 1000000000.;
1880 int ih = numhit[
i][cstr];
1882 hclnums->
Fill(clwidth);
1884 hclnumb->
Fill(clwidth);
1895 if (
zhi[numhit[
i][cstr]] < 600)
1896 hpla1a->
Fill(
xhi[numhit[
i][cstr]]);
1897 if (
zhi[numhit[
i][cstr]] > 605 &&
zhi[numhit[
i][cstr]] < 610)
1898 hpla1b->
Fill(
xhi[numhit[
i][cstr]]);
1899 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] < 20)
1900 hpla2ac->
Fill(
xhi[numhit[
i][cstr]]);
1901 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] > 20)
1902 hpla2au->
Fill(
xhi[numhit[
i][cstr]]);
1903 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1904 hpla2bc->
Fill(
xhi[numhit[
i][cstr]]);
1905 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] > 20)
1906 hpla2bu->
Fill(
xhi[numhit[
i][cstr]]);
1907 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1908 hpla2abc->
Fill(
xhi[numhit[
i][cstr]]);
1909 if (
zhi[numhit[
i][cstr]] < 600)
1910 h2pla1a->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1911 if (
zhi[numhit[
i][cstr]] > 605 &&
zhi[numhit[
i][cstr]] < 610)
1912 h2pla1b->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1913 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] < 20)
1914 h2pla2ac->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1915 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 630 &&
yhi[numhit[
i][cstr]] > 20)
1916 h2pla2au->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1917 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1918 h2pla2bc->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1919 if (
zhi[numhit[
i][cstr]] > 635 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] > 20)
1920 h2pla2bu->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1921 if (
zhi[numhit[
i][cstr]] > 625 &&
zhi[numhit[
i][cstr]] < 660 &&
yhi[numhit[
i][cstr]] < 20)
1922 h2pla2abc->
Fill(
xhi[numhit[
i][cstr]],
yhi[numhit[
i][cstr]]);
1947 hnclsn->
Fill(nclsn);
1950 float xyz[3] = {0.}, cxyz[3] = {0.}, xrpc = 0., yrpc = 0., dz = 100., tx = 0., ty = 0., zcha = 0., tx0 = 0.;
1951 float xrpcm = 0., yrpcm = 0., zrpcm = 0.;
1952 float xrpcm1 = 0., yrpcm1 = 0., zrpcm1 = 0.;
1953 Int_t crpc1 = -1, crpc2 = -1;
1954 float txdch = 0., tydch = 0., xyzdch[3] = {0.}, cxyzdch[3] = {0.};
1955 float beta = 1.0f, mass = 1.0f, mass2 = 1.0f, tcor = 0., tcorc = 0., tcors = 0., tcorspi = 0., tcorcpi = 0.;
1957 int ntr = mtracks->GetEntriesFast();
1960 int ntr0 = 0, ntr02 = 0;
1961 int ntr1 = 0, ntr1g = 0, ntr2g = 0;
1962 int iflag = 0, igem = 0, idch = 0;
1971 Bool_t gooddch =
false, goodgem =
false, goodgemdch =
false, gooddchtof =
false, goodgemdchtof =
false,
1973 Bool_t goodgemdch2 =
false, goodgemdchtof2 =
false;
2004 Double_t le = 0., p = 0., ps = 0., pmod = 0., lenr = 0.;
2005 int himin = -1, himin1 = -1, himin2 = -1;
2009 Int_t Npairs = 0, Npairs1 = 0, Npairs2 = 0;
2022 double dist = 0., distmin = 1000000000.0f, distmin1 = 1000000000.0f, distmin2 = 1000000000.0f;
2032 float massmin1 = 0.;
2033 float massmax1 = 0.;
2034 float massmin2 = 0.;
2035 float massmax2 = 0.;
2037 float massmaxpi = 0.;
2038 float massminpi = 0.;
2048 double timepeak = 0., betapeak = 0.;
2049 Bool_t first_track =
true;
2051 Int_t ntrgem = 0, ntrdch0 = 0, ntrdch = 0, ntrgem0 = 0, ntrgemcut = 0;
2052 Double_t xtrgem[100], xtrgem0[100], ytrgem[100], xtrdch[100], ytrdch[100], dxtrgem[100], dytrgem[100],
2053 ztrgem[100], ztrgem1st[100];
2054 Double_t txtrgem[100], tytrgem[100], txtrdch[100], tytrdch[100];
2056 for (
Int_t iTr = 0; iTr < ntr; ++iTr) {
2058 if (gemdchtrack == NULL)
2077 cxyz[0] = tx /
TMath::Sqrt(1. + tx * tx + ty * ty);
2078 cxyz[1] = ty /
TMath::Sqrt(1. + tx * tx + ty * ty);
2079 cxyz[2] = 1. /
TMath::Sqrt(1. + tx * tx + ty * ty);
2086 cxyzdch[0] = txdch /
TMath::Sqrt(1. + txdch * txdch + tydch * tydch);
2087 cxyzdch[1] = tydch /
TMath::Sqrt(1. + txdch * txdch + tydch * tydch);
2088 cxyzdch[2] = 1. /
TMath::Sqrt(1. + txdch * txdch + tydch * tydch);
2097 cxyz[0] = cxyzdch[0];
2098 cxyz[1] = cxyzdch[1];
2099 cxyz[2] = cxyzdch[2];
2103 xgoodtr1 = xyzdch[0];
2104 ygoodtr1 = xyzdch[1];
2106 Double_t xdch = xgoodtr1 + txdch * (z_tof700_average - xyzdch[2]);
2107 Double_t ydch = ygoodtr1 + tydch * (z_tof700_average - xyzdch[2]);
2108 if (xdch >= xmintof700 && xdch <= xmaxtof700 && ydch >= ymintof700 && ydch <= ymaxtof700) {
2109 hxydch->
Fill(xgoodtr, ygoodtr);
2110 hxydch1->
Fill(xgoodtr1, ygoodtr1);
2114 hxydch->
Fill(xgoodtr, ygoodtr);
2115 hxydch1->
Fill(xgoodtr1, ygoodtr1);
2122 xtrdch[ntrdch] = xyzdch[0];
2123 ytrdch[ntrdch] = xyzdch[1];
2124 txtrdch[ntrdch] = txdch;
2125 tytrdch[ntrdch] = tydch;
2140 if (QpGem != 0. && (gtrack->
GetParamLast()->GetZ() > 500.f)) {
2141 hp0->
Fill(1. / QpGem);
2165 Xpv = gemdchtrack->
GetXpv();
2166 Ypv = gemdchtrack->
GetYpv();
2179 if ((!goodpv) || nGemHits <
MINGEMNDF || nSiHits <
MINSIHITS || xGem < -140.f || xGem > 240.f
2180 || yGem < -40.f || yGem > 200.f || txGem < -0.5f || txGem > 1.0f || tyGem < -0.1f
2181 || tyGem > 0.5f || Xpv < -6.5f + PV_HARD || Xpv > 7.5f -
PV_HARD || Ypv < -4.5f +
PV_HARD
2182 || Ypv > 9.5f -
PV_HARD || Xpv == 0. || Ypv == 0. || QpGem == 0.0f
2186 printf(
"xGem %f yGem %f txGem %f tyGem %f Xpv %f Ypv %f QpGem %f\n", xGem, yGem, txGem,
2187 tyGem, Xpv, Ypv, QpGem);
2200 Double_t xgema = xGem + txGem * (z_tof700_average - zGem);
2201 Double_t ygema = yGem + tyGem * (z_tof700_average - zGem);
2202 if (xgema >= xmintof700 && xgema <= xmaxtof700 && ygema >= ymintof700
2203 && ygema <= ymaxtof700)
2215 hxygem->
Fill(xGem, yGem);
2217 pxygem_p->
Fill(xGem, yGem, p);
2219 pxygem_pn->
Fill(xGem, yGem, -p);
2221 pxygem_tx->
Fill(xGem, yGem, txGem);
2223 pxygem_txn->
Fill(xGem, yGem, txGem);
2225 pxygem_ty->
Fill(xGem, yGem, tyGem);
2227 pxygem_tyn->
Fill(xGem, yGem, tyGem);
2229 hxygem0->
Fill(xGem1st, yGem1st);
2231 pxygem0_p->
Fill(xGem1st, yGem1st, p);
2233 pxygem0_pn->
Fill(xGem1st, yGem1st, -p);
2235 pxygem0_tx->
Fill(xGem1st, yGem1st, txGem1st);
2237 pxygem0_txn->
Fill(xGem1st, yGem1st, txGem1st);
2239 pxygem0_ty->
Fill(xGem1st, yGem1st, tyGem1st);
2241 pxygem0_tyn->
Fill(xGem1st, yGem1st, tyGem1st);
2243 hxygem0p->
Fill(xGem1st, yGem1st);
2245 hxygem0n->
Fill(xGem1st, yGem1st);
2258 hxygem->
Fill(xGem, yGem);
2260 pxygem_p->
Fill(xGem, yGem, p);
2262 pxygem_pn->
Fill(xGem, yGem, -p);
2264 pxygem_tx->
Fill(xGem, yGem, txGem);
2266 pxygem_txn->
Fill(xGem, yGem, txGem);
2268 pxygem_ty->
Fill(xGem, yGem, tyGem);
2270 pxygem_tyn->
Fill(xGem, yGem, tyGem);
2272 hxygem0->
Fill(xGem1st, yGem1st);
2274 pxygem0_p->
Fill(xGem1st, yGem1st, p);
2276 pxygem0_pn->
Fill(xGem1st, yGem1st, -p);
2278 pxygem0_tx->
Fill(xGem1st, yGem1st, txGem1st);
2280 pxygem0_txn->
Fill(xGem1st, yGem1st, txGem1st);
2282 pxygem0_ty->
Fill(xGem1st, yGem1st, tyGem1st);
2284 pxygem0_tyn->
Fill(xGem1st, yGem1st, tyGem1st);
2286 hxygem0p->
Fill(xGem1st, yGem1st);
2288 hxygem0n->
Fill(xGem1st, yGem1st);
2293 Double_t xgema = xGem + txGem * (z_tof700_average - zGem);
2294 Double_t ygema = yGem + tyGem * (z_tof700_average - zGem);
2295 if (xgema >= xmintof700 && xgema <= xmaxtof700 && ygema >= ymintof700
2296 && ygema <= ymaxtof700)
2308 hxygem->
Fill(xGem, yGem);
2310 pxygem_p->
Fill(xGem, yGem, p);
2312 pxygem_pn->
Fill(xGem, yGem, -p);
2314 pxygem_tx->
Fill(xGem, yGem, txGem);
2316 pxygem_txn->
Fill(xGem, yGem, txGem);
2318 pxygem_ty->
Fill(xGem, yGem, tyGem);
2320 pxygem_tyn->
Fill(xGem, yGem, tyGem);
2322 hxygem0->
Fill(xGem1st, yGem1st);
2324 pxygem0_p->
Fill(xGem1st, yGem1st, p);
2326 pxygem0_pn->
Fill(xGem1st, yGem1st, -p);
2328 pxygem0_tx->
Fill(xGem1st, yGem1st, txGem1st);
2330 pxygem0_txn->
Fill(xGem1st, yGem1st, txGem1st);
2332 pxygem0_ty->
Fill(xGem1st, yGem1st, tyGem1st);
2334 pxygem0_tyn->
Fill(xGem1st, yGem1st, tyGem1st);
2336 hxygem0p->
Fill(xGem1st, yGem1st);
2338 hxygem0n->
Fill(xGem1st, yGem1st);
2351 hxygem->
Fill(xGem, yGem);
2353 pxygem_p->
Fill(xGem, yGem, p);
2355 pxygem_pn->
Fill(xGem, yGem, -p);
2357 pxygem_tx->
Fill(xGem, yGem, txGem);
2359 pxygem_txn->
Fill(xGem, yGem, txGem);
2361 pxygem_ty->
Fill(xGem, yGem, tyGem);
2363 pxygem_tyn->
Fill(xGem, yGem, tyGem);
2365 hxygem0->
Fill(xGem1st, yGem1st);
2367 pxygem0_p->
Fill(xGem1st, yGem1st, p);
2369 pxygem0_pn->
Fill(xGem1st, yGem1st, -p);
2371 pxygem0_tx->
Fill(xGem1st, yGem1st, txGem1st);
2373 pxygem0_txn->
Fill(xGem1st, yGem1st, txGem1st);
2375 pxygem0_ty->
Fill(xGem1st, yGem1st, tyGem1st);
2377 pxygem0_tyn->
Fill(xGem1st, yGem1st, tyGem1st);
2379 hxygem0p->
Fill(xGem1st, yGem1st);
2381 hxygem0n->
Fill(xGem1st, yGem1st);
2398 pzfr = pfr /
TMath::Sqrt(1. + txGem1st * txGem1st + tyGem1st * tyGem1st);
2399 pxfr = pzfr * txGem1st;
2400 pyfr = pzfr * tyGem1st;
2404 xtrgem0[ntrgem] = xGem0;
2405 xtrgem[ntrgem] = xGem;
2406 ytrgem[ntrgem] = yGem;
2407 txtrgem[ntrgem] = txGem;
2408 tytrgem[ntrgem] = tyGem;
2411 ztrgem[ntrgem] = zGem;
2412 ztrgem1st[ntrgem] = zGem1st;
2418 if (goodgem && gooddch) {
2420 hdxyreal->
Fill(xGem - xyzdch[0], yGem - xyzdch[1]);
2421 hdtxtyreal->
Fill(txGem - txdch, tyGem - tydch);
2424 dxm = gemdchtrack->
GetDx();
2425 dym = gemdchtrack->
GetDy();
2426 dtx = gemdchtrack->
GetDtx();
2427 dty = gemdchtrack->
GetDty();
2428 Ddx = gemdchtrack->
GetDdx();
2429 Ddy = gemdchtrack->
GetDdy();
2430 Ddtx = gemdchtrack->
GetDdtx();
2431 Ddty = gemdchtrack->
GetDdty();
2432 Chi2m = gemdchtrack->
GetChi2();
2435 hdxy0->
Fill(dxm, dym);
2446 hchi2m->
Fill(Chi2m);
2447 chi2 = dxm * dxm / Ddx + dym * dym / Ddy;
2453 hdxy->
Fill(xGem - xyzdch[0], yGem - xyzdch[1]);
2454 hxygoodtr->
Fill(xgoodtr, ygoodtr);
2456 hxygoodtrp->
Fill(xgoodtr, ygoodtr);
2458 hxygoodtrn->
Fill(xgoodtr, ygoodtr);
2459 hxygoodtrgem->
Fill(xGem, yGem);
2468 hdxy->
Fill(dxm, dym);
2469 hxygoodtr->
Fill(xgoodtr, ygoodtr);
2471 hxygoodtrp->
Fill(xgoodtr, ygoodtr);
2473 hxygoodtrn->
Fill(xgoodtr, ygoodtr);
2474 hxygoodtrgem->
Fill(xGem, yGem);
2483 printf(
" ********** Event %d Track %d ******************\n", iEv, iTr);
2488 for (
int ir = 0; ir < 5; ir++)
2489 covdch0(ir, ir) = track->
GetParamFirst()->GetCovariance(ir, ir);
2491 covdch(0, 0) = covdch0(0, 0);
2492 covdch(1, 1) = covdch0(2, 2);
2493 covdch(2, 2) = covdch0(1, 1);
2494 covdch(3, 3) = covdch0(3, 3);
2499 covdch(4, 4) = 10000.;
2501 printf(
" Err DCH x = %10.5f\n",
TMath::Sqrt(covdch(0, 0)));
2503 printf(
" Err DCH y = %10.5f\n",
TMath::Sqrt(covdch(1, 1)));
2505 printf(
" Err DCH tx = %10.5f\n",
TMath::Sqrt(covdch(2, 2)));
2507 printf(
" Err DCH ty = %10.5f\n",
TMath::Sqrt(covdch(3, 3)));
2513 for (
int ir = 0; ir < 5; ir++)
2514 for (
int ic = 0; ic < 5; ic++)
2515 covgem(ir, ic) = gtrack->
GetParamLast()->GetCovariance(ir, ic);
2517 printf(
" Err GEM x = %10.5f\n",
TMath::Sqrt(covgem(0, 0)));
2519 printf(
" Err GEM y = %10.5f\n",
TMath::Sqrt(covgem(1, 1)));
2521 printf(
" Err GEM tx = %10.5f\n",
TMath::Sqrt(covgem(2, 2)));
2523 printf(
" Err GEM ty = %10.5f\n",
TMath::Sqrt(covgem(3, 3)));
2525 printf(
" Err GEM ip = %10.5f\n",
TMath::Sqrt(covgem(4, 4)) / QpGem);
2530 icovgemdch += icovgem;
2531 icovgemdch += icovdch;
2532 covgemdch = icovgemdch;
2534 TVectorD sumgemdch(5), pargemdch(5);
2535 TVectorD pargem(5), pardch(5), pagemdch(5);
2536 pardch(0) = xyzdch[0];
2537 pardch(1) = xyzdch[1];
2547 sumgemdch += icovgem * pargem;
2548 sumgemdch += icovdch * pardch;
2549 pargemdch = covgemdch * sumgemdch;
2550 xyz[0] = pargemdch(0);
2551 xyz[1] = pargemdch(1);
2554 hdxrefit1->
Fill(pargemdch(0) - pardch(0));
2555 hdyrefit1->
Fill(pargemdch(1) - pardch(1));
2556 hdtxrefit1->
Fill(pargemdch(2) - pardch(2));
2557 hdtyrefit1->
Fill(pargemdch(3) - pardch(3));
2558 hdxrefit->
Fill(pargemdch(0) - pargem(0));
2559 hdyrefit->
Fill(pargemdch(1) - pargem(1));
2560 hdtxrefit->
Fill(pargemdch(2) - pargem(2));
2561 hdtyrefit->
Fill(pargemdch(3) - pargem(3));
2562 if (pargem(4) != 0.)
2563 hdprefit->
Fill((pargemdch(4) - pargem(4)) / pargem(4));
2565 cxyz[0] = tx /
TMath::Sqrt(1. + tx * tx + ty * ty);
2566 cxyz[1] = ty /
TMath::Sqrt(1. + tx * tx + ty * ty);
2567 cxyz[2] = 1. /
TMath::Sqrt(1. + tx * tx + ty * ty);
2570 printf(
" x %10.5f %10.5f %10.5f\n", pargem(0), pardch(0), pargemdch(0));
2572 printf(
" y %10.5f %10.5f %10.5f\n", pargem(1), pardch(1), pargemdch(1));
2574 printf(
" tx %10.5f %10.5f %10.5f\n", pargem(2), pardch(2), pargemdch(2));
2576 printf(
" ty %10.5f %10.5f %10.5f\n", pargem(3), pardch(3), pargemdch(3));
2578 printf(
" p %10.5f %10.5f %10.5f\n", 1. / pargem(4), 1. / pardch(4), 1. / pargemdch(4));
2582 Int_t nth = 0, itc[100] = {0}, its[100] = {0};
2583 TOF2->get_track_hits(xyz, cxyz, &nth, itc, its);
2584 if (nth > 0 &&
idchambers[itc[0]] != 19.3f) {
2586 xystrip(hxytrackstrips, itc[0], its[0]);
2587 zrpcm = zca[itc[0]];
2588 dz = zrpcm - xyz[2];
2589 xrpcm = xyz[0] + dz * tx;
2590 yrpcm = xyz[1] + dz * ty;
2591 hplatraz->
Fill(zrpcm);
2592 hplatra->
Fill(xrpcm);
2594 hplatra1a->
Fill(xrpcm);
2595 if (zrpcm > 605 && zrpcm < 610)
2596 hplatra1b->
Fill(xrpcm);
2597 if (zrpcm > 625 && zrpcm < 630 && yrpcm < 20)
2598 hplatra2ac->
Fill(xrpcm);
2599 if (zrpcm > 625 && zrpcm < 630 && yrpcm > 20)
2600 hplatra2au->
Fill(xrpcm);
2601 if (zrpcm > 635 && zrpcm < 660 && yrpcm < 20)
2602 hplatra2bc->
Fill(xrpcm);
2603 if (zrpcm > 635 && zrpcm < 660 && yrpcm > 20)
2604 hplatra2bu->
Fill(xrpcm);
2605 if (zrpcm > 625 && zrpcm < 660 && yrpcm < 20)
2606 hplatra2abc->
Fill(xrpcm);
2608 if (nth > 1 &&
idchambers[itc[1]] != 19.3f) {
2610 xystrip(hxytrackstrips, itc[1], its[1]);
2611 zrpcm1 = zca[itc[1]];
2612 dz = zrpcm1 - xyz[2];
2613 xrpcm1 = xyz[0] + dz * tx;
2614 yrpcm1 = xyz[1] + dz * ty;
2615 hplatraz->
Fill(zrpcm1);
2616 hplatra->
Fill(xrpcm1);
2618 hplatra1a->
Fill(xrpcm1);
2619 if (zrpcm1 > 605 && zrpcm1 < 610)
2620 hplatra1b->
Fill(xrpcm1);
2621 if (zrpcm1 > 625 && zrpcm1 < 630 && yrpcm1 < 20)
2622 hplatra2ac->
Fill(xrpcm1);
2623 if (zrpcm1 > 625 && zrpcm1 < 630 && yrpcm1 > 20)
2624 hplatra2au->
Fill(xrpcm1);
2625 if (zrpcm1 > 635 && zrpcm1 < 660 && yrpcm1 < 20)
2626 hplatra2bc->
Fill(xrpcm1);
2627 if (zrpcm1 > 635 && zrpcm1 < 660 && yrpcm1 > 20)
2628 hplatra2bu->
Fill(xrpcm1);
2629 if (zrpcm1 > 625 && zrpcm1 < 660 && yrpcm1 < 20)
2630 hplatra2abc->
Fill(xrpcm1);
2643 distmin = 1000000000.0f;
2644 for (
int icl = 0; icl < ncl0; icl++) {
2649 int ih = numhit[ic][is];
2651 dz =
zhi[ih] - xyz[2];
2653 xrpc = xyz[0] + dz * tx;
2654 yrpc = xyz[1] + dz * ty;
2658 xrpc = xyzdch[0] + dz * tx;
2659 yrpc = xyzdch[1] + dz * ty;
2662 dx = xrpc -
xhi[ih];
2663 dy = yrpc -
yhi[ih];
2669 himin = numhit[ic][is];
2670 Ihit[Npairs] = himin;
2671 Dpairs[Npairs] =
dist;
2673 Itrack[Npairs] = iTr;
2675 Vpairs[Npairs][0] = xgoodtr;
2676 Vpairs[Npairs][1] = ygoodtr;
2677 Vpairs[Npairs][2] = xGem;
2678 Vpairs[Npairs][3] = yGem;
2679 Vpairs[Npairs][4] = zGem;
2680 Vpairs[Npairs][5] = txGem;
2681 Vpairs[Npairs][6] = tyGem;
2682 Vpairs[Npairs][7] = p;
2683 Vpairs[Npairs][8] = dxm;
2684 Vpairs[Npairs][9] = dym;
2685 Vpairs[Npairs][10] = xGem1st;
2686 Vpairs[Npairs][11] = yGem1st;
2687 Vpairs[Npairs][12] = xyz[0];
2689 Vpairs[Npairs][13] = xyz[1];
2690 Vpairs[Npairs][14] = xyz[2];
2691 Vpairs[Npairs][15] = tx;
2692 Vpairs[Npairs][16] = ty;
2693 Vpairs[Npairs][17] = le;
2694 Vpairs[Npairs][18] = pfr;
2695 Vpairs[Npairs][19] = pxfr;
2696 Vpairs[Npairs][20] = pyfr;
2697 Vpairs[Npairs][21] = pzfr;
2698 Vpairs[Npairs][22] = ptfr;
2699 Vpairs[Npairs][23] = corxrpc;
2705 distmin1 = 1000000000.0f;
2706 for (
int icl = 0; icl < ncl0; icl++) {
2711 int ih = numhit[ic][is];
2713 dz =
zhi[ih] - xyzdch[2];
2714 xrpc = xyzdch[0] + dz * txdch;
2715 yrpc = xyzdch[1] + dz * tydch;
2716 dx = xrpc -
xhi[ih];
2717 dy = yrpc -
yhi[ih];
2723 himin1 = numhit[ic][is];
2724 Ihit1[Npairs1] = himin1;
2725 Dpairs1[Npairs1] =
dist;
2728 Itrack1[Npairs1] = iTr;
2730 Vpairs1[Npairs1][0] = xgoodtr1;
2731 Vpairs1[Npairs1][1] = ygoodtr1;
2732 Vpairs1[Npairs1][2] = xyzdch[0];
2733 Vpairs1[Npairs1][3] = xyzdch[1];
2734 Vpairs1[Npairs1][4] = xyzdch[2];
2735 Vpairs1[Npairs1][5] = txdch;
2736 Vpairs1[Npairs1][6] = tydch;
2737 Vpairs1[Npairs1][7] = p;
2738 Vpairs1[Npairs1][8] = 0.;
2740 Vpairs1[Npairs1][8] = 1.;
2746 distmin2 = 1000000000.0f;
2747 for (
int icl = 0; icl < ncl0; icl++) {
2752 int ih = numhit[ic][is];
2754 dz =
zhi[ih] - zGem;
2755 xrpc = xGem + dz * txGem;
2756 yrpc = yGem + dz * tyGem;
2757 dx = xrpc -
xhi[ih];
2758 dy = yrpc -
yhi[ih];
2764 himin2 = numhit[ic][is];
2765 Ihit2[Npairs2] = himin2;
2766 Dpairs2[Npairs2] =
dist;
2769 Itrack2[Npairs2] = iTr;
2771 Vpairs2[Npairs2][0] = xgoodtr;
2772 Vpairs2[Npairs2][1] = xgoodtr;
2773 Vpairs2[Npairs2][2] = xGem;
2774 Vpairs2[Npairs2][3] = yGem;
2775 Vpairs2[Npairs2][4] = zGem;
2776 Vpairs2[Npairs2][5] = txGem;
2777 Vpairs2[Npairs2][6] = tyGem;
2778 Vpairs2[Npairs2][7] = p;
2779 Vpairs2[Npairs2][8] = dxm;
2780 Vpairs2[Npairs2][9] = dym;
2781 Vpairs2[Npairs2][10] = 0.;
2783 Vpairs2[Npairs2][10] = 1.;
2791 distmin = 1000000000.0f;
2792 for (
int ih = 0; ih < nh; ih++) {
2798 dz =
zhi[ih] - xyz[2];
2800 xrpc = xyz[0] + dz * tx;
2801 yrpc = xyz[1] + dz * ty;
2804 xrpc = xyzdch[0] + dz * tx;
2805 yrpc = xyzdch[1] + dz * ty;
2807 dx = xrpc -
xhi[ih];
2808 dy = yrpc -
yhi[ih];
2814 himin = numhit[ic][is];
2815 Ihit[Npairs] = himin;
2816 Dpairs[Npairs] =
dist;
2818 Itrack[Npairs] = iTr;
2820 Vpairs[Npairs][0] = xgoodtr;
2821 Vpairs[Npairs][1] = ygoodtr;
2822 Vpairs[Npairs][2] = xGem;
2823 Vpairs[Npairs][3] = yGem;
2824 Vpairs[Npairs][4] = zGem;
2825 Vpairs[Npairs][5] = txGem;
2826 Vpairs[Npairs][6] = tyGem;
2827 Vpairs[Npairs][7] = p;
2828 Vpairs[Npairs][8] = dxm;
2829 Vpairs[Npairs][9] = dym;
2830 Vpairs[Npairs][10] = xGem1st;
2831 Vpairs[Npairs][11] = yGem1st;
2832 Vpairs[Npairs][12] = xyz[0];
2834 Vpairs[Npairs][13] = xyz[1];
2835 Vpairs[Npairs][14] = xyz[2];
2836 Vpairs[Npairs][15] = tx;
2837 Vpairs[Npairs][16] = ty;
2838 Vpairs[Npairs][17] = le;
2839 Vpairs[Npairs][18] = pfr;
2840 Vpairs[Npairs][19] = pxfr;
2841 Vpairs[Npairs][20] = pyfr;
2842 Vpairs[Npairs][21] = pzfr;
2843 Vpairs[Npairs][22] = ptfr;
2844 Vpairs[Npairs][23] = corxrpc;
2852 distmin1 = 1000000000.0f;
2853 for (
int ih = 0; ih < nh; ih++) {
2859 dz =
zhi[ih] - xyz[2];
2860 xrpc = xyzdch[0] + dz * txdch;
2861 yrpc = xyzdch[1] + dz * tydch;
2862 dx = xrpc -
xhi[ih];
2863 dy = yrpc -
yhi[ih];
2869 himin1 = numhit[ic][is];
2870 Ihit1[Npairs1] = himin1;
2871 Dpairs1[Npairs1] =
dist;
2874 Itrack1[Npairs1] = iTr;
2876 Vpairs1[Npairs1][0] = xgoodtr1;
2877 Vpairs1[Npairs1][1] = ygoodtr1;
2878 Vpairs1[Npairs1][2] = xyzdch[0];
2879 Vpairs1[Npairs1][3] = xyzdch[1];
2880 Vpairs1[Npairs1][4] = xyzdch[2];
2881 Vpairs1[Npairs1][5] = txdch;
2882 Vpairs1[Npairs1][6] = tydch;
2883 Vpairs1[Npairs1][7] = p;
2884 Vpairs1[Npairs1][8] = 0.;
2886 Vpairs1[Npairs1][8] = 1.;
2894 distmin2 = 1000000000.0f;
2895 for (
int ih = 0; ih < nh; ih++) {
2901 dz =
zhi[ih] - zGem;
2902 xrpc = xGem + dz * txGem;
2903 yrpc = yGem + dz * tyGem;
2904 dx = xrpc -
xhi[ih];
2905 dy = yrpc -
yhi[ih];
2911 himin2 = numhit[ic][is];
2912 Ihit2[Npairs2] = himin2;
2913 Dpairs2[Npairs2] =
dist;
2916 Itrack2[Npairs2] = iTr;
2918 Vpairs2[Npairs2][0] = xgoodtr;
2919 Vpairs2[Npairs2][1] = xgoodtr;
2920 Vpairs2[Npairs2][2] = xGem;
2921 Vpairs2[Npairs2][3] = yGem;
2922 Vpairs2[Npairs2][4] = zGem;
2923 Vpairs2[Npairs2][5] = txGem;
2924 Vpairs2[Npairs2][6] = tyGem;
2925 Vpairs2[Npairs2][7] = p;
2926 Vpairs2[Npairs2][8] = dxm;
2927 Vpairs2[Npairs2][9] = dym;
2928 Vpairs2[Npairs2][10] = 0.;
2930 Vpairs2[Npairs2][10] = 1.;
2939 Int_t iptra = 0, ip = 0;
2941 for (
int ip0 = 0; ip0 < Npairs1; ip0++) {
2945 iptra = Itrack1[ip];
2946 if (himin1 >= 0 && !usedstrip1[himin1] && !usedtrack1[iptra]) {
2947 ic = hchamb[himin1];
2948 is = hstrip[himin1];
2951 usedstrip1[himin1] =
true;
2952 usedtrack1[iptra] =
true;
2953 xgoodtr1 = Vpairs1[ip][0];
2954 ygoodtr1 = Vpairs1[ip][1];
2955 xyzdch[0] = Vpairs1[ip][2];
2956 xyzdch[1] = Vpairs1[ip][3];
2957 xyzdch[2] = Vpairs1[ip][4];
2958 txdch = Vpairs1[ip][5];
2959 tydch = Vpairs1[ip][6];
2962 if (Vpairs1[ip][8] != 0.)
2964 hxygoodhit1->
Fill(xgoodtr1, ygoodtr1);
2965 hxygoodclusterdch->
Fill(
xhi[himin1],
yhi[himin1]);
2967 dz =
zhi[himin] - xyzdch[2];
2968 xrpc = xyzdch[0] + dz * txdch;
2969 yrpc = xyzdch[1] + dz * tydch;
2970 hxyhit1->
Fill(xrpc -
xhi[himin1], yrpc -
yhi[himin1]);
2971 phitdxvsx1->
Fill(xrpc, xrpc -
xhi[himin1]);
2972 phitdyvsx1->
Fill(xrpc, yrpc -
yhi[himin1]);
2973 phitdxvsy1->
Fill(yrpc, xrpc -
xhi[himin1]);
2974 phitdyvsy1->
Fill(yrpc, yrpc -
yhi[himin1]);
2975 hhitdxvsx1->
Fill(xrpc, xrpc -
xhi[himin1]);
2977 hhitdxvsp11->
Fill(p, xrpc -
xhi[himin1]);
2978 hhitdyvsp1->
Fill(p, yrpc -
yhi[himin1]);
2979 }
else if (p < 0.f) {
2992 for (
int ip0 = 0; ip0 < Npairs2; ip0++) {
2994 goodgemdch2 =
false;
2997 iptra = Itrack2[ip];
2998 if (himin2 >= 0 && !usedstrip2[himin2] && !usedtrack2[iptra]) {
2999 ic = hchamb[himin2];
3000 is = hstrip[himin2];
3003 usedstrip2[himin2] =
true;
3004 usedtrack2[iptra] =
true;
3005 xgoodtr = Vpairs2[ip][0];
3006 ygoodtr = Vpairs2[ip][1];
3007 xGem = Vpairs2[ip][2];
3008 yGem = Vpairs2[ip][3];
3009 zGem = Vpairs2[ip][4];
3010 txGem = Vpairs2[ip][5];
3011 tyGem = Vpairs2[ip][6];
3013 dxm = Vpairs2[ip][8];
3014 dym = Vpairs2[ip][9];
3016 if (Vpairs2[ip][10] != 0.)
3018 hxygoodhit2->
Fill(xGem, yGem);
3020 dz =
zhi[himin2] - zGem;
3021 xrpc = xGem + dz * txGem;
3022 yrpc = yGem + dz * tyGem;
3023 hxygoodclustergem->
Fill(
xhi[himin2],
yhi[himin2]);
3025 hxyhit2g->
Fill(xrpc -
xhi[himin2], yrpc -
yhi[himin2]);
3026 hhitdxvsx2g->
Fill(xrpc, xrpc -
xhi[himin2]);
3028 hhitdxvsp2g->
Fill(p, xrpc -
xhi[himin2]);
3029 hhitdyvsp2g->
Fill(p, yrpc -
yhi[himin2]);
3030 }
else if (p < 0.f) {
3038 hdxy2->
Fill(dxm, dym);
3039 hxygoodtrgem2->
Fill(xGem, yGem);
3040 hxygoodtr2->
Fill(xgoodtr, ygoodtr);
3042 hxyhit2->
Fill(xrpc -
xhi[himin2], yrpc -
yhi[himin2]);
3043 phitdxvsx2->
Fill(xrpc, xrpc -
xhi[himin2]);
3044 phitdyvsx2->
Fill(xrpc, yrpc -
yhi[himin2]);
3045 phitdxvsy2->
Fill(yrpc, xrpc -
xhi[himin2]);
3046 phitdyvsy2->
Fill(yrpc, yrpc -
yhi[himin2]);
3047 hhitdxvsx2->
Fill(xrpc, xrpc -
xhi[himin2]);
3049 hhitdxvsp22->
Fill(p, xrpc -
xhi[himin2]);
3050 hhitdyvsp2->
Fill(p, yrpc -
yhi[himin2]);
3051 }
else if (p < 0.f) {
3063 Int_t ipa = 0, iptraa = 0;
3064 for (
int ip0 = 0; ip0 < Npairs2; ip0++) {
3067 iptra = Itrack2[ip];
3068 for (
int ip0a = 0; ip0a < Npairs1; ip0a++) {
3070 himin1 = Ihit1[ipa];
3071 iptraa = Itrack1[ipa];
3072 if (usedtrack2[iptra] && usedtrack1[iptraa] && iptra == iptraa) {
3073 xgoodtr = Vpairs2[ip][0];
3074 ygoodtr = Vpairs2[ip][1];
3075 xGem = Vpairs2[ip][2];
3076 yGem = Vpairs2[ip][3];
3078 hpgemtofdchtof->
Fill(p);
3079 hxygemtofdchtof->
Fill(xGem, yGem);
3080 hxygemtofdchtofd->
Fill(xgoodtr, ygoodtr);
3082 if (Vpairs2[ip][10] != 0.)
3085 hpgemtofdchtof1->
Fill(p);
3086 hxygemtofdchtof1->
Fill(xGem, yGem);
3087 hxygemtofdchtofd1->
Fill(xgoodtr, ygoodtr);
3088 if (himin1 == himin2) {
3089 hpgemtofdchtof2->
Fill(p);
3090 hxygemtofdchtof2->
Fill(xGem, yGem);
3091 hxygemtofdchtofd2->
Fill(xgoodtr, ygoodtr);
3104 for (
int ip0 = 0; ip0 < Npairs; ip0++) {
3105 goodgemdchtof =
false;
3106 goodgemdchtof2 =
false;
3113 if (
tof[ic][is] <=
TOFMAX && !usedstrip[himin] && !usedtrack[iptra]) {
3114 usedstrip[himin] =
true;
3115 usedtrack[iptra] =
true;
3116 xgoodtr = Vpairs[ip][0];
3117 ygoodtr = Vpairs[ip][1];
3118 xGem = Vpairs[ip][2];
3119 yGem = Vpairs[ip][3];
3120 zGem = Vpairs[ip][4];
3121 txGem = Vpairs[ip][5];
3122 tyGem = Vpairs[ip][6];
3124 dxm = Vpairs[ip][8];
3125 dym = Vpairs[ip][9];
3126 xGem1st = Vpairs[ip][10];
3127 yGem1st = Vpairs[ip][11];
3128 xyz[0] = Vpairs[ip][12];
3129 xyz[1] = Vpairs[ip][13];
3130 xyz[2] = Vpairs[ip][14];
3131 tx = Vpairs[ip][15];
3132 ty = Vpairs[ip][16];
3133 le = Vpairs[ip][17];
3134 pfr = Vpairs[ip][18];
3135 pxfr = Vpairs[ip][19];
3136 pyfr = Vpairs[ip][20];
3137 pzfr = Vpairs[ip][21];
3138 ptfr = Vpairs[ip][22];
3139 corxrpc = Vpairs[ip][23];
3141 if (usedtrack2[iptra]) {
3143 goodgemdchtof2 =
true;
3144 hdxytof2->
Fill(dxm, dym);
3145 hxygoodhitgem2->
Fill(xGem, yGem);
3147 hpgoodhit2->
Fill(p);
3151 goodgemdchtof =
true;
3152 usedstrip[himin] =
true;
3153 hdxytof->
Fill(dxm, dym);
3156 hxygoodhit->
Fill(xgoodtr, ygoodtr);
3158 hxygoodhitp->
Fill(xgoodtr, ygoodtr);
3160 hxygoodhitn->
Fill(xgoodtr, ygoodtr);
3162 hxygoodcluster->
Fill(
xhi[himin],
yhi[himin]);
3164 xystrip(hxygoodstrips, ic, is);
3165 if (
idchambers[ic] != 19.3 && (ic == crpc1 || ic == crpc2))
3166 xystrip(hxygood1strips, ic, is);
3167 hxygoodtrgem0->
Fill(xGem1st, yGem1st);
3169 hxygoodtrgem0p->
Fill(xGem1st, yGem1st);
3171 hxygoodtrgem0n->
Fill(xGem1st, yGem1st);
3176 dz =
zhi[himin] - xyz[2];
3178 xrpc = xyz[0] + dz * tx;
3179 yrpc = xyz[1] + dz * ty;
3182 xrpc = xyzdch[0] + dz * txdch;
3183 yrpc = xyzdch[1] + dz * tydch;
3185 hxyhit->
Fill(xrpc -
xhi[himin], yrpc -
yhi[himin]);
3186 hxyghit->
Fill(xGem - xyzdch[0], yGem - xyzdch[1]);
3188 hxyhitlr->
Fill(xrpc -
xhi[himin], yrpc -
yhi[himin]);
3190 hxyhitlr->
Fill(xrpc -
xhi[himin], yrpc -
yhi[himin]);
3192 hxdiffs->
Fill(
xhi[himin] - xc);
3194 hxdiffb->
Fill(
xhi[himin] - xc);
3196 hxxhits->
Fill(
xhi[himin] - xc, xrpc - xc);
3198 hxxhitb->
Fill(
xhi[himin] - xc, xrpc - xc);
3203 phitdxvsx->
Fill(xrpc, xrpc -
xhi[himin]);
3204 phitdyvsx->
Fill(xrpc, yrpc -
yhi[himin]);
3205 phitdxvsy->
Fill(yrpc, xrpc -
xhi[himin]);
3206 phitdyvsy->
Fill(yrpc, yrpc -
yhi[himin]);
3207 hhitdxvsx->
Fill(xrpc, xrpc -
xhi[himin]);
3209 hhitdxvsp->
Fill(p, xrpc -
xhi[himin]);
3210 hhitdyvsp->
Fill(p, yrpc -
yhi[himin]);
3212 hhitdxvsp1->
Fill(p, xrpc -
xhi[himin]);
3213 else if (xrpc < 40.)
3214 hhitdxvsp2->
Fill(p, xrpc -
xhi[himin]);
3215 else if (xrpc < 80.)
3216 hhitdxvsp3->
Fill(p, xrpc -
xhi[himin]);
3217 else if (xrpc < 120.)
3218 hhitdxvsp4->
Fill(p, xrpc -
xhi[himin]);
3219 else if (xrpc < 160.)
3220 hhitdxvsp5->
Fill(p, xrpc -
xhi[himin]);
3221 }
else if (p < 0.f) {
3226 hghitdxvsx->
Fill(xGem, xGem - xyzdch[0]);
3228 hghitdxvsp->
Fill(p, xGem - xyzdch[0]);
3229 hghitdyvsp->
Fill(p, yGem - xyzdch[1]);
3231 hghitdxvsp1->
Fill(p, xGem - xyzdch[0]);
3232 else if (xGem < 40.)
3233 hghitdxvsp2->
Fill(p, xGem - xyzdch[0]);
3234 else if (xGem < 80.)
3235 hghitdxvsp3->
Fill(p, xGem - xyzdch[0]);
3236 else if (xGem < 120.)
3237 hghitdxvsp4->
Fill(p, xGem - xyzdch[0]);
3238 else if (xGem < 160.)
3239 hghitdxvsp5->
Fill(p, xGem - xyzdch[0]);
3240 hgdtxvsp->
Fill(p, txGem - txdch);
3241 hgdtxrvsp->
Fill(p, tx0 - txdch);
3242 hgdtx1vsp->
Fill(p, (xGem - xyzdch[0]) / (zGem - zGem1st));
3243 hgdtxty->
Fill(txGem - txdch, tyGem - tydch);
3244 }
else if (p < 0.f) {
3245 hghitdxvspn->
Fill(
fabs(p), xGem - xyzdch[0]);
3246 hghitdyvspn->
Fill(
fabs(p), yGem - xyzdch[1]);
3247 hgdtxvspn->
Fill(
fabs(p), txGem - txdch);
3248 hgdtxrvspn->
Fill(
fabs(p), tx0 - txdch);
3249 hgdtx1vspn->
Fill(
fabs(p), (xGem - xyzdch[0]) / (zGem - zGem1st));
3250 hgdtxtyn->
Fill(txGem - txdch, tyGem - tydch);
3254 hchambigx->
Fill(ic);
3256 hchambigy->
Fill(ic);
3257 hxvsxbigx->
Fill(
xhi[himin], xrpc);
3258 hyvsybigy->
Fill(
yhi[himin], yrpc);
3267 if (xrpc > 110. && (ic == 21 || ic == 22))
3269 if (xrpc > 110. && (ic == 21 || ic == 22))
3270 hxxhitbigx->
Fill(
xhi[himin] - xc, xrpc - xc);
3272 cosa =
sqrt(1. + tx * tx + ty * ty);
3276 hidist =
TMath::Sqrt(xc * xc + yc * yc + (zc - ztarg) * (zc - ztarg));
3279 hxytrtof->
Fill(xrpc, yrpc);
3283 if (
zhi[himin] < 600)
3285 if (
zhi[himin] > 605 &&
zhi[himin] < 610)
3287 if (
zhi[himin] > 625 &&
zhi[himin] < 630 &&
yhi[himin] < 20)
3289 if (
zhi[himin] > 625 &&
zhi[himin] < 630 &&
yhi[himin] > 20)
3291 if (
zhi[himin] > 635 &&
zhi[himin] < 660 &&
yhi[himin] < 20)
3293 if (
zhi[himin] > 635 &&
zhi[himin] < 660 &&
yhi[himin] > 20)
3295 if (
zhi[himin] > 625 &&
zhi[himin] < 660 &&
yhi[himin] < 20)
3299 hplatramz->
Fill(zrpcm);
3300 hplatram->
Fill(xrpcm);
3302 hplatram1a->
Fill(xrpcm);
3303 if (zrpcm > 605 && zrpcm < 610)
3304 hplatram1b->
Fill(xrpcm);
3305 if (zrpcm > 625 && zrpcm < 630 && yrpcm < 20)
3306 hplatram2ac->
Fill(xrpcm);
3307 if (zrpcm > 625 && zrpcm < 630 && yrpcm > 20)
3308 hplatram2au->
Fill(xrpcm);
3309 if (zrpcm > 635 && zrpcm < 660 && yrpcm < 20)
3310 hplatram2bc->
Fill(xrpcm);
3311 if (zrpcm > 635 && zrpcm < 660 && yrpcm > 20)
3312 hplatram2bu->
Fill(xrpcm);
3313 if (zrpcm > 625 && zrpcm < 660 && yrpcm < 20)
3314 hplatram2abc->
Fill(xrpcm);
3315 }
else if (ic == crpc2) {
3316 hplatramz->
Fill(zrpcm1);
3317 hplatram->
Fill(xrpcm1);
3319 hplatram1a->
Fill(xrpcm1);
3320 if (zrpcm1 > 605 && zrpcm1 < 610)
3321 hplatram1b->
Fill(xrpcm);
3322 if (zrpcm1 > 625 && zrpcm1 < 630 && yrpcm1 < 20)
3323 hplatram2ac->
Fill(xrpcm);
3324 if (zrpcm1 > 625 && zrpcm1 < 630 && yrpcm1 > 20)
3325 hplatram2au->
Fill(xrpcm);
3326 if (zrpcm1 > 635 && zrpcm1 < 660 && yrpcm1 < 20)
3327 hplatram2bc->
Fill(xrpcm);
3328 if (zrpcm1 > 635 && zrpcm1 < 660 && yrpcm1 > 20)
3329 hplatram2bu->
Fill(xrpcm);
3330 if (zrpcm1 > 625 && zrpcm1 < 660 && yrpcm1 < 20)
3331 hplatram2abc->
Fill(xrpcm);
3333 hplatramz->
Fill(zrpcm);
3334 hplatram->
Fill(xrpcm);
3336 hplatram1a->
Fill(xrpcm);
3337 if (zrpcm > 605 && zrpcm < 610)
3338 hplatram1b->
Fill(xrpcm);
3339 if (zrpcm > 625 && zrpcm < 630 && yrpcm < 20)
3340 hplatram2ac->
Fill(xrpcm);
3341 if (zrpcm > 625 && zrpcm < 630 && yrpcm > 20)
3342 hplatram2au->
Fill(xrpcm);
3343 if (zrpcm > 635 && zrpcm < 660 && yrpcm < 20)
3344 hplatram2bc->
Fill(xrpcm);
3345 if (zrpcm > 635 && zrpcm < 660 && yrpcm > 20)
3346 hplatram2bu->
Fill(xrpcm);
3347 if (zrpcm > 625 && zrpcm < 660 && yrpcm < 20)
3348 hplatram2abc->
Fill(xrpcm);
3357 tofr =
tof[ic][is] + lenr / cpeak;
3365 tofr0 =
tof[ic][is];
3368 beta = lenr / tofr / cvel;
3372 mass2 = p * p * (1.f /
beta /
beta - 1.f);
3380 if (p > 0.f && mass2 > massmin1 && mass2 < massmax1 && pmod >
PMIN && pmod <
PMAX) {
3384 tcors = tcor -
tofcals[ic][is];
3385 tcalibrc->
Fill(ic, tcorc);
3386 tcalibrs->
Fill(ic, is, tcors);
3390 if (mass2 > massmin2 && mass2 < massmax2) {
3392 hdtpcvsp->
Fill(p, tcorc);
3394 hdtpsvsp->
Fill(p, tcors);
3395 hdtpsvscvss->
Fill(ic, is, tcors);
3396 hdtpcvscvsp->
Fill(ic, p, tcors);
3398 hdtpcplim->
Fill(tcorc);
3400 hdtpcp1lim->
Fill(tcorc);
3402 hdtpcp2lim->
Fill(tcorc);
3403 if (p >= 2.0f && p < 5.0f)
3404 hdtpcp3lim->
Fill(tcorc);
3406 hdtpcwlim->
Fill(tcorc);
3407 hdtpcvspwlim->
Fill(p, tcorc);
3409 hdtpcwplim->
Fill(tcorc);
3411 hdtpcwp1lim->
Fill(tcorc);
3417 if (p > 0 && massmaxpi > massmin1)
3418 massmaxpi = massmin1;
3421 if (mass2 < massmaxpi && mass2 > massminpi && pmod >
PMIN && pmod <
PMAXPI) {
3423 tcorpi = tofpi - tofr;
3424 tcorcpi = tcorpi -
tofcalc[ic];
3425 tcorspi = tcorpi -
tofcals[ic][is];
3426 tcalibrc->
Fill(ic, tcorcpi);
3427 tcalibrs->
Fill(ic, is, tcorspi);
3430 betapeak = lenr / timepeak / cvel;
3431 tpeak->
Fill(ic, timepeak);
3432 bpeak->
Fill(ic, betapeak);
3434 tofrs = tofr +
tofcals[ic][is];
3435 betac = lenr / tofrc / cvel;
3436 betas = lenr / tofrs / cvel;
3437 masss2 = p * p * (1.f / betas / betas - 1.f);
3439 massc2 = p * p * (1.f / betac / betac - 1.f);
3441 tri =
IdTrig[trackRunId];
3464 tar =
Ntar[trackRunId];
3466 hpbetac->
Fill(p, betac);
3467 hmassc->
Fill(massc2);
3468 hmasscvsp->
Fill(p, massc2);
3469 hpbetas->
Fill(p, betas);
3470 hmasss->
Fill(masss2);
3471 hmasssvsp->
Fill(p, masss2);
3473 hmasss15->
Fill(masss2);
3474 if (
Ntar[trackRunId] > 0 && tri >= 40)
3475 hmasss15tt->
Fill(masss2, tar, tri - 40);
3476 hmassc15->
Fill(massc2);
3479 hmasss20->
Fill(masss2);
3480 if (
Ntar[trackRunId] > 0 && tri >= 40)
3481 hmasss20tt->
Fill(masss2, tar, tri - 40);
3482 hmassc20->
Fill(massc2);
3490 yfr = 0.5 *
TMath::Log((efr + pzfr) / (efr - pzfr));
3513 hhitdxvsp_pi->
Fill(p, xrpc -
xhi[himin]);
3514 hghitdxvsp_pi->
Fill(p, xGem - xyzdch[0]);
3515 }
else if (ftype == 1) {
3516 hhitdxvsp_p->
Fill(p, xrpc -
xhi[himin]);
3517 hghitdxvsp_p->
Fill(p, xGem - xyzdch[0]);
3518 }
else if (ftype == 3) {
3519 hhitdxvsp_d->
Fill(p, xrpc -
xhi[himin]);
3520 hghitdxvsp_d->
Fill(p, xGem - xyzdch[0]);
3522 hyp0->
Fill(yfr, ptfr);
3523 hmfr0->
Fill(masss2);
3524 if (
Ntar[trackRunId] > 0 && tri >= 40)
3525 hmfr0tt->
Fill(m2fr, tar, tri - 40);
3528 hmfrall->
Fill(masss2);
3529 if (
Ntar[trackRunId] > 0 && tri >= 40)
3530 hmfralltt->
Fill(m2fr, tar, tri - 40);
3531 hypall->
Fill(yfr, ptfr);
3532 hypall1->
Fill(yfr, ptfr);
3534 hyp_p->
Fill(yfr, ptfr);
3535 hyp_p1->
Fill(yfr, ptfr);
3537 }
else if (ftype == 2) {
3538 hyp_he3->
Fill(yfr, ptfr);
3539 hyp_he31->
Fill(yfr, ptfr);
3541 }
else if (ftype == 3) {
3542 hyp_d->
Fill(yfr, ptfr);
3543 hyp_d1->
Fill(yfr, ptfr);
3545 }
else if (ftype == 4) {
3546 hyp_t->
Fill(yfr, ptfr);
3547 hyp_t1->
Fill(yfr, ptfr);
3550 if (ftype <= 4 &&
Ntar[trackRunId] > 0 && tri >= 40)
3551 hmfrtt->
Fill(m2fr, tar, tri - 40);
3556 hmasscm->
Fill(massc2);
3559 hmasssm->
Fill(masss2);
3566 int nwin1 = 0, nwin2 = 0, nwins = 0;
3570 for (
int itg = 0; itg < ntrgem; itg++) {
3574 for (
int itd = 0; itd < ntrdch; itd++) {
3575 dxr = xtrgem[itg] - xtrdch[itd];
3576 dyr = ytrgem[itg] - ytrdch[itd];
3577 dxr0 = xtrgem0[itg] - xtrdch[itd];
3579 dtxr = txtrgem[itg] - txtrdch[itd];
3580 dtyr = tytrgem[itg] - tytrdch[itd];
3581 if (pgem[itg] > 0.) {
3582 hghitdxvspa->
Fill(pgem[itg], dxr);
3583 hghitdxvspar->
Fill(pgem[itg], dxr0);
3584 hghitdyvspa->
Fill(pgem[itg], dyr);
3585 hgdtx1vspall->
Fill(pgem[itg], (xtrgem[itg] - xtrdch[itd]) / (ztrgem[itg] - ztrgem1st[itg]));
3586 }
else if (pgem[itg] < 0.) {
3587 hghitdxvspan->
Fill(-pgem[itg], dxr);
3588 hghitdxvsparn->
Fill(-pgem[itg], dxr0);
3589 hgdtx1vspnall->
Fill(-pgem[itg], (xtrgem[itg] - xtrdch[itd]) / (ztrgem[itg] - ztrgem1st[itg]));
3591 hdxyrealall->
Fill(dxr, dyr);
3592 hdtxtyrealall->
Fill(dtxr, dtyr);
3596 hdtxtyrealallw->
Fill(dtxr, dtyr);
3597 if (pgem[itg] > 0.) {
3598 hghitdxvspw1->
Fill(pgem[itg], dxr);
3599 hghitdyvspw1->
Fill(pgem[itg], dyr);
3600 }
else if (pgem[itg] < 0.) {
3601 hghitdxvspw1n->
Fill(-pgem[itg], dxr);
3608 if (pgem[itg] > 0.) {
3609 hghitdxvspw1r->
Fill(pgem[itg], dxr0);
3610 }
else if (pgem[itg] < 0.) {
3611 hghitdxvspw1rn->
Fill(-pgem[itg], dxr);
3617 if (pgem[itg] > 0.) {
3618 hghitdxvspw2->
Fill(pgem[itg], dxr);
3619 hghitdyvspw2->
Fill(pgem[itg], dyr);
3620 }
else if (pgem[itg] < 0.) {
3621 hghitdxvspw2n->
Fill(-pgem[itg], dxr);
3628 if (pgem[itg] > 0.) {
3629 hghitdxvspw2r->
Fill(pgem[itg], dxr0);
3630 hgdtxvspall->
Fill(pgem[itg], dtxr);
3631 if (pgem[itg] < 1.5)
3632 hgdtxvsdxall->
Fill(dxr0, dtxr);
3633 }
else if (pgem[itg] < 0.) {
3634 hghitdxvspw2rn->
Fill(-pgem[itg], dxr0);
3635 hgdtxvspnall->
Fill(-pgem[itg], dtxr);
3638 if (
NDXsigma > 0 && dxtrgem[itg] > 0. && dytrgem[itg] > 0.) {
3640 if (pgem[itg] > 0.) {
3641 hghitdxvspw3->
Fill(pgem[itg], dxr);
3642 hghitdyvspw3->
Fill(pgem[itg], dyr);
3643 }
else if (pgem[itg] < 0.) {
3644 hghitdxvspw3n->
Fill(-pgem[itg], dxr);
3649 if (
NDXsigma > 0 && dxtrgem[itg] > 0. && dytrgem[itg] > 0.) {
3651 if (pgem[itg] > 0.) {
3652 hghitdxvspw3r->
Fill(pgem[itg], dxr0);
3653 }
else if (pgem[itg] < 0.) {
3654 hghitdxvspw3rn->
Fill(-pgem[itg], dxr);
3659 hnwin1->
Fill(nwin1);
3660 hnwin2->
Fill(nwin2);
3661 hnwins->
Fill(nwins);
3685 hntrdch0->
Fill(ntrdch0);
3686 hntrdch->
Fill(ntrdch);
3687 hntrgem0->
Fill(ntrgem0);
3688 hntrgemcut->
Fill(ntrgemcut);
3689 hntrgem->
Fill(ntrgem);
3690 hntrgemdch->
Fill(ntrgem, ntrdch);
3692 if (iEv % 50000 == 0) {
3693 hdxyeff->
Divide(hdxytof, hdxy);
3704 hdxyeff2->
Divide(hdxytof2, hdxy2);
3705 hxyeff2->
Divide(hxygoodhitgem2, hxygoodtrgem2);
3706 hxyeff->
Divide(hxygoodhit, hxygoodtr);
3707 hxyeffp->
Divide(hxygoodhitp, hxygoodtrp);
3708 hxyeffn->
Divide(hxygoodhitn, hxygoodtrn);
3719 hpeff->
Divide(hpgoodhit, hpgemdch);
3720 hpeffmg->
Divide(hpgemdch, hptr);
3721 hpeff2->
Divide(hpgoodhit2, hpgemdch2);
3722 hpeff2gt->
Divide(hpgoodhit2, hpgemtof);
3723 hpeffmg2->
Divide(hpgemdch2, hpgemtof);
3724 hpeffmg2f->
Divide(hpgemdch2, hptr);
3725 hpeffgemtof->
Divide(hpgemtof, hptr);
3726 hxyeffmg->
Divide(hxygoodtrgem, hxygem);
3727 hxyeffmg2->
Divide(hxygoodtrgem2, hxygoodhit2);
3728 hxyeffmg2f->
Divide(hxygoodtrgem2, hxygem);
3729 hxyefftrgem0->
Divide(hxygoodtrgem0, hxygem0);
3730 hxyefftrgem0p->
Divide(hxygoodtrgem0p, hxygem0p);
3731 hxyefftrgem0n->
Divide(hxygoodtrgem0n, hxygem0n);
3732 hxyeffmd->
Divide(hxygoodtr, hxydch);
3733 hxyeffdg->
Divide(hxydch, hxygem);
3734 hxyeffgd->
Divide(hxygem, hxydch);
3735 hxyeffm1d->
Divide(hxygoodhit1, hxydch1);
3736 hxyeffgemtof->
Divide(hxygoodhit2, hxygem);
3737 hxyeffgemtofdchtof1->
Divide(hxygemtofdchtof1, hxygemtofdchtof);
3738 hxyeffgemtofdchtof2->
Divide(hxygemtofdchtof2, hxygemtofdchtof);
3739 hxyeffgemtofdchtofd1->
Divide(hxygemtofdchtofd1, hxygemtofdchtofd);
3740 hxyeffgemtofdchtofd2->
Divide(hxygemtofdchtofd2, hxygemtofdchtofd);
3741 hpeffgemtofdchtof1->
Divide(hpgemtofdchtof1, hpgemtofdchtof);
3742 hpeffgemtofdchtof2->
Divide(hpgemtofdchtof2, hpgemtofdchtof);
3743 hxybadhit->
Add(hxygoodtr, hxygoodhit, 1., -1.);
3744 hxybadhita->
Add(hxygoodtr, hxygoodhita, 1., -1.);
3745 hpbadhit->
Add(hpgemdch, hpgoodhit, 1., -1.);
3747 hchambeffs->
Divide(hncltrvschambs1, hnclvschambs1);
3749 hchambeffb->
Divide(hncltrvschambb1, hnclvschambb1);
3750 hxyclustereff->
Divide(hxygoodcluster, hxycluster);
3751 hxyclustereffgem->
Divide(hxygoodclustergem, hxycluster);
3752 hxyclustereffdch->
Divide(hxygoodclusterdch, hxycluster);
3753 hxystripseff->
Divide(hxygoodstrips, hxystrips);
3754 hxytrackstripseff->
Divide(hxygoodstrips, hxytrackstrips);
3755 hxytrackstripseff1->
Divide(hxygood1strips, hxytrackstrips);
3757 hplaeffz->
Divide(hplatrz, hplaz);
3758 hplaeff->
Divide(hplatr, hpla);
3759 hplaeff1a->
Divide(hplatr1a, hpla1a);
3760 hplaeff1b->
Divide(hplatr1b, hpla1b);
3761 hplaeff2ac->
Divide(hplatr2ac, hpla2ac);
3762 hplaeff2au->
Divide(hplatr2au, hpla2au);
3763 hplaeff2bc->
Divide(hplatr2bc, hpla2bc);
3764 hplaeff2bu->
Divide(hplatr2bu, hpla2bu);
3765 hplaeff2abc->
Divide(hplatr2abc, hpla2abc);
3767 hplaeffaz->
Divide(hplatramz, hplatraz);
3768 hplaeffa->
Divide(hplatram, hplatra);
3769 hplaeffa1a->
Divide(hplatram1a, hplatra1a);
3770 hplaeffa1b->
Divide(hplatram1b, hplatra1b);
3771 hplaeffa2ac->
Divide(hplatram2ac, hplatra2ac);
3772 hplaeffa2au->
Divide(hplatram2au, hplatra2au);
3773 hplaeffa2bc->
Divide(hplatram2bc, hplatra2bc);
3774 hplaeffa2bu->
Divide(hplatram2bu, hplatra2bu);
3775 hplaeffa2abc->
Divide(hplatram2abc, hplatra2abc);
3778 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3779 printf(
"GEM+DCH1+DCH2 tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3780 (
float)Ntr1 / Ntr * 100.f);
3781 printf(
"Good GEM+DCH1+DCH2 tracks %d, per event %f (%f%% per track)\n", Ntr0, (
float)Ntr0 / nEvents,
3782 (
float)Ntr0 / Ntr * 100.f);
3783 }
else if (
FLAG > 0) {
3784 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3785 printf(
"GEM+DCH1 tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3786 (
float)Ntr1 / Ntr * 100.f);
3787 printf(
"Good GEM+DCH1 tracks %d, per event %f (%f%% per track)\n", Ntr0, (
float)Ntr0 / nEvents,
3788 (
float)Ntr0 / Ntr * 100.f);
3790 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3791 printf(
"GEM+DCH tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3792 Ntr > 0 ? (
float)Ntr1 / Ntr * 100.f : 0.f);
3793 printf(
"Good GEM+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr1g, (
float)Ntr1g / nEvents,
3794 Ntr1 > 0 ? (
float)Ntr1g / Ntr1 * 100.f : 0.f);
3795 printf(
"Matched GEM+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr0, (
float)Ntr0 / nEvents,
3796 Ntr1g > 0 ? (
float)Ntr0 / Ntr1g * 100.f : 0.f);
3797 printf(
"Good GEMTOF+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr2g,
3798 (
float)Ntr2g / nEvents, Ntr1 > 0 ? (
float)Ntr2g / Ntr1 * 100.f : 0.f);
3799 printf(
"Matched GEMTOF+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr02,
3800 (
float)Ntr02 / nEvents, Ntr2g > 0 ? (
float)Ntr02 / Ntr2g * 100.f : 0.f);
3809 char fname_calibr_root[128], *delim = 0;
3810 strcpy(fname_calibr_root,
gSystem->BaseName(fnametof700));
3811 if ((delim = strrchr(fname_calibr_root, (
int)
'.')))
3813 strcat(fname_calibr_root,
"_calibration.root");
3814 TFile* fc =
new TFile(fname_calibr_root,
"RECREATE",
"Proton mass based calibration of BmnTOF700");
3822 hdxyeff->
Divide(hdxytof, hdxy);
3833 hdxyeff2->
Divide(hdxytof2, hdxy2);
3834 hxyeff2->
Divide(hxygoodhitgem2, hxygoodtrgem2);
3835 hxyeff->
Divide(hxygoodhit, hxygoodtr);
3836 hxyeffp->
Divide(hxygoodhitp, hxygoodtrp);
3837 hxyeffn->
Divide(hxygoodhitn, hxygoodtrn);
3848 hpeff->
Divide(hpgoodhit, hpgemdch);
3849 hpeffmg->
Divide(hpgemdch, hptr);
3850 hpeff2->
Divide(hpgoodhit2, hpgemdch2);
3851 hpeff2gt->
Divide(hpgoodhit2, hpgemtof);
3852 hpeffmg2->
Divide(hpgemdch2, hpgemtof);
3853 hpeffmg2f->
Divide(hpgemdch2, hptr);
3854 hpeffgemtof->
Divide(hpgemtof, hptr);
3855 hxyeffmg->
Divide(hxygoodtrgem, hxygem);
3856 hxyeffmg2->
Divide(hxygoodtrgem2, hxygoodhit2);
3857 hxyeffmg2f->
Divide(hxygoodtrgem2, hxygem);
3858 hxyefftrgem0->
Divide(hxygoodtrgem0, hxygem0);
3859 hxyefftrgem0p->
Divide(hxygoodtrgem0p, hxygem0p);
3860 hxyefftrgem0n->
Divide(hxygoodtrgem0n, hxygem0n);
3861 hxyeffmd->
Divide(hxygoodtr, hxydch);
3862 hxyeffdg->
Divide(hxydch, hxygem);
3863 hxyeffgd->
Divide(hxygem, hxydch);
3864 hxyeffm1d->
Divide(hxygoodhit1, hxydch1);
3865 hxyeffgemtof->
Divide(hxygoodhit2, hxygem);
3866 hxyeffgemtofdchtof1->
Divide(hxygemtofdchtof1, hxygemtofdchtof);
3867 hxyeffgemtofdchtof2->
Divide(hxygemtofdchtof2, hxygemtofdchtof);
3868 hxyeffgemtofdchtofd1->
Divide(hxygemtofdchtofd1, hxygemtofdchtofd);
3869 hxyeffgemtofdchtofd2->
Divide(hxygemtofdchtofd2, hxygemtofdchtofd);
3870 hpeffgemtofdchtof1->
Divide(hpgemtofdchtof1, hpgemtofdchtof);
3871 hpeffgemtofdchtof2->
Divide(hpgemtofdchtof2, hpgemtofdchtof);
3872 hxybadhit->
Add(hxygoodtr, hxygoodhit, 1., -1.);
3873 hxybadhita->
Add(hxygoodtr, hxygoodhita, 1., -1.);
3874 hpbadhit->
Add(hpgemdch, hpgoodhit, 1., -1.);
3876 hchambeffs->
Divide(hncltrvschambs1, hnclvschambs1);
3878 hchambeffb->
Divide(hncltrvschambb1, hnclvschambb1);
3879 hxyclustereff->
Divide(hxygoodcluster, hxycluster);
3880 hxyclustereffgem->
Divide(hxygoodclustergem, hxycluster);
3881 hxyclustereffdch->
Divide(hxygoodclusterdch, hxycluster);
3882 hxystripseff->
Divide(hxygoodstrips, hxystrips);
3883 hxytrackstripseff->
Divide(hxygoodstrips, hxytrackstrips);
3884 hxytrackstripseff1->
Divide(hxygood1strips, hxytrackstrips);
3886 hplaeffz->
Divide(hplatrz, hplaz);
3887 hplaeff->
Divide(hplatr, hpla);
3888 hplaeff1a->
Divide(hplatr1a, hpla1a);
3889 hplaeff1b->
Divide(hplatr1b, hpla1b);
3890 hplaeff2ac->
Divide(hplatr2ac, hpla2ac);
3891 hplaeff2au->
Divide(hplatr2au, hpla2au);
3892 hplaeff2bc->
Divide(hplatr2bc, hpla2bc);
3893 hplaeff2bu->
Divide(hplatr2bu, hpla2bu);
3894 hplaeff2abc->
Divide(hplatr2abc, hpla2abc);
3896 hplaeffaz->
Divide(hplatramz, hplatraz);
3897 hplaeffa->
Divide(hplatram, hplatra);
3898 hplaeffa1a->
Divide(hplatram1a, hplatra1a);
3899 hplaeffa1b->
Divide(hplatram1b, hplatra1b);
3900 hplaeffa2ac->
Divide(hplatram2ac, hplatra2ac);
3901 hplaeffa2au->
Divide(hplatram2au, hplatra2au);
3902 hplaeffa2bc->
Divide(hplatram2bc, hplatra2bc);
3903 hplaeffa2bu->
Divide(hplatram2bu, hplatra2bu);
3904 hplaeffa2abc->
Divide(hplatram2abc, hplatra2abc);
3907 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3908 printf(
"GEM+DCH1+DCH2 tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3909 (
float)Ntr1 / Ntr * 100.f);
3910 printf(
"Good GEM+DCH1+DCH2 tracks %d, per event %f (%f%% per track)\n", Ntr0, (
float)Ntr0 / nEvents,
3911 (
float)Ntr0 / Ntr * 100.f);
3912 }
else if (
FLAG > 0) {
3913 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3914 printf(
"GEM+DCH1 tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3915 (
float)Ntr1 / Ntr * 100.f);
3916 printf(
"Good GEM+DCH1 tracks %d, per event %f (%f%% per track)\n", Ntr0, (
float)Ntr0 / nEvents,
3917 (
float)Ntr0 / Ntr * 100.f);
3919 printf(
"Number of tracks %d, per event %f\n", Ntr, (
float)Ntr / nEvents);
3920 printf(
"GEM+DCH tracks %d, per event %f (%f%% per track)\n", Ntr1, (
float)Ntr1 / nEvents,
3921 Ntr > 0 ? (
float)Ntr1 / Ntr * 100.f : 0.f);
3922 printf(
"Good GEM+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr1g, (
float)Ntr1g / nEvents,
3923 Ntr1 > 0 ? (
float)Ntr1g / Ntr1 * 100.f : 0.f);
3924 printf(
"Matched GEM+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr0, (
float)Ntr0 / nEvents,
3925 Ntr1g > 0 ? (
float)Ntr0 / Ntr1g * 100.f : 0.f);
3926 printf(
"Good GEMTOF+DCH tracks %d, per event %f (%f%% per valid track)\n", Ntr2g, (
float)Ntr2g / nEvents,
3927 Ntr1 > 0 ? (
float)Ntr2g / Ntr1 * 100.f : 0.f);
3928 printf(
"Matched GEMTOF+DCH tracks %d, per event %f (%f%% per good track)\n", Ntr02, (
float)Ntr02 / nEvents,
3929 Ntr2g > 0 ? (
float)Ntr02 / Ntr2g * 100.f : 0.f);
3938 char fname_calibr_root[128], *delim = 0;
3939 strcpy(fname_calibr_root,
gSystem->BaseName(fnametof700));
3940 if ((delim = strrchr(fname_calibr_root, (
int)
'.')))
3942 strcat(fname_calibr_root,
"_calibration.root");
3943 TFile* fc =
new TFile(fname_calibr_root,
"RECREATE",
"Proton mass based calibration of BmnTOF700");