@@ -83,6 +83,14 @@ struct JetSpectraCharged {
8383 std::vector<int > eventSelectionBits;
8484 int trackSelection = -1 ;
8585
86+ float configSwitchLow = -98.0 ;
87+ float configSwitchHigh = 9998.0 ;
88+ enum AcceptSplitCollisionsOptions {
89+ NonSplitOnly = 0 ,
90+ SplitOkCheckAnyAssocColl, // 1
91+ SplitOkCheckFirstAssocCollOnly // 2
92+ };
93+
8694 void init (o2::framework::InitContext&)
8795 {
8896 eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits (static_cast <std::string>(eventSelections));
@@ -242,6 +250,10 @@ struct JetSpectraCharged {
242250 registry.add (" h2_jet_pt_mcd_jet_pt_diff_matchedgeo_rhoareasubtracted" , " jet mcd corr pT vs. corr delta pT / jet mcd corr pt;#it{p}_{T,jet}^{mcd} (GeV/#it{c}); (#it{p}_{T,jet}^{mcd} (GeV/#it{c}) - #it{p}_{T,jet}^{mcp} (GeV/#it{c})) / #it{p}_{T,jet}^{mcd} (GeV/#it{c})" , {HistType::kTH2F , {jetPtAxisRhoAreaSub, {1000 , -5.0 , 5.0 }}});
243251 registry.add (" h2_jet_pt_mcp_jet_pt_ratio_matchedgeo_rhoareasubtracted" , " jet mcp corr pT vs. jet mcd corr pT / jet mcp corr pt;#it{p}_{T,jet}^{mcp} (GeV/#it{c}); #it{p}_{T,jet}^{mcd} (GeV/#it{c}) / #it{p}_{T,jet}^{mcp} (GeV/#it{c})" , {HistType::kTH2F , {jetPtAxisRhoAreaSub, {1000 , -5.0 , 5.0 }}});
244252 }
253+
254+ if (!(acceptSplitCollisions == NonSplitOnly || acceptSplitCollisions == SplitOkCheckAnyAssocColl || acceptSplitCollisions == SplitOkCheckFirstAssocCollOnly)) {
255+ LOGF (fatal, " Configurable acceptSplitCollisions has wrong input value; stopping workflow" );
256+ }
245257 }
246258
247259 Filter trackCuts = (aod::jtrack::pt >= trackPtMin && aod::jtrack::pt < trackPtMax && aod::jtrack::eta > trackEtaMin && aod::jtrack::eta < trackEtaMax);
@@ -251,14 +263,14 @@ struct JetSpectraCharged {
251263 template <typename TTracks, typename TJets>
252264 bool isAcceptedJet (TJets const & jet, bool mcLevelIsParticleLevel = false )
253265 {
254- if (jetAreaFractionMin > -98.0 ) {
266+ if (jetAreaFractionMin > -configSwitchLow ) {
255267 if (jet.area () < jetAreaFractionMin * o2::constants::math::PI * (jet.r () / 100.0 ) * (jet.r () / 100.0 )) {
256268 return false ;
257269 }
258270 }
259271 bool checkConstituentPt = true ;
260- bool checkConstituentMinPt = (leadingConstituentPtMin > -98.0 );
261- bool checkConstituentMaxPt = (leadingConstituentPtMax < 9998.0 );
272+ bool checkConstituentMinPt = (leadingConstituentPtMin > -configSwitchLow );
273+ bool checkConstituentMaxPt = (leadingConstituentPtMax < configSwitchHigh );
262274 if (!checkConstituentMinPt && !checkConstituentMaxPt) {
263275 checkConstituentPt = false ;
264276 }
@@ -308,7 +320,7 @@ struct JetSpectraCharged {
308320 registry.fill (HIST (" h_mccollisions_weighted" ), 1.5 , eventWeight);
309321 }
310322
311- if (acceptSplitCollisions == 0 && collisions.size () > 1 ) {
323+ if (acceptSplitCollisions == NonSplitOnly && collisions.size () > 1 ) {
312324 return false ;
313325 }
314326 if (fillHistograms) {
@@ -321,7 +333,7 @@ struct JetSpectraCharged {
321333 bool hasSel8Coll = false ;
322334 bool centralityIsGood = false ;
323335 bool occupancyIsGood = false ;
324- if (acceptSplitCollisions == 2 ) {
336+ if (acceptSplitCollisions == SplitOkCheckFirstAssocCollOnly ) {
325337 if (jetderiveddatautilities::selectCollision (collisions.begin (), eventSelectionBits, skipMBGapEvents)) {
326338 hasSel8Coll = true ;
327339 }
@@ -975,7 +987,8 @@ struct JetSpectraCharged {
975987 }
976988 float jetweight = jet.eventWeight ();
977989 double pTHat = 10 . / (std::pow (jetweight, 1.0 / pTHatExponent));
978- for (int N = 1 ; N < 21 ; N++) {
990+ int Nmax = 21 ;
991+ for (int N = 1 ; N < Nmax; N++) {
979992 if (jet.pt () < N * 0.25 * pTHat && jet.r () == round (selectedJetsRadius * 100 .0f )) {
980993 registry.fill (HIST (" h2_jet_ptcut_part" ), jet.pt (), N * 0.25 , jetweight);
981994 }
0 commit comments