@@ -160,8 +160,6 @@ struct Kstar892LightIon {
160160 ConfigurableAxis binsImpactPar{" binsImpactPar" , {100 , 0 , 25 }, " Binning of the impact parameter axis" };
161161 ConfigurableAxis axisNch{" axisNch" , {100 , 0 .0f , 100 .0f }, " Number of charged particles in |y| < 0.5" };
162162
163- Configurable<bool > indexCheck{" indexCheck" , true , " Check if track2id < track1id matters" }; // check and remove
164-
165163 enum MultEstimator {
166164 kFT0M ,
167165 kFT0A ,
@@ -199,28 +197,25 @@ struct Kstar892LightIon {
199197 hEventSelection.add (" hOccupancy" , " Occupancy distribution" , kTH1F , {{1000 , 0 , 15000 }});
200198
201199 hEventSelection.add (" hEventCut" , " No. of event after cuts" , kTH1D , {{20 , 0 , 20 }});
202- std::shared_ptr<TH1> hCutFlow = hEventSelection.get <TH1>(HIST (" hEventCut" ));
203-
204200 auto check = [](bool enabled) { return enabled ? " " : " #otimes" ; }; // check if a cut is enabled and put #otimes beside that label if not enabled
205-
206201 std::vector<std::string> eveCutLabels = {
207202 " All Events" ,
208203 Form (" |Vz| < %.1f" , selectionConfig.cfgVrtxZCut .value ),
209204 " sel8" ,
210205 std::string (" kNoTimeFrameBorder" ) + check (selectionConfig.isNoTimeFrameBorder .value ),
211206 std::string (" kNoITSROFrameBorder" ) + check (selectionConfig.isNoITSROFrameBorder .value ),
207+ std::string (" kIsTriggerTVX" ) + check (selectionConfig.isTriggerTVX .value ),
212208 std::string (" kNoSameBunchPileup" ) + check (selectionConfig.isNoSameBunchPileup .value ),
213209 std::string (" kIsGoodITSLayersAll" ) + check (selectionConfig.isGoodITSLayersAll .value ),
214210 std::string (" kNoCollInTimeRangeStandard" ) + check (selectionConfig.isNoCollInTimeRangeStandard .value ),
215211 Form (" Occupancy < %.0f%s" , selectionConfig.cfgOccCut .value , check (selectionConfig.isApplyOccCut .value )),
216212 std::string (" rctChecker" ) + check (rctCut.requireRCTFlagChecker .value ),
217- std::string (" kIsTriggerTVX" ) + check (selectionConfig.isTriggerTVX .value ),
218213 std::string (" kIsGoodZvtxFT0vsPV" ) + check (selectionConfig.isGoodZvtxFT0vsPV .value ),
219214 std::string (" isVertexITSTPC" ) + check (selectionConfig.isVertexITSTPC .value ),
220215 std::string (" isVertexTOFMatched" ) + check (selectionConfig.isVertexTOFMatched .value )};
221216 // assign labels
222217 for (size_t i = 0 ; i < eveCutLabels.size (); ++i) {
223- hCutFlow ->GetXaxis ()->SetBinLabel (i + 1 , eveCutLabels[i].c_str ());
218+ hEventSelection. get <TH1>( HIST ( " hEventCut " )) ->GetXaxis ()->SetBinLabel (i + 1 , eveCutLabels[i].c_str ());
224219 }
225220
226221 // for primary tracksbinsCentPlot
@@ -280,6 +275,7 @@ struct Kstar892LightIon {
280275
281276 // MC histograms
282277 if (doprocessGen) {
278+ hMC.add (" Gen/hGenNo" , " MC Event statistics" , kTH1F , {{10 , 0 .0f , 10 .0f }});
283279 hMC.add (" Gen/hk892GenpT" , " pT distribution of True MC K(892)0" , kTH2F , {ptAxis, centralityAxis});
284280 hMC.add (" Gen/hk892GenpT2" , " pT distribution of True MC K(892)0" , kTH2F , {ptAxis, centralityAxis});
285281 hMC.add (" Gen/h1genmass" , " Invariant mass of generated kstar meson" , kTH1F , {invmassAxis});
@@ -351,32 +347,32 @@ struct Kstar892LightIon {
351347 if (fillHist)
352348 hEventSelection.fill (HIST (" hEventCut" ), 4 );
353349
354- if (selectionConfig.isNoSameBunchPileup && ( !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) ))
350+ if (selectionConfig.isTriggerTVX && !collision.selection_bit (aod::evsel::kIsTriggerTVX ))
355351 return false ;
356352 if (fillHist)
357353 hEventSelection.fill (HIST (" hEventCut" ), 5 );
358354
359- if (selectionConfig.isGoodITSLayersAll && !collision.selection_bit (o2:: aod::evsel::kIsGoodITSLayersAll ))
355+ if (selectionConfig.isNoSameBunchPileup && ( !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) ))
360356 return false ;
361357 if (fillHist)
362358 hEventSelection.fill (HIST (" hEventCut" ), 6 );
363359
364- if (selectionConfig.isNoCollInTimeRangeStandard && ( !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) ))
360+ if (selectionConfig.isGoodITSLayersAll && !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ))
365361 return false ;
366362 if (fillHist)
367363 hEventSelection.fill (HIST (" hEventCut" ), 7 );
368364
369- if (selectionConfig.isApplyOccCut && (std::abs ( collision.trackOccupancyInTimeRange ()) > selectionConfig. cfgOccCut ))
365+ if (selectionConfig.isNoCollInTimeRangeStandard && (! collision.selection_bit (o2::aod::evsel:: kNoCollInTimeRangeStandard ) ))
370366 return false ;
371367 if (fillHist)
372368 hEventSelection.fill (HIST (" hEventCut" ), 8 );
373369
374- if (rctCut. requireRCTFlagChecker && ! rctChecker ( collision))
370+ if (selectionConfig. isApplyOccCut && ( std::abs ( collision. trackOccupancyInTimeRange ()) > selectionConfig. cfgOccCut ))
375371 return false ;
376372 if (fillHist)
377373 hEventSelection.fill (HIST (" hEventCut" ), 9 );
378374
379- if (selectionConfig. isTriggerTVX && !collision. selection_bit (aod::evsel:: kIsTriggerTVX ))
375+ if (rctCut. requireRCTFlagChecker && !rctChecker (collision ))
380376 return false ;
381377 if (fillHist)
382378 hEventSelection.fill (HIST (" hEventCut" ), 10 );
@@ -1048,6 +1044,9 @@ struct Kstar892LightIon {
10481044 centrality = -1.0 ;
10491045
10501046 for (const auto & collision : collisions) {
1047+
1048+ hMC.fill (HIST (" Gen/hGenNo" ), 0.5 );
1049+
10511050 if (!selectionEvent (collision, false )) { // don't fill event cut histogram
10521051 continue ;
10531052 }
@@ -1084,6 +1083,7 @@ struct Kstar892LightIon {
10841083 if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
10851084 return ;
10861085 }
1086+ hMC.fill (HIST (" Gen/hGenNo" ), 1.5 );
10871087
10881088 hMC.fill (HIST (" Gen/hAllGenCollisions1Rec" ), centrality);
10891089
@@ -1186,10 +1186,7 @@ struct Kstar892LightIon {
11861186 continue ;
11871187 }
11881188
1189- if (track1.index () == track2.index ())
1190- continue ;
1191-
1192- if (indexCheck && (track2.index () < track1.index ()))
1189+ if (track1.index () <= track2.index ())
11931190 continue ;
11941191
11951192 if (!selectionPair (track1, track2)) {
@@ -1407,7 +1404,21 @@ struct Kstar892LightIon {
14071404
14081405 float centrality = 100 .5f ;
14091406 for (auto const & collision : collisions) {
1410- centrality = collision.centFT0M ();
1407+
1408+ if (!selectionEvent (collision, false )) // don't fill event cut histogram
1409+ continue ;
1410+
1411+ if (selectCentEstimator == kFT0M ) {
1412+ centrality = collision.centFT0M ();
1413+ } else if (selectCentEstimator == kFT0A ) {
1414+ centrality = collision.centFT0A ();
1415+ } else if (selectCentEstimator == kFT0C ) {
1416+ centrality = collision.centFT0C ();
1417+ } else if (selectCentEstimator == kFV0A ) {
1418+ centrality = collision.centFV0A ();
1419+ } else {
1420+ centrality = collision.centFT0M (); // default
1421+ }
14111422 }
14121423
14131424 hMC.fill (HIST (" CorrFactors/hCentralityVsMultMC" ), centrality, mcCollision.multMCNParticlesEta08 ());
0 commit comments