@@ -82,9 +82,9 @@ struct studyMCTruth {
8282 const AxisSpec axis_mll{ConfMllBins, " m_{ll} (GeV/c^{2})" };
8383 const AxisSpec axis_ptll{ConfPtllBins, " p_{T,ll} (GeV/c)" };
8484
85- fRegistry .add (" Event/hReccollsPerMCcoll" , " Rec. colls per MC coll;Rec. colls per MC coll;Number of MC collisions" , kTH1D , {{21 , -0.5 , 20.5 }}, false );
86- fRegistry .add (" Event/hSelReccollsPerMCcoll" , " Selected Rec. colls per MC coll;Selected Rec. colls per MC coll;Number of MC collisions" , kTH1D , {{21 , -0.5 , 20.5 }}, false );
8785 fRegistry .add (" Event/hDiffBC" , " diffrence in BC;BC_{rec. coll.} - BC_{mc coll.}" , kTH1D , {{101 , -50.5 , +50.5 }}, false );
86+ fRegistry .add (" Event/allMC/hReccollsPerMCcoll" , " Rec. colls per MC coll;Rec. colls per MC coll;Number of MC collisions" , kTH1D , {{21 , -0.5 , 20.5 }}, false );
87+ fRegistry .add (" Event/allMC/hSelReccollsPerMCcoll" , " Selected Rec. colls per MC coll;Selected Rec. colls per MC coll;Number of MC collisions" , kTH1D , {{21 , -0.5 , 20.5 }}, false );
8888 fRegistry .add (" Event/allMC/hZvtx" , " MC Zvtx;Z_{vtx} (cm)" , kTH1D , {{100 , -50 , +50 }}, false );
8989 fRegistry .add (" Event/allMC/hImpactParameter" , " impact parameter;impact parameter b (fm)" , kTH1D , {{200 , 0 , 20 }}, false );
9090 fRegistry .addClone (" Event/allMC/" , " Event/selectedMC/" );
@@ -240,15 +240,15 @@ struct studyMCTruth {
240240 const auto & bc_from_mcCollision = mcCollision.template bc_as <TBCs>();
241241 bool isSelectedMC = isSelectedCollision (mcCollision, bc_from_mcCollision);
242242
243- auto reccolls_per_mccoll = collisions.sliceBy (recColperMcCollision, mcCollision.globalIndex ());
244- fRegistry .fill (HIST (" Event/hReccollsPerMCcoll" ), reccolls_per_mccoll.size ());
243+ const auto & reccolls_per_mccoll = collisions.sliceBy (recColperMcCollision, mcCollision.globalIndex ());
245244 int nselreccolls_per_mccoll = 0 ;
246245 for (const auto & rec_col : reccolls_per_mccoll) {
247246 if (isSelectedCollision (rec_col, rec_col.template foundBC_as <TBCs>())) {
248247 nselreccolls_per_mccoll++;
249248 }
250249 } // end of reconstructed collision
251- fRegistry .fill (HIST (" Event/hSelReccollsPerMCcoll" ), nselreccolls_per_mccoll);
250+ fRegistry .fill (HIST (" Event/allMC/hReccollsPerMCcoll" ), reccolls_per_mccoll.size ());
251+ fRegistry .fill (HIST (" Event/allMC/hSelReccollsPerMCcoll" ), nselreccolls_per_mccoll);
252252
253253 bool isSelectedRec = false ;
254254 bool hasRecCollision = false ;
@@ -259,16 +259,22 @@ struct studyMCTruth {
259259 isSelectedRec = isSelectedCollision (collision, bc_from_collision);
260260 fRegistry .fill (HIST (" Event/hDiffBC" ), bc_from_collision.globalBC () - bc_from_mcCollision.globalBC ());
261261 }
262-
263262 fRegistry .fill (HIST (" Event/allMC/hZvtx" ), mcCollision.posZ ());
264263 fRegistry .fill (HIST (" Event/allMC/hImpactParameter" ), mcCollision.impactParameter ());
264+
265265 if (isSelectedMC) {
266+ fRegistry .fill (HIST (" Event/selectedMC/hReccollsPerMCcoll" ), reccolls_per_mccoll.size ());
267+ fRegistry .fill (HIST (" Event/selectedMC/hSelReccollsPerMCcoll" ), nselreccolls_per_mccoll);
266268 fRegistry .fill (HIST (" Event/selectedMC/hZvtx" ), mcCollision.posZ ());
267269 fRegistry .fill (HIST (" Event/selectedMC/hImpactParameter" ), mcCollision.impactParameter ());
268270 if (hasRecCollision) {
271+ fRegistry .fill (HIST (" Event/selectedMC_and_Rec/hReccollsPerMCcoll" ), reccolls_per_mccoll.size ());
272+ fRegistry .fill (HIST (" Event/selectedMC_and_Rec/hSelReccollsPerMCcoll" ), nselreccolls_per_mccoll);
269273 fRegistry .fill (HIST (" Event/selectedMC_and_Rec/hZvtx" ), mcCollision.posZ ());
270274 fRegistry .fill (HIST (" Event/selectedMC_and_Rec/hImpactParameter" ), mcCollision.impactParameter ());
271275 if (isSelectedRec) {
276+ fRegistry .fill (HIST (" Event/selectedMC_and_selectedRec/hReccollsPerMCcoll" ), reccolls_per_mccoll.size ());
277+ fRegistry .fill (HIST (" Event/selectedMC_and_selectedRec/hSelReccollsPerMCcoll" ), nselreccolls_per_mccoll);
272278 fRegistry .fill (HIST (" Event/selectedMC_and_selectedRec/hZvtx" ), mcCollision.posZ ());
273279 fRegistry .fill (HIST (" Event/selectedMC_and_selectedRec/hImpactParameter" ), mcCollision.impactParameter ());
274280 }
0 commit comments