34 const string sOutput(
"newMatcherTuplePlots_oneMatchPerParticle_forZVtxCutComp_oddFrac05150.pt10n1evt500pim.d1m2y2024.root");
35 const string sInTrue(
"input/merged/sPhenixG4_oneMatchPerParticle_forCrossCheck_newMatcher.pt10num1evt500pim.d25m1y2024.root");
36 const string sInReco(
"input/merged/sPhenixG4_oneMatchPerParticle_forCrossCheck_newMatcher.pt10num1evt500pim.d25m1y2024.root");
37 const string sTreeTrue(
"ntForEvalComp");
38 const string sTreeReco(
"ntForEvalComp");
41 const bool doZVtxCut(
true);
42 const bool doPhiCut(
false);
45 const pair<float, float> oddPtFrac = {0.5, 1.5};
46 const pair<float, float> zVtxRange = {-1., 1.};
49 const float sigCutVal(0.75);
50 const array<pair<float, float>,
NSectors> phiSectors = {
51 make_pair(-2.92, 0.12),
52 make_pair(-2.38, 0.05),
53 make_pair(-1.93, 0.18),
54 make_pair(-1.33, 0.07),
55 make_pair(-0.90, 0.24),
56 make_pair(-0.29, 0.09),
57 make_pair(0.23, 0.11),
58 make_pair(0.73, 0.10),
59 make_pair(1.28, 0.10),
60 make_pair(1.81, 0.08),
61 make_pair(2.23, 0.18),
66 gErrorIgnoreLevel = kError;
67 cout <<
"\n Staring new matcher plot script..." << endl;
70 TFile* fOutput =
new TFile(sOutput.data(),
"recreate");
71 TFile* fInTrue =
new TFile(sInTrue.data(),
"read");
72 TFile* fInReco =
new TFile(sInReco.data(),
"read");
73 if (!fOutput || !fInTrue || !fInReco) {
74 cerr <<
"PANIC: couldn't open a file!\n"
75 <<
" fOutput = " << fOutput <<
"fInTrue = " << fInTrue <<
", fInReco = " << fInReco <<
"\n"
79 cout <<
" Opened files." << endl;
82 TTree* tInTrue = (TTree*) fInTrue ->
Get(sTreeTrue.data());
83 TTree* tInReco = (TTree*) fInReco ->
Get(sTreeReco.data());
84 if (!tInTrue || !tInReco) {
85 cerr <<
"PANIC: couldn't grab input tree!\n"
86 <<
" sTreeTrue = " << sTreeTrue <<
", tInTrue = " << tInTrue <<
"\n"
87 <<
" sTreeReco = " << sTreeReco <<
", tInReco = " << tInReco <<
"\n"
91 cout <<
" Grabbed input trees." << endl;
99 Float_t tru_nmvtxclust_trkmatcher;
100 Float_t tru_ninttclust_trkmatcher;
101 Float_t tru_ntpclust_trkmatcher;
102 Float_t tru_nmvtxclust_manual;
103 Float_t tru_ninttclust_manual;
104 Float_t tru_ntpcclust_manual;
105 Float_t tru_nmvtxlayer_;
106 Float_t tru_ninttlayer;
107 Float_t tru_ntpclayer;
112 Float_t tru_sigmadcaxy;
113 Float_t tru_sigmadacz;
121 Float_t tru_gnmvtxclust_trkmatcher;
122 Float_t tru_gninttclust_trkmatcher;
123 Float_t tru_gntpclust_trkmatchergnmvtxclust_manual;
124 Float_t tru_gninttclust_manual;
125 Float_t tru_gntpcclust_manual;
126 Float_t tru_gnmvtxlayer;
127 Float_t tru_gninttlayer;
128 Float_t tru_gntpclayer;
129 Float_t tru_gdeltapt;
130 Float_t tru_gquality;
133 Float_t tru_gsigmadcaxy;
134 Float_t tru_gsigmadacz;
138 Float_t tru_fracnmvtxmatched;
139 Float_t tru_fracninttmatched;
140 Float_t tru_fracntpcmatched;
147 Float_t rec_nmvtxclust_trkmatcher;
148 Float_t rec_ninttclust_trkmatcher;
149 Float_t rec_ntpclust_trkmatcher;
150 Float_t rec_nmvtxclust_manual;
151 Float_t rec_ninttclust_manual;
152 Float_t rec_ntpcclust_manual;
153 Float_t rec_nmvtxlayer_;
154 Float_t rec_ninttlayer;
155 Float_t rec_ntpclayer;
160 Float_t rec_sigmadcaxy;
161 Float_t rec_sigmadacz;
169 Float_t rec_gnmvtxclust_trkmatcher;
170 Float_t rec_gninttclust_trkmatcher;
171 Float_t rec_gntpclust_trkmatchergnmvtxclust_manual;
172 Float_t rec_gninttclust_manual;
173 Float_t rec_gntpcclust_manual;
174 Float_t rec_gnmvtxlayer;
175 Float_t rec_gninttlayer;
176 Float_t rec_gntpclayer;
177 Float_t rec_gdeltapt;
178 Float_t rec_gquality;
181 Float_t rec_gsigmadcaxy;
182 Float_t rec_gsigmadacz;
186 Float_t rec_fracnmvtxmatched;
187 Float_t rec_fracninttmatched;
188 Float_t rec_fracntpcmatched;
196 tInTrue ->
SetBranchAddress(
"nmvtxclust_trkmatcher", &tru_nmvtxclust_trkmatcher);
197 tInTrue ->
SetBranchAddress(
"ninttclust_trkmatcher", &tru_ninttclust_trkmatcher);
198 tInTrue ->
SetBranchAddress(
"ntpclust_trkmatcher", &tru_ntpclust_trkmatcher);
218 tInTrue ->
SetBranchAddress(
"gnmvtxclust_trkmatcher", &tru_gnmvtxclust_trkmatcher);
219 tInTrue ->
SetBranchAddress(
"gninttclust_trkmatcher", &tru_gninttclust_trkmatcher);
220 tInTrue ->
SetBranchAddress(
"gntpclust_trkmatchergnmvtxclust_manual", &tru_gntpclust_trkmatchergnmvtxclust_manual);
244 tInReco ->
SetBranchAddress(
"nmvtxclust_trkmatcher", &rec_nmvtxclust_trkmatcher);
245 tInReco ->
SetBranchAddress(
"ninttclust_trkmatcher", &rec_ninttclust_trkmatcher);
246 tInReco ->
SetBranchAddress(
"ntpclust_trkmatcher", &rec_ntpclust_trkmatcher);
266 tInReco ->
SetBranchAddress(
"gnmvtxclust_trkmatcher", &rec_gnmvtxclust_trkmatcher);
267 tInReco ->
SetBranchAddress(
"gninttclust_trkmatcher", &rec_gninttclust_trkmatcher);
268 tInReco ->
SetBranchAddress(
"gntpclust_trkmatchergnmvtxclust_manual", &rec_gntpclust_trkmatchergnmvtxclust_manual);
286 cout <<
" Set input branches." << endl;
315 const vector<vector<string>> vecHistBase = {
316 {
"hTruthNumTot",
"hTrackNumTot",
"hWeirdNumTot",
"hNormNumTot"},
317 {
"hTruthNumIntt",
"hTrackNumIntt",
"hWeirdNumIntt",
"hNormNumIntt"},
318 {
"hTruthNumMvtx",
"hTrackNumMvtx",
"hWeirdNumMvtx",
"hNormNumMvtx"},
319 {
"hTruthNumTpc",
"hTrackNumTpc",
"hWeirdNumTpc",
"hNormNumTpc"},
320 {
"hTruthRatTot",
"hTrackRatTot",
"hWeirdRatTot",
"hNormRatTot"},
321 {
"hTruthRatIntt",
"hTrackRatIntt",
"hWeirdRatIntt",
"hNormRatIntt"},
322 {
"hTruthRatMvtx",
"hTrackRatMvtx",
"hWeirdRatMvtx",
"hNormRatMvtx"},
323 {
"hTruthRatTpc",
"hTrackRatTpc",
"hWeirdRatTpc",
"hNormRatTpc"},
324 {
"hTruthPhi",
"hTrackPhi",
"hWeirdPhi",
"hNormPhi"},
325 {
"hTruthEta",
"hTrackEta",
"hWeirdEta",
"hNormEta"},
326 {
"hTruthPt",
"hTrackPt",
"hWeirdPt",
"hNormPt"},
327 {
"hTruthFrac",
"hTrackFrac",
"hWeirdFrac",
"hNormFrac"}
329 const size_t nHistRows = vecHistBase.size();
330 const size_t nHistTypes = vecHistBase[0].size();
333 const vector<string> vecVsHistModifiers = {
337 const size_t nVsHistMods = vecVsHistModifiers.size();
340 const string sCount(
"counts");
341 const vector<string> vecBaseAxisVars = {
342 "N^{tot} = N_{hit}^{mvtx} + N_{hit}^{intt} + N_{clust}^{tpc}",
346 "N_{reco}^{tot} / N_{true}^{tot}",
347 "N_{reco}^{intt} / N_{true}^{intt}",
348 "N_{reco}^{mvtx} / N_{true}^{mvtx}",
349 "N_{reco}^{tpc} / N_{true}^{tpc}",
353 "p_{T}^{reco} / p_{T}^{true}"
355 const vector<string> vecVsAxisVars = {
356 "p_{T}^{true} [GeV/c]",
361 const uint32_t nNumBins = 101;
362 const uint32_t nRatBins = 120;
364 const uint32_t nPhiBins = 360;
365 const uint32_t nPtBins = 101;
366 const uint32_t nFracBins = 110;
369 const pair<float, float> xNumBins = {-0.5, 100.5};
370 const pair<float, float> xRatBins = {-0.5, 5.5};
371 const pair<float, float> xEtaBins = {-2., 2.};
372 const pair<float, float> xPhiBins = {-3.15, 3.15};
373 const pair<float, float> xPtBins = {-1., 100.};
374 const pair<float, float> xFracBins = {-0.5, 10.5};
377 vector<tuple<uint32_t, pair<float, float>>> vecBaseHistBins = {
393 vector<tuple<uint32_t, pair<float, float>>> vecVsHistBins = {
399 vector<vector<TH1D*>> vecHist1D(nHistRows);
400 for (
size_t iHistRow = 0; iHistRow < nHistRows; iHistRow++) {
401 for (
const string sHistBase : vecHistBase[iHistRow]) {
402 vecHist1D[iHistRow].push_back(
406 get<0>(vecBaseHistBins[iHistRow]),
407 get<1>(vecBaseHistBins[iHistRow]).first,
408 get<1>(vecBaseHistBins[iHistRow]).second
415 vector<vector<vector<TH2D*>>> vecHist2D(nHistRows, vector<vector<TH2D*>>(nHistTypes));
416 for (
size_t iHistRow = 0; iHistRow < nHistRows; iHistRow++) {
417 for (
size_t iHistType = 0; iHistType < nHistTypes; iHistType++) {
418 for (
size_t iVsHistMod = 0; iVsHistMod < nVsHistMods; iVsHistMod++) {
419 const string sHistName2D = vecHistBase[iHistRow][iHistType] + vecVsHistModifiers[iVsHistMod];
420 vecHist2D[iHistRow][iHistType].push_back(
424 get<0>(vecVsHistBins[iVsHistMod]),
425 get<1>(vecVsHistBins[iVsHistMod]).first,
426 get<1>(vecVsHistBins[iVsHistMod]).second,
427 get<0>(vecBaseHistBins[iHistRow]),
428 get<1>(vecBaseHistBins[iHistRow]).first,
429 get<1>(vecBaseHistBins[iHistRow]).second
437 for (
auto histRow1D : vecHist1D) {
438 for (
auto hist1D : histRow1D) {
443 for (
auto histRow2D : vecHist2D) {
444 for (
auto histType2D : histRow2D) {
445 for (
auto hist2D: histType2D) {
452 const int64_t nTrueEntries = tInTrue -> GetEntries();
453 const int64_t nRecoEntries = tInReco -> GetEntries();
454 cout <<
" Beginning truth particle loop: " << nTrueEntries <<
" to process" << endl;
457 int64_t nTrueBytes = 0;
458 for (int64_t iTrueEntry = 0; iTrueEntry < nTrueEntries; iTrueEntry++) {
461 const int64_t trueBytes = tInTrue ->
GetEntry(iTrueEntry);
463 cerr <<
"PANIC: issue with entry " << iTrueEntry <<
"! Aborting loop!\n" << endl;
466 nTrueBytes += trueBytes;
469 const int64_t iTrueProg = iTrueEntry + 1;
470 if (iTrueProg == nTrueEntries) {
471 cout <<
" Processing entry " << iTrueProg <<
"/" << nTrueEntries <<
"..." << endl;
473 cout <<
" Processing entry " << iTrueProg <<
"/" << nTrueEntries <<
"...\r" <<
flush;
477 const float tru_gnclust = tru_gnmvtxclust_trkmatcher + tru_gninttclust_trkmatcher + tru_gntpcclust_manual;
480 bool isNearSector =
false;
482 for (
size_t iSector = 0; iSector <
NSectors; iSector++) {
483 const float cutVal = sigCutVal * phiSectors[iSector].second;
484 const float minPhi = phiSectors[iSector].first - cutVal;
485 const float maxPhi = phiSectors[iSector].first + cutVal;
486 const bool isNear = ((tru_gphi >=
minPhi) && (tru_gphi <= maxPhi));
495 const bool isInZVtxCut = ((tru_gvz >= zVtxRange.first) && (tru_gvz <= zVtxRange.second));
496 if (doZVtxCut && !isInZVtxCut)
continue;
497 if (doPhiCut && isNearSector)
continue;
501 vecHist1D[Var::NTot][Type::Truth] ->
Fill(tru_gnclust);
502 vecHist1D[Var::NIntt][Type::Truth] ->
Fill(tru_gninttclust_trkmatcher);
503 vecHist1D[Var::NMvtx][Type::Truth] ->
Fill(tru_gnmvtxclust_trkmatcher);
504 vecHist1D[Var::NTpc][Type::Truth] ->
Fill(tru_gntpcclust_manual);
505 vecHist1D[Var::RTot][Type::Truth] ->
Fill(1.);
506 vecHist1D[Var::RIntt][Type::Truth] ->
Fill(1.);
507 vecHist1D[Var::RMvtx][Type::Truth] ->
Fill(1.);
508 vecHist1D[Var::RTpc][Type::Truth] ->
Fill(1.);
509 vecHist1D[Var::Phi][Type::Truth] ->
Fill(tru_gphi);
512 vecHist1D[Var::Frac][Type::Truth] ->
Fill(1.);
515 vecHist2D[Var::NTot][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gnclust);
516 vecHist2D[Var::NIntt][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gninttclust_trkmatcher);
517 vecHist2D[Var::NMvtx][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gnmvtxclust_trkmatcher);
518 vecHist2D[Var::NTpc][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gntpcclust_manual);
519 vecHist2D[Var::RTot][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, 1.);
520 vecHist2D[Var::RIntt][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, 1.);
521 vecHist2D[Var::RMvtx][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, 1.);
522 vecHist2D[Var::RTpc][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, 1.);
523 vecHist2D[Var::Phi][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gphi);
524 vecHist2D[
Var::Eta][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_geta);
525 vecHist2D[
Var::Pt][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, tru_gpt);
526 vecHist2D[Var::Frac][Type::Truth][Comp::VsTruthPt] ->
Fill(tru_gpt, 1.);
528 vecHist2D[Var::NTot][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gnclust);
529 vecHist2D[Var::NIntt][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gninttclust_trkmatcher);
530 vecHist2D[Var::NMvtx][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gnmvtxclust_trkmatcher);
531 vecHist2D[Var::NTpc][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gntpcclust_manual);
532 vecHist2D[Var::RTot][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, 1.);
533 vecHist2D[Var::RIntt][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, 1.);
534 vecHist2D[Var::RMvtx][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, 1.);
535 vecHist2D[Var::RTpc][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, 1.);
536 vecHist2D[Var::Phi][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gphi);
537 vecHist2D[
Var::Eta][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_geta);
538 vecHist2D[
Var::Pt][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, tru_gpt);
539 vecHist2D[Var::Frac][Type::Truth][Comp::VsNumTpc] ->
Fill(tru_ntpclust_trkmatcher, 1.);
543 cout <<
" Finished truth particle loop.\n"
544 <<
" Beginning reconstructed track loop: " << nRecoEntries <<
" to process"
548 int64_t nRecoBytes = 0;
549 for (int64_t iRecoEntry = 0; iRecoEntry < nRecoEntries; iRecoEntry++) {
552 const int64_t recoBytes = tInReco ->
GetEntry(iRecoEntry);
554 cerr <<
"PANIC: issue with entry " << iRecoEntry <<
"! Aborting loop!\n" << endl;
557 nRecoBytes += recoBytes;
560 const int64_t iRecoProg = iRecoEntry + 1;
561 if (iRecoProg == nRecoEntries) {
562 cout <<
" Processing entry " << iRecoProg <<
"/" << nRecoEntries <<
"..." << endl;
564 cout <<
" Processing entry " << iRecoProg <<
"/" << nRecoEntries <<
"...\r" <<
flush;
568 const double rec_nclus = rec_ninttclust_trkmatcher + rec_nmvtxclust_trkmatcher + rec_ntpclust_trkmatcher;
569 const double rec_gnclus = rec_gninttclust_trkmatcher + rec_gnmvtxclust_trkmatcher + rec_gntpcclust_manual;
570 const double rec_rnclus = rec_nclus / rec_gnclus;
571 const double rec_rintt = rec_ninttclust_trkmatcher / rec_gninttclust_trkmatcher;
572 const double rec_rmaps = rec_nmvtxclust_trkmatcher / rec_gnmvtxclust_trkmatcher;
573 const double rec_rtpc = rec_ntpclust_trkmatcher / rec_gntpcclust_manual;
574 const double rec_ptfrac = rec_pt / rec_gpt;
577 bool isNearSector =
false;
579 for (
size_t iSector = 0; iSector <
NSectors; iSector++) {
580 const float cutVal = sigCutVal * phiSectors[iSector].second;
581 const float minPhi = phiSectors[iSector].first - cutVal;
582 const float maxPhi = phiSectors[iSector].first + cutVal;
583 const bool isNear = ((rec_phi >=
minPhi) && (rec_phi <= maxPhi));
592 const bool isInZVtxCut = ((rec_vz >= zVtxRange.first) && (rec_vz <= zVtxRange.second));
593 if (doZVtxCut && !isInZVtxCut)
continue;
594 if (doPhiCut && isNearSector)
continue;
611 vecHist2D[Var::NTot][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nclus);
612 vecHist2D[Var::NIntt][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ninttclust_trkmatcher);
613 vecHist2D[Var::NMvtx][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nmvtxclust_trkmatcher);
614 vecHist2D[Var::NTpc][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ntpclust_trkmatcher);
615 vecHist2D[Var::RTot][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rnclus);
616 vecHist2D[Var::RIntt][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rintt);
617 vecHist2D[Var::RMvtx][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rmaps);
618 vecHist2D[Var::RTpc][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rtpc);
619 vecHist2D[Var::Phi][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_phi);
622 vecHist2D[Var::Frac][
Type::Track][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ptfrac);
624 vecHist2D[Var::NTot][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nclus);
625 vecHist2D[Var::NIntt][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ninttclust_trkmatcher);
626 vecHist2D[Var::NMvtx][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nmvtxclust_trkmatcher);
627 vecHist2D[Var::NTpc][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ntpclust_trkmatcher);
628 vecHist2D[Var::RTot][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rnclus);
629 vecHist2D[Var::RIntt][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rintt);
630 vecHist2D[Var::RMvtx][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rmaps);
631 vecHist2D[Var::RTpc][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rtpc);
632 vecHist2D[Var::Phi][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_phi);
635 vecHist2D[Var::Frac][
Type::Track][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ptfrac);
638 const bool isNormalTrack = ((rec_ptfrac >= oddPtFrac.first) && (rec_ptfrac <= oddPtFrac.second));
640 vecHist1D[Var::NTot][Type::Normal] ->
Fill(rec_nclus);
641 vecHist1D[Var::NIntt][Type::Normal] ->
Fill(rec_ninttclust_trkmatcher);
642 vecHist1D[Var::NMvtx][Type::Normal] ->
Fill(rec_nmvtxclust_trkmatcher);
643 vecHist1D[Var::NTpc][Type::Normal] ->
Fill(rec_ntpclust_trkmatcher);
644 vecHist1D[Var::RTot][Type::Normal] ->
Fill(rec_rnclus);
645 vecHist1D[Var::RIntt][Type::Normal] ->
Fill(rec_rintt);
646 vecHist1D[Var::RMvtx][Type::Normal] ->
Fill(rec_rmaps);
647 vecHist1D[Var::RTpc][Type::Normal] ->
Fill(rec_rtpc);
648 vecHist1D[Var::Phi][Type::Normal] ->
Fill(rec_phi);
651 vecHist1D[Var::Frac][Type::Normal] ->
Fill(rec_ptfrac);
653 vecHist2D[Var::NTot][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nclus);
654 vecHist2D[Var::NIntt][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ninttclust_trkmatcher);
655 vecHist2D[Var::NMvtx][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nmvtxclust_trkmatcher);
656 vecHist2D[Var::NTpc][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ntpclust_trkmatcher);
657 vecHist2D[Var::RTot][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rnclus);
658 vecHist2D[Var::RIntt][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rintt);
659 vecHist2D[Var::RMvtx][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rmaps);
660 vecHist2D[Var::RTpc][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rtpc);
661 vecHist2D[Var::Phi][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_phi);
662 vecHist2D[
Var::Eta][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_eta);
663 vecHist2D[
Var::Pt][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_pt);
664 vecHist2D[Var::Frac][Type::Normal][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ptfrac);
666 vecHist2D[Var::NTot][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nclus);
667 vecHist2D[Var::NIntt][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ninttclust_trkmatcher);
668 vecHist2D[Var::NMvtx][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nmvtxclust_trkmatcher);
669 vecHist2D[Var::NTpc][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ntpclust_trkmatcher);
670 vecHist2D[Var::RTot][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rnclus);
671 vecHist2D[Var::RIntt][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rintt);
672 vecHist2D[Var::RMvtx][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rmaps);
673 vecHist2D[Var::RTpc][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rtpc);
674 vecHist2D[Var::Phi][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_phi);
675 vecHist2D[
Var::Eta][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_eta);
676 vecHist2D[
Var::Pt][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_pt);
677 vecHist2D[Var::Frac][Type::Normal][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ptfrac);
679 vecHist1D[Var::NTot][Type::Weird] ->
Fill(rec_nclus);
680 vecHist1D[Var::NIntt][Type::Weird] ->
Fill(rec_ninttclust_trkmatcher);
681 vecHist1D[Var::NMvtx][Type::Weird] ->
Fill(rec_nmvtxclust_trkmatcher);
682 vecHist1D[Var::NTpc][Type::Weird] ->
Fill(rec_ntpclust_trkmatcher);
683 vecHist1D[Var::RTot][Type::Weird] ->
Fill(rec_rnclus);
684 vecHist1D[Var::RIntt][Type::Weird] ->
Fill(rec_rintt);
685 vecHist1D[Var::RMvtx][Type::Weird] ->
Fill(rec_rmaps);
686 vecHist1D[Var::RTpc][Type::Weird] ->
Fill(rec_rtpc);
687 vecHist1D[Var::Phi][Type::Weird] ->
Fill(rec_phi);
690 vecHist1D[Var::Frac][Type::Weird] ->
Fill(rec_ptfrac);
692 vecHist2D[Var::NTot][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nclus);
693 vecHist2D[Var::NIntt][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ninttclust_trkmatcher);
694 vecHist2D[Var::NMvtx][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_nmvtxclust_trkmatcher);
695 vecHist2D[Var::NTpc][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ntpclust_trkmatcher);
696 vecHist2D[Var::RTot][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rnclus);
697 vecHist2D[Var::RIntt][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rintt);
698 vecHist2D[Var::RMvtx][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rmaps);
699 vecHist2D[Var::RTpc][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_rtpc);
700 vecHist2D[Var::Phi][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_phi);
701 vecHist2D[
Var::Eta][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_eta);
702 vecHist2D[
Var::Pt][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_pt);
703 vecHist2D[Var::Frac][Type::Weird][Comp::VsTruthPt] ->
Fill(rec_gpt, rec_ptfrac);
705 vecHist2D[Var::NTot][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nclus);
706 vecHist2D[Var::NIntt][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ninttclust_trkmatcher);
707 vecHist2D[Var::NMvtx][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_nmvtxclust_trkmatcher);
708 vecHist2D[Var::NTpc][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ntpclust_trkmatcher);
709 vecHist2D[Var::RTot][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rnclus);
710 vecHist2D[Var::RIntt][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rintt);
711 vecHist2D[Var::RMvtx][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rmaps);
712 vecHist2D[Var::RTpc][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_rtpc);
713 vecHist2D[Var::Phi][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_phi);
714 vecHist2D[
Var::Eta][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_eta);
715 vecHist2D[
Var::Pt][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_pt);
716 vecHist2D[Var::Frac][Type::Weird][Comp::VsNumTpc] ->
Fill(rec_ntpclust_trkmatcher, rec_ptfrac);
719 cout <<
" Finished reconstructed track loop." << endl;
723 for (
auto histRow1D : vecHist1D) {
724 for (
auto hist1D : histRow1D) {
733 for (
auto histRow2D : vecHist2D) {
734 for (
auto histType2D : histRow2D) {
736 for (
auto hist2D : histType2D) {
745 cout <<
" Set axis titles." << endl;
749 for (
auto histRow1D : vecHist1D) {
750 for (
auto hist1D : histRow1D) {
754 for (
auto histRow2D : vecHist2D) {
755 for (
auto histType2D : histRow2D) {
756 for (
auto hist2D: histType2D) {
761 cout <<
" Saved histograms." << endl;
772 cout <<
" Finished new matcher plot script!\n" << endl;