@@ -71,6 +71,7 @@ struct JetSpectraEseTask {
7171 Configurable<double > leadingTrackPtCut{" leadingTrackPtCut" , 5.0 , " leading jet pT cut" };
7272 Configurable<double > jetAreaFractionMin{" jetAreaFractionMin" , 0.56 , " used to make a cut on the jet areas" };
7373 Configurable<bool > fjetAreaCut{" fjetAreaCut" , true , " Flag for jet area cut" };
74+ Configurable<bool > cfgCentVariant{" cfgCentVariant" , false , " Flag for centrality variant 1" };
7475
7576 Configurable<float > trackEtaMin{" trackEtaMin" , -0.9 , " minimum eta acceptance for tracks" };
7677 Configurable<float > trackEtaMax{" trackEtaMax" , 0.9 , " maximum eta acceptance for tracks" };
@@ -292,13 +293,14 @@ struct JetSpectraEseTask {
292293 return ;
293294 registry.fill (HIST (" hEventCounter" ), counter++);
294295
295- if (cfgEvSelOccupancy && !isOccupancyWithin (collision))
296+ if (cfgEvSelOccupancy && !isOccupancyAccepted (collision))
296297 return ;
297298 registry.fill (HIST (" hEventCounter" ), counter++);
298299
299- if (cfgSelCentrality && !isCentralitySelected (collision.centrality ()))
300+ auto centrality = cfgCentVariant ? collision.centralityVariant1 () : collision.centrality ();
301+ if (cfgSelCentrality && !isCentralitySelected (centrality))
300302 return ;
301- registry.fill (HIST (" hCentralitySel" ), collision. centrality () );
303+ registry.fill (HIST (" hCentralitySel" ), centrality);
302304
303305 const auto psi{procEP<PsiFillerEse>(collision)};
304306 const auto qPerc{collision.qPERCFT0C ()};
@@ -317,8 +319,8 @@ struct JetSpectraEseTask {
317319 }
318320
319321 registry.fill (HIST (" hEventCounter" ), counter++);
320- registry.fill (HIST (" hRho" ), collision. centrality () , collision.rho ());
321- registry.fill (HIST (" hCentralityAnalyzed" ), collision. centrality () );
322+ registry.fill (HIST (" hRho" ), centrality, collision.rho ());
323+ registry.fill (HIST (" hCentralityAnalyzed" ), centrality);
322324 for (auto const & jet : jets) {
323325 if (fjetAreaCut && !isJetAreaAccepted (jet))
324326 continue ;
@@ -331,19 +333,19 @@ struct JetSpectraEseTask {
331333 registry.fill (HIST (" hJetArea" ), jet.area ());
332334
333335 float dPhi{RecoDecay::constrainAngle (jet.phi () - psi.psi2 , -o2::constants::math::PI)};
334- registry.fill (HIST (" hCentJetPtdPhiq2" ), collision. centrality () , jet.pt () - (collision.rho () * jet.area ()), dPhi, qPerc[0 ]);
336+ registry.fill (HIST (" hCentJetPtdPhiq2" ), centrality, jet.pt () - (collision.rho () * jet.area ()), dPhi, qPerc[0 ]);
335337
336338 if (cfgrhoPhi) {
337339 auto rhoLocal = evalRho (rhoFit.get (), jetR, jet.phi (), collision.rho ());
338- registry.fill (HIST (" hRhoPhi" ), collision. centrality () , rhoLocal);
339- registry.fill (HIST (" hCentJetPtdPhiq2RhoPhi" ), collision. centrality () , jet.pt () - (rhoLocal * jet.area ()), dPhi, qPerc[0 ]);
340- registry.fill (HIST (" hCentPhi" ), collision. centrality () , rhoFit->Eval (jet.phi ()));
341- registry.fill (HIST (" hdPhiRhoPhi" ), dPhi, rhoFit-> Eval (jet. phi ()) );
340+ registry.fill (HIST (" hRhoPhi" ), centrality, rhoLocal);
341+ registry.fill (HIST (" hCentJetPtdPhiq2RhoPhi" ), centrality, jet.pt () - (rhoLocal * jet.area ()), dPhi, qPerc[0 ]);
342+ registry.fill (HIST (" hCentPhi" ), centrality, rhoFit->Eval (jet.phi ()));
343+ registry.fill (HIST (" hdPhiRhoPhi" ), dPhi, rhoLocal );
342344 }
343345 }
344346 registry.fill (HIST (" hEventCounter" ), counter++);
345347
346- if (collision. centrality () < 30 || collision. centrality () > 50 )
348+ if (centrality < 30 || centrality > 50 )
347349 return ;
348350 registry.fill (HIST (" hEventCounter" ), counter++);
349351 }
@@ -357,7 +359,7 @@ struct JetSpectraEseTask {
357359 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits))
358360 return ;
359361
360- if (cfgEvSelOccupancy && !isOccupancyWithin (collision))
362+ if (cfgEvSelOccupancy && !isOccupancyAccepted (collision))
361363 return ;
362364
363365 [[maybe_unused]] const auto psi{procEP<PsiFillerEP>(collision)};
@@ -442,7 +444,7 @@ struct JetSpectraEseTask {
442444 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits))
443445 return ;
444446 registry.fill (HIST (" hMCDetEventCounter" ), counter++);
445- if (cfgEvSelOccupancy && !isOccupancyWithin (collision))
447+ if (cfgEvSelOccupancy && !isOccupancyAccepted (collision))
446448 return ;
447449 registry.fill (HIST (" hMCDetEventCounter" ), counter++);
448450 registry.fill (HIST (" hDetCentralitySel" ), collision.centrality ());
@@ -487,7 +489,7 @@ struct JetSpectraEseTask {
487489 return ;
488490 registry.fill (HIST (" hMCDMatchedEventCounter" ), secCount++);
489491
490- if (cfgEvSelOccupancy && !isOccupancyWithin (collision))
492+ if (cfgEvSelOccupancy && !isOccupancyAccepted (collision))
491493 return ;
492494 registry.fill (HIST (" hMCDMatchedEventCounter" ), secCount++);
493495
@@ -656,7 +658,7 @@ struct JetSpectraEseTask {
656658 }
657659
658660 template <typename col>
659- bool isOccupancyWithin (const col& collision)
661+ bool isOccupancyAccepted (const col& collision)
660662 {
661663 auto occupancy{collision.trackOccupancyInTimeRange ()};
662664 if (occupancy < cfgCutOccupancy->at (0 ) || occupancy > cfgCutOccupancy->at (1 ))
@@ -691,10 +693,12 @@ struct JetSpectraEseTask {
691693 int nTrk{0 };
692694 if (jets.size () > 0 ) {
693695 for (const auto & track : tracks) {
694- registry.fill (HIST (" hTrackCounter" ), 0.5 );
696+ if constexpr (fillHist)
697+ registry.fill (HIST (" hTrackCounter" ), 0.5 );
695698 if (jetderiveddatautilities::selectTrack (track, trackSelection) && (std::fabs (track.eta () - leadingJetEta) > jetR) && track.pt () >= 0.2 && track.pt () <= 5 ) {
696699 nTrk++;
697- registry.fill (HIST (" hTrackCounter" ), 1.5 );
700+ if constexpr (fillHist)
701+ registry.fill (HIST (" hTrackCounter" ), 1.5 );
698702 }
699703 }
700704 }
@@ -705,9 +709,10 @@ struct JetSpectraEseTask {
705709 for (const auto & track : tracks) {
706710 if (jetderiveddatautilities::selectTrack (track, trackSelection) && (std::fabs (track.eta () - leadingJetEta) > jetR) && track.pt () >= 0.2 && track.pt () <= 5 ) {
707711 hPhiPt->Fill (track.phi (), track.pt ());
708- registry. fill ( HIST ( " hTrackCounter " ), 2.5 );
709- if constexpr (fillHist)
712+ if constexpr (fillHist) {
713+ registry. fill ( HIST ( " hTrackCounter " ), 2.5 );
710714 registry.fill (HIST (" hPhiPtsum" ), track.phi (), track.pt ());
715+ }
711716 }
712717 }
713718 auto modulationFit = std::unique_ptr<TF1>(new TF1 (" fit_rholoc" , " [0] * (1. + 2. * ([1] * std::cos(2. * (x - [2])) + [3] * std::cos(3. * (x - [4]))))" , 0 , o2::constants::math::TwoPI));
@@ -769,7 +774,7 @@ struct JetSpectraEseTask {
769774 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
770775 return ;
771776 }
772- if (cfgEvSelOccupancy && !isOccupancyWithin (collision))
777+ if (cfgEvSelOccupancy && !isOccupancyAccepted (collision))
773778 return ;
774779
775780 const auto psi{procEP<PsiFillerEse>(collision)};
0 commit comments