@@ -121,6 +121,7 @@ struct JetSpectraEseTask {
121121
122122 Configurable<bool > cfgrhoPhi{" cfgrhoPhi" , true , " Flag for rho(phi)" };
123123 Configurable<bool > cfgRhoPhiPvalCriteria{" cfgRhoPhiPvalCriteria" , true , " Use <rho> instead of rho(phi) when the rho(phi) fit p-value is below 0.01" };
124+ Configurable<float > cfgRhoPhiPvalCut{" cfgRhoPhiPvalCut" , 0.01 , " p-value cut for rho(phi) fit" };
124125
125126 Configurable<int > cfgnTotalSystem{" cfgnTotalSystem" , 7 , " total qvector number // look in Qvector table for this number" };
126127 Configurable<int > cfgnCorrLevel{" cfgnCorrLevel" , 3 , " QVector step: 0 = no corr, 1 = rect, 2 = twist, 3 = full" };
@@ -225,6 +226,7 @@ struct JetSpectraEseTask {
225226 struct EventPlane {
226227 float psi2;
227228 float psi3;
229+ bool isValid;
228230 };
229231
230232 struct EventPlaneFiller {
@@ -237,6 +239,7 @@ struct JetSpectraEseTask {
237239 kEventSel ,
238240 kOccupancyCut ,
239241 kCentCut ,
242+ kEPValid ,
240243 kEse ,
241244 kRhoLocal ,
242245 kLeadJetCut
@@ -382,6 +385,7 @@ struct JetSpectraEseTask {
382385 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kEventSel , " Event selection" );
383386 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kOccupancyCut , " Occupancy cut" );
384387 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kCentCut , " Centrality cut" );
388+ registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kEPValid , " EP valid" );
385389 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kEse , " ESE available" );
386390 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kRhoLocal , " rho(#phi) available" );
387391 registry.get <TH1 >(HIST (" eventQA/hEventCounter" ))->GetXaxis ()->SetBinLabel (kLeadJetCut , " leading jet pT cut" );
@@ -697,6 +701,10 @@ struct JetSpectraEseTask {
697701 registry.fill (HIST (" eventQA/hEventCounter" ), kCentCut );
698702
699703 const auto psi{procEP<PsiFillerEse>(collision)};
704+ if (!psi.isValid ) {
705+ return ;
706+ }
707+ registry.fill (HIST (" eventQA/hEventCounter" ), kEPValid );
700708 const auto qPerc{collision.qPERCFT0C ()};
701709 if (qPerc[0 ] < 0 ) {
702710 return ;
@@ -853,6 +861,9 @@ struct JetSpectraEseTask {
853861 registry.fill (HIST (" eventQA/hEventCounterMixed" ), kCentCut );
854862
855863 const auto psi{procEP<PsiFillerFalse>(c1)};
864+ if (!psi.isValid ) {
865+ continue ;
866+ }
856867 const auto qPerc{c1.qPERCFT0C ()};
857868 if (qPerc[0 ] < 0 ) {
858869 continue ;
@@ -1002,6 +1013,9 @@ struct JetSpectraEseTask {
10021013 }
10031014
10041015 [[maybe_unused]] const auto psi{procEP<PsiFillerEP>(collision)};
1016+ if (!psi.isValid ) {
1017+ return ;
1018+ }
10051019 detCorrelation (collision);
10061020 auto originalCollision =
10071021 collision.collision_as <OgCol>();
@@ -1024,6 +1038,9 @@ struct JetSpectraEseTask {
10241038 float count{0.5 };
10251039 registry.fill (HIST (" hEventCounterOcc" ), count++);
10261040 const auto psi{procEP<PsiFillerFalse>(collision)};
1041+ if (!psi.isValid ) {
1042+ return ;
1043+ }
10271044 const auto qPerc{collision.qPERCFT0C ()};
10281045
10291046 auto occupancy{collision.trackOccupancyInTimeRange ()};
@@ -1400,7 +1417,9 @@ struct JetSpectraEseTask {
14001417 fillEPCos (vec, epCorrContainer22, epCorrContainer24, epCorrContainer44);
14011418 }
14021419 }
1403- return {.psi2 = epMap.at (cfgEPRefA), .psi3 = ep3Map.at (cfgEPRefA)};
1420+ // check A is valid
1421+ bool isValidA{epMap.at (cfgEPRefA) != InvalidValue};
1422+ return {.psi2 = epMap.at (cfgEPRefA), .psi3 = ep3Map.at (cfgEPRefA), .isValid = isValidA};
14041423 }
14051424 template <typename collision>
14061425 void fillEPCos (const collision& col, const std::array<float , 3 >& Corr22, const std::array<float , 3 >& Corr42, const std::array<float , 3 >& Corr44)
@@ -1611,8 +1630,8 @@ struct JetSpectraEseTask {
16111630 if constexpr (fillHist) {
16121631 registry.fill (HIST (" eventQA/hRhoPhiCheck" ), 0.5 );
16131632 }
1614- const float pValue = 0.01 ;
1615- if (cfgRhoPhiPvalCriteria && cDF < pValue ) {
1633+
1634+ if (cfgRhoPhiPvalCriteria && cDF < cfgRhoPhiPvalCut ) {
16161635 const float noFlow = 0 .0f ;
16171636 modulationFit->SetParameter (1 , noFlow); // o2-linter: disable=magic-number (fit params)
16181637 modulationFit->SetParameter (3 , noFlow); // o2-linter: disable=magic-number (fit params)
@@ -1701,6 +1720,9 @@ struct JetSpectraEseTask {
17011720 }
17021721
17031722 const auto psi{procEP<PsiFillerEse>(collision)};
1723+ if (!psi.isValid ) {
1724+ return ;
1725+ }
17041726 auto qPerc{collision.qPERCFT0C ()};
17051727 if (qPerc[0 ] < 0 ) {
17061728 return ;
0 commit comments