12 #define STRACKCUTSTUDY_CC
39 doAvgClustCalc =
false;
41 normalPtFracMax = 9999.;
50 isTruth[TYPE::TRACK] =
false;
51 isTruth[TYPE::TRUTH] =
true;
52 isTruth[TYPE::WEIRD_ALL] =
false;
53 isTruth[TYPE::WEIRD_SI] =
false;
54 isTruth[TYPE::WEIRD_TPC] =
false;
55 isTruth[TYPE::NORMAL] =
false;
56 isTruth[TYPE::PILEUP] =
false;
57 isTruth[TYPE::PRIMARY] =
false;
58 isTruth[TYPE::NONPRIM] =
false;
59 isTruth[TYPE::TRK_CUT] =
false;
60 isTruth[TYPE::TRU_CUT] =
true;
61 isTruth[TYPE::WEIRD_CUT] =
false;
62 isTruth[TYPE::WEIRD_SI_CUT] =
false;
63 isTruth[TYPE::WEIRD_TPC_CUT] =
false;
64 isTruth[TYPE::NORM_CUT] =
false;
65 isTruth[TYPE::PILE_CUT] =
false;
66 isTruth[TYPE::PRIM_CUT] =
false;
67 isTruth[TYPE::NONPRIM_CUT] =
false;
70 isPileup[TYPE::TRACK] =
false;
71 isPileup[TYPE::TRUTH] =
false;
72 isPileup[TYPE::WEIRD_ALL] =
false;
73 isPileup[TYPE::WEIRD_SI] =
false;
74 isPileup[TYPE::WEIRD_TPC] =
false;
75 isPileup[TYPE::NORMAL] =
false;
76 isPileup[TYPE::PILEUP] =
true;
77 isPileup[TYPE::PRIMARY] =
true;
78 isPileup[TYPE::NONPRIM] =
true;
79 isPileup[TYPE::TRK_CUT] =
false;
80 isPileup[TYPE::TRU_CUT] =
false;
81 isPileup[TYPE::WEIRD_CUT] =
false;
82 isPileup[TYPE::WEIRD_SI_CUT] =
false;
83 isPileup[TYPE::WEIRD_TPC_CUT] =
false;
84 isPileup[TYPE::NORM_CUT] =
false;
85 isPileup[TYPE::PILE_CUT] =
true;
86 isPileup[TYPE::PRIM_CUT] =
true;
87 isPileup[TYPE::NONPRIM_CUT] =
true;
90 isBeforeCuts[TYPE::TRACK] =
true;
91 isBeforeCuts[TYPE::TRUTH] =
true;
92 isBeforeCuts[TYPE::WEIRD_ALL] =
true;
93 isBeforeCuts[TYPE::WEIRD_SI] =
true;
94 isBeforeCuts[TYPE::WEIRD_TPC] =
true;
95 isBeforeCuts[TYPE::NORMAL] =
true;
96 isBeforeCuts[TYPE::PILEUP] =
true;
97 isBeforeCuts[TYPE::PRIMARY] =
true;
98 isBeforeCuts[TYPE::NONPRIM] =
true;
99 isBeforeCuts[TYPE::TRK_CUT] =
false;
100 isBeforeCuts[TYPE::TRU_CUT] =
false;
101 isBeforeCuts[TYPE::WEIRD_CUT] =
false;
102 isBeforeCuts[TYPE::WEIRD_SI_CUT] =
false;
103 isBeforeCuts[TYPE::WEIRD_TPC_CUT] =
false;
104 isBeforeCuts[TYPE::NORM_CUT] =
false;
105 isBeforeCuts[TYPE::PILE_CUT] =
false;
106 isBeforeCuts[TYPE::PRIM_CUT] =
false;
107 isBeforeCuts[TYPE::NONPRIM_CUT] =
false;
110 trkVarHasTruVal[TRKVAR::VX] =
true;
111 trkVarHasTruVal[TRKVAR::VY] =
true;
112 trkVarHasTruVal[TRKVAR::VZ] =
true;
113 trkVarHasTruVal[TRKVAR::NMMS] =
true;
114 trkVarHasTruVal[TRKVAR::NMAP] =
true;
115 trkVarHasTruVal[TRKVAR::NINT] =
true;
116 trkVarHasTruVal[TRKVAR::NTPC] =
true;
117 trkVarHasTruVal[TRKVAR::QUAL] =
false;
118 trkVarHasTruVal[TRKVAR::DCAXY] =
false;
119 trkVarHasTruVal[TRKVAR::DCAZ] =
false;
120 trkVarHasTruVal[TRKVAR::DELDCAXY] =
false;
121 trkVarHasTruVal[TRKVAR::DELDCAZ] =
false;
122 trkVarHasTruVal[TRKVAR::NCLUST] =
true;
123 trkVarHasTruVal[TRKVAR::AVGCLUST] =
true;
126 physVarHasTruVal[PHYSVAR::PHI] =
true;
127 physVarHasTruVal[PHYSVAR::ETA] =
true;
129 physVarHasTruVal[PHYSVAR::DELPHI] =
false;
130 physVarHasTruVal[PHYSVAR::DELETA] =
false;
131 physVarHasTruVal[PHYSVAR::DELPT] =
false;
134 fTypeCol[TYPE::TRACK] = 923;
135 fTypeCol[TYPE::TRUTH] = 899;
136 fTypeCol[TYPE::WEIRD_ALL] = 879;
137 fTypeCol[TYPE::WEIRD_SI] = 809;
138 fTypeCol[TYPE::WEIRD_TPC] = 849;
139 fTypeCol[TYPE::NORMAL] = 889;
140 fTypeCol[TYPE::PILEUP] = 923;
141 fTypeCol[TYPE::PRIMARY] = 859;
142 fTypeCol[TYPE::NONPRIM] = 799;
143 fTypeCol[TYPE::TRK_CUT] = 923;
144 fTypeCol[TYPE::TRU_CUT] = 899;
145 fTypeCol[TYPE::WEIRD_CUT] = 879;
146 fTypeCol[TYPE::WEIRD_SI_CUT] = 809;
147 fTypeCol[TYPE::WEIRD_TPC_CUT] = 849;
148 fTypeCol[TYPE::NORM_CUT] = 889;
149 fTypeCol[TYPE::PILE_CUT] = 923;
150 fTypeCol[TYPE::PRIM_CUT] = 859;
151 fTypeCol[TYPE::NONPRIM_CUT] = 799;
154 fTypeMar[TYPE::TRACK] = 20;
155 fTypeMar[TYPE::TRUTH] = 24;
156 fTypeMar[TYPE::WEIRD_ALL] = 26;
157 fTypeMar[TYPE::WEIRD_SI] = 5;
158 fTypeMar[TYPE::WEIRD_TPC] = 2;
159 fTypeMar[TYPE::NORMAL] = 32;
160 fTypeMar[TYPE::PILEUP] = 20;
161 fTypeMar[TYPE::PRIMARY] = 26;
162 fTypeMar[TYPE::NONPRIM] = 32;
163 fTypeMar[TYPE::TRK_CUT] = 20;
164 fTypeMar[TYPE::TRU_CUT] = 24;
165 fTypeMar[TYPE::WEIRD_CUT] = 26;
166 fTypeMar[TYPE::WEIRD_SI_CUT] = 5;
167 fTypeMar[TYPE::WEIRD_TPC_CUT] = 2;
168 fTypeMar[TYPE::NORM_CUT] = 32;
169 fTypeMar[TYPE::PILE_CUT] = 20;
170 fTypeMar[TYPE::PRIM_CUT] = 26;
171 fTypeMar[TYPE::NONPRIM_CUT] = 32;
174 sTrkNames[TYPE::TRACK] =
"AllTrack";
175 sTrkNames[TYPE::TRUTH] =
"AllTruth";
176 sTrkNames[TYPE::WEIRD_ALL] =
"AllWeird";
177 sTrkNames[TYPE::WEIRD_SI] =
"AllSiWeird";
178 sTrkNames[TYPE::WEIRD_TPC] =
"AllTpcWeird";
179 sTrkNames[TYPE::NORMAL] =
"AllNormal";
180 sTrkNames[TYPE::PILEUP] =
"AllPileup";
181 sTrkNames[TYPE::PRIMARY] =
"AllPrimePileup";
182 sTrkNames[TYPE::NONPRIM] =
"AllNonPrimePileup";
183 sTrkNames[TYPE::TRK_CUT] =
"CutTrack";
184 sTrkNames[TYPE::TRU_CUT] =
"CutTruth";
185 sTrkNames[TYPE::WEIRD_CUT] =
"CutWeird";
186 sTrkNames[TYPE::WEIRD_SI_CUT] =
"CutSiWeird";
187 sTrkNames[TYPE::WEIRD_TPC_CUT] =
"CutTpcWeird";
188 sTrkNames[TYPE::NORM_CUT] =
"CutNormal";
189 sTrkNames[TYPE::PILE_CUT] =
"CutPileup";
190 sTrkNames[TYPE::PRIM_CUT] =
"CutPrimePileup";
191 sTrkNames[TYPE::NONPRIM_CUT] =
"CutNonPrimePileup";
194 sTrkLabels[TYPE::TRACK] =
"Tracks (before cuts)";
195 sTrkLabels[TYPE::TRUTH] =
"Truth tracks (before cuts)";
196 sTrkLabels[TYPE::WEIRD_ALL] =
"Weird tracks (before cuts)";
197 sTrkLabels[TYPE::WEIRD_SI] =
"Weird tracks (Si seed, before cuts)";
198 sTrkLabels[TYPE::WEIRD_TPC] =
"Weird tracks (TPC seed, before cuts)";
199 sTrkLabels[TYPE::NORMAL] =
"Normal tracks (before cuts)";
200 sTrkLabels[TYPE::PILEUP] =
"Including pileup tracks (all, before cuts)";
201 sTrkLabels[TYPE::PRIMARY] =
"Including pileup tracks (only primary, before cuts)";
202 sTrkLabels[TYPE::NONPRIM] =
"Including pileup gracks (non-primary, before cuts)";
203 sTrkLabels[TYPE::TRK_CUT] =
"Tracks (after cuts)";
204 sTrkLabels[TYPE::TRU_CUT] =
"Truth tracks (after cuts)";
205 sTrkLabels[TYPE::WEIRD_CUT] =
"Weird tracks (after cuts)";
206 sTrkLabels[TYPE::WEIRD_SI_CUT] =
"Weird tracks (Si seed, after cuts)";
207 sTrkLabels[TYPE::WEIRD_TPC_CUT] =
"Weird tracks (TPC seed, after cuts)";
208 sTrkLabels[TYPE::NORM_CUT] =
"Normal tracks (after cuts)";
209 sTrkLabels[TYPE::PILE_CUT] =
"Including pileup tracks (all, after cuts)";
210 sTrkLabels[TYPE::PRIM_CUT] =
"Including pileup tracks (only primary, after cuts)";
211 sTrkLabels[TYPE::NONPRIM_CUT] =
"Including pileup gracks (non-primary, after cuts)";
214 sTrkVars[TRKVAR::VX] =
"Vx";
215 sTrkVars[TRKVAR::VY] =
"Vy";
216 sTrkVars[TRKVAR::VZ] =
"Vz";
217 sTrkVars[TRKVAR::NMMS] =
"NMms";
218 sTrkVars[TRKVAR::NMAP] =
"NMap";
219 sTrkVars[TRKVAR::NINT] =
"NInt";
220 sTrkVars[TRKVAR::NTPC] =
"NTpc";
221 sTrkVars[TRKVAR::QUAL] =
"Qual";
222 sTrkVars[TRKVAR::DCAXY] =
"DcaXY";
223 sTrkVars[TRKVAR::DCAZ] =
"DcaZ";
224 sTrkVars[TRKVAR::DELDCAXY] =
"DeltaDcaXY";
225 sTrkVars[TRKVAR::DELDCAZ] =
"DeltaDcaZ";
226 sTrkVars[TRKVAR::NCLUST] =
"NClust";
227 sTrkVars[TRKVAR::AVGCLUST] =
"AvgClustSize";
230 sPhysVars[PHYSVAR::PHI] =
"Phi";
231 sPhysVars[PHYSVAR::ETA] =
"Eta";
233 sPhysVars[PHYSVAR::DELPHI] =
"DeltaPhi";
234 sPhysVars[PHYSVAR::DELETA] =
"DeltaEta";
235 sPhysVars[PHYSVAR::DELPT] =
"DeltaPt";
236 cout <<
"\n Beginning track cut study." << endl;
245 const bool doTuplesExist = (ntTrkEO || ntTrkPU);
246 if (!doTuplesExist) {
249 delete ntTrkEO -> GetCurrentFile();
250 delete ntTrkPU -> GetCurrentFile();
262 cout <<
" Initializing:" << endl;
276 const bool isEmbedGood = ntTrkEO;
277 const bool isPileGood = !(doPileup && ntTrkPU);
278 const bool doTuplesExist = (isEmbedGood && isPileGood);
279 if (!doTuplesExist) {
280 cerr <<
"PANIC: no input tuples!\n"
281 <<
" ntTrkEO = " << ntTrkEO <<
", ntTrkPU = " << ntTrkPU
285 cout <<
" Analyzing:" <<endl;
288 Long64_t nEntriesEO = ntTrkEO -> GetEntries();
289 cout <<
" Beginning embed-only entry loop: " << nEntriesEO <<
" entries to process..." << endl;
298 Long64_t nBytesEO(0);
299 for (Long64_t iEntry = 0; iEntry < nEntriesEO; iEntry++) {
302 const Long64_t bytesEO = ntTrkEO ->
GetEntry(iEntry);
304 cerr <<
"WARNING: something wrong with embed-only entry #" << iEntry <<
"! Aborting loop!" << endl;
310 const Long64_t iProg = iEntry + 1;
312 cout <<
" Processing embed-only entry " << iProg <<
"/" << nEntriesEO <<
"..." << endl;
314 if (iProg == nEntriesEO) {
315 cout <<
" Processing embed-only entry " << iProg <<
"/" << nEntriesEO <<
"..." << endl;
317 cout <<
" Processing embed-only entry " << iProg <<
"/" << nEntriesEO <<
"...\r" <<
flush;
322 const Double_t umDcaXY = dca3dxy * 10000;
323 const Double_t umDcaZ = dca3dz * 10000;
324 const Double_t deltaDcaXY = abs(dca3dxy / dca3dxysigma);
325 const Double_t deltaDcaZ = abs(dca3dz / dca3dzsigma);
326 const Double_t deltaEta = abs(deltaeta /
eta);
328 const Double_t deltaPt = abs(deltapt /
pt);
329 const Double_t ptFrac =
pt /gpt;
332 recoTrkVars[TRKVAR::VX] =
vx;
333 recoTrkVars[TRKVAR::VY] =
vy;
334 recoTrkVars[TRKVAR::VZ] =
vz;
335 recoTrkVars[TRKVAR::NMMS] = (Double_t) nlmms;
336 recoTrkVars[TRKVAR::NMAP] = (Double_t) nlmaps;
337 recoTrkVars[TRKVAR::NINT] = (Double_t) nlintt;
338 recoTrkVars[TRKVAR::NTPC] = (Double_t) ntpc;
339 recoTrkVars[TRKVAR::QUAL] = quality;
340 recoTrkVars[TRKVAR::DCAXY] = umDcaXY;
341 recoTrkVars[TRKVAR::DCAZ] = umDcaZ;
342 recoTrkVars[TRKVAR::DELDCAXY] = deltaDcaXY;
343 recoTrkVars[TRKVAR::DELDCAZ] = deltaDcaZ;
344 recoTrkVars[TRKVAR::NCLUST] = 0.;
345 recoTrkVars[TRKVAR::AVGCLUST] = 0.;
348 trueTrkVars[TRKVAR::VX] = gvx;
349 trueTrkVars[TRKVAR::VY] = gvy;
350 trueTrkVars[TRKVAR::VZ] = gvz;
351 trueTrkVars[TRKVAR::NMMS] = (Double_t) gnlmms;
352 trueTrkVars[TRKVAR::NMAP] = (Double_t) gnlmaps;
353 trueTrkVars[TRKVAR::NINT] = (Double_t) gnlintt;
354 trueTrkVars[TRKVAR::NTPC] = (Double_t) gntpc;
355 trueTrkVars[TRKVAR::QUAL] = quality;
356 trueTrkVars[TRKVAR::DCAXY] = umDcaXY;
357 trueTrkVars[TRKVAR::DCAZ] = umDcaZ;
358 trueTrkVars[TRKVAR::DELDCAXY] = deltaDcaXY;
359 trueTrkVars[TRKVAR::DELDCAZ] = deltaDcaZ;
360 trueTrkVars[TRKVAR::NCLUST] = 0.;
361 trueTrkVars[TRKVAR::AVGCLUST] = 0.;
364 recoPhysVars[PHYSVAR::PHI] =
phi;
365 recoPhysVars[PHYSVAR::ETA] =
eta;
367 recoPhysVars[PHYSVAR::DELPHI] =
deltaPhi;
368 recoPhysVars[PHYSVAR::DELETA] = deltaEta;
369 recoPhysVars[PHYSVAR::DELPT] = deltaPt;
372 truePhysVars[PHYSVAR::PHI] = gphi;
373 truePhysVars[PHYSVAR::ETA] =
geta;
375 truePhysVars[PHYSVAR::DELPHI] =
deltaPhi;
376 truePhysVars[PHYSVAR::DELETA] = deltaEta;
377 truePhysVars[PHYSVAR::DELPT] = deltaPt;
380 const Bool_t hasSiSeed = (nmaps == 3);
381 const Bool_t hasTpcSeed = (nmaps == 0);
382 const Bool_t isPrimary = (
gprimary == 1);
383 const Bool_t isWeirdTrack = ((ptFrac < normalPtFracMin) || (ptFrac > normalPtFracMax));
387 FillTrackHistograms(TYPE::TRACK, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
388 FillTruthHistograms(TYPE::TRUTH, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
392 FillTrackHistograms(TYPE::WEIRD_ALL, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
393 if (hasSiSeed) FillTrackHistograms(TYPE::WEIRD_SI, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
394 if (hasTpcSeed) FillTrackHistograms(TYPE::WEIRD_TPC, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
396 FillTrackHistograms(TYPE::NORMAL, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
401 const Bool_t isGoodTrk = ApplyCuts(isPrimary, (UInt_t) nlmaps, (UInt_t) ntpc,
vz, umDcaXY, umDcaZ, quality);
402 if (!isGoodTrk)
continue;
405 FillTrackHistograms(TYPE::TRK_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
406 FillTruthHistograms(TYPE::TRU_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
410 FillTrackHistograms(TYPE::WEIRD_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
411 if (hasSiSeed) FillTrackHistograms(TYPE::WEIRD_SI_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
412 if (hasTpcSeed) FillTrackHistograms(TYPE::WEIRD_TPC_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
414 FillTrackHistograms(TYPE::NORM_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
417 cout <<
" Finished embed-only entry loop." << endl;
421 Long64_t nEntriesPU = ntTrkPU -> GetEntries();
422 cout <<
" Beginning with-pileup entry loop: " << nEntriesPU <<
" entries to process..." << endl;
425 Long64_t nBytesPU(0);
426 for (Long64_t iEntry = 0; iEntry < nEntriesPU; iEntry++) {
429 const Long64_t bytesPU = ntTrkPU ->
GetEntry(iEntry);
431 cerr <<
"WARNING: something wrong with with-pileup entry #" << iEntry <<
"! Aborting loop!" << endl;
437 const Long64_t iProg = iEntry + 1;
439 cout <<
" Processing with-pileup entry " << iProg <<
"/" << nEntriesPU <<
"..." << endl;
441 if (iProg == nEntriesPU) {
442 cout <<
" Processing with-pileup entry " << iProg <<
"/" << nEntriesPU <<
"..." << endl;
444 cout <<
" Processing with-pileup entry " << iProg <<
"/" << nEntriesPU <<
"...\r" <<
flush;
449 const Double_t umDcaXY = pu_dca3dxy * 10000;
450 const Double_t umDcaZ = pu_dca3dz * 10000;
451 const Double_t deltaDcaXY = abs(pu_dca3dxy / pu_dca3dxysigma);
452 const Double_t deltaDcaZ = abs(pu_dca3dz / pu_dca3dzsigma);
453 const Double_t deltaEta = abs(pu_deltaeta / pu_eta);
454 const Double_t
deltaPhi = abs(pu_deltaphi / pu_phi);
455 const Double_t deltaPt = abs(pu_deltapt / pu_pt);
458 const Bool_t thereAreNans = (isnan(pu_dca3dxy) || isnan(pu_dca3dz) || isnan(pu_eta) || isnan(pu_phi) || isnan(pu_pt));
459 if (thereAreNans)
continue;
462 recoTrkVars[TRKVAR::VX] = pu_vx;
463 recoTrkVars[TRKVAR::VY] = pu_vy;
464 recoTrkVars[TRKVAR::VZ] = pu_vz;
465 recoTrkVars[TRKVAR::NMMS] = (Double_t) pu_nlmms;
466 recoTrkVars[TRKVAR::NMAP] = (Double_t) pu_nlmaps;
467 recoTrkVars[TRKVAR::NINT] = (Double_t) pu_nlintt;
468 recoTrkVars[TRKVAR::NTPC] = (Double_t) pu_ntpc;
469 recoTrkVars[TRKVAR::QUAL] = pu_quality;
470 recoTrkVars[TRKVAR::DCAXY] = umDcaXY;
471 recoTrkVars[TRKVAR::DCAZ] = umDcaZ;
472 recoTrkVars[TRKVAR::DELDCAXY] = deltaDcaXY;
473 recoTrkVars[TRKVAR::DELDCAZ] = deltaDcaZ;
474 recoTrkVars[TRKVAR::NCLUST] = 0.;
475 recoTrkVars[TRKVAR::AVGCLUST] = 0.;
478 trueTrkVars[TRKVAR::VX] = pu_gvx;
479 trueTrkVars[TRKVAR::VY] = pu_gvy;
480 trueTrkVars[TRKVAR::VZ] = pu_gvz;
481 trueTrkVars[TRKVAR::NMMS] = (Double_t) pu_gnlmms;
482 trueTrkVars[TRKVAR::NMAP] = (Double_t) pu_gnlmaps;
483 trueTrkVars[TRKVAR::NINT] = (Double_t) pu_gnlintt;
484 trueTrkVars[TRKVAR::NTPC] = (Double_t) pu_gntpc;
485 trueTrkVars[TRKVAR::QUAL] = pu_quality;
486 trueTrkVars[TRKVAR::DCAXY] = umDcaXY;
487 trueTrkVars[TRKVAR::DCAZ] = umDcaZ;
488 trueTrkVars[TRKVAR::DELDCAXY] = deltaDcaXY;
489 trueTrkVars[TRKVAR::DELDCAZ] = deltaDcaZ;
490 trueTrkVars[TRKVAR::NCLUST] = 0.;
491 trueTrkVars[TRKVAR::AVGCLUST] = 0.;
494 recoPhysVars[PHYSVAR::PHI] = pu_phi;
495 recoPhysVars[PHYSVAR::ETA] = pu_eta;
497 recoPhysVars[PHYSVAR::DELPHI] =
deltaPhi;
498 recoPhysVars[PHYSVAR::DELETA] = deltaEta;
499 recoPhysVars[PHYSVAR::DELPT] = deltaPt;
502 truePhysVars[PHYSVAR::PHI] = gphi;
503 truePhysVars[PHYSVAR::ETA] =
geta;
505 truePhysVars[PHYSVAR::DELPHI] =
deltaPhi;
506 truePhysVars[PHYSVAR::DELETA] = deltaEta;
507 truePhysVars[PHYSVAR::DELPT] = deltaPt;
510 const Bool_t isPrimary = (pu_gprimary == 1);
514 FillTrackHistograms(TYPE::PILEUP, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
516 FillTrackHistograms(TYPE::PRIMARY, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
518 FillTrackHistograms(TYPE::NONPRIM, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
523 const Bool_t isGoodTrk = ApplyCuts(isPrimary, (UInt_t) pu_nlmaps, (UInt_t) pu_ntpc, pu_vz, umDcaXY, umDcaZ, pu_quality);
524 if (!isGoodTrk)
continue;
527 FillTrackHistograms(TYPE::PILE_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
529 FillTrackHistograms(TYPE::PRIM_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
531 FillTrackHistograms(TYPE::NONPRIM_CUT, recoTrkVars, trueTrkVars, recoPhysVars, truePhysVars);
534 cout <<
" Finished with-pileup entry loop." << endl;
538 if (doIntNorm) NormalizeHists();
548 cout <<
" Ending:" << endl;
555 const TString sLabelAllEO(
"EmbedOnly_BeforeCuts");
556 const TString sLabelCutEO(
"EmbedOnly_AfterCuts");
557 const TString sLabelOddEO(
"EmbedOnly_WeirdVsNormal");
558 const TString sLabelAllPU(
"WithPileup_BeforeCuts");
559 const TString sLabelCutPU(
"WithPileup_AfterCuts");
560 const TString sDirPlotAllEO(
"EmbedOnlyPlots_BeforeCuts");
561 const TString sDirPlotCutEO(
"EmbedOnlyPlots_AfterCuts");
562 const TString sDirPlotOddEO(
"EmbedOnlyPlots_WeirdVsNormal");
563 const TString sDirPlotAllPU(
"AllWithPileupPlots");
564 const TString sDirPlotCutPU(
"CutWithPileupPlots");
567 const Ssiz_t nToDrawAllEO(3);
568 const Ssiz_t nToDrawCutEO(3);
569 const Ssiz_t nToDrawOddEO(3);
570 const Ssiz_t nToDrawAllPU(3);
571 const Ssiz_t nToDrawCutPU(3);
572 const Int_t sToDrawAllEO[nToDrawAllEO] = {TYPE::TRACK, TYPE::TRUTH, TYPE::WEIRD_ALL};
573 const Int_t sToDrawCutEO[nToDrawCutEO] = {TYPE::TRK_CUT, TYPE::TRU_CUT, TYPE::WEIRD_CUT};
574 const Int_t sToDrawOddEO[nToDrawOddEO] = {TYPE::WEIRD_SI_CUT, TYPE::WEIRD_TPC_CUT, TYPE::NORM_CUT};
575 const Int_t sToDrawAllPU[nToDrawAllPU] = {TYPE::PILEUP, TYPE::PRIMARY, TYPE::NONPRIM};
576 const Int_t sToDrawCutPU[nToDrawCutPU] = {TYPE::PILE_CUT, TYPE::PRIM_CUT, TYPE::NONPRIM_CUT};
579 ConstructPlots(nToDrawCutEO, sToDrawCutEO, sDirPlotCutEO, sLabelCutEO);
580 ConstructPlots(nToDrawOddEO, sToDrawOddEO, sDirPlotOddEO, sLabelOddEO);
582 ConstructPlots(nToDrawAllEO, sToDrawAllEO, sDirPlotAllEO, sLabelAllEO);
585 ConstructPlots(nToDrawCutPU, sToDrawCutPU, sDirPlotCutPU, sLabelCutPU);
586 if (doBeforeCuts) ConstructPlots(nToDrawAllPU, sToDrawAllPU, sDirPlotAllPU, sLabelAllPU);
588 cout <<
" Created plots." << endl;
601 cout <<
" Closed files.\n"
602 <<
" Finished track cut study!\n"