@@ -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" );
@@ -454,6 +458,7 @@ struct JetSpectraEseTask {
454458 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kEventSel , " Event selection" );
455459 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kOccupancyCut , " Occupancy cut" );
456460 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kCentCut , " Centrality cut" );
461+ registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kEPValid , " EP valid" );
457462 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kEse , " ESE available" );
458463 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kRhoLocal , " rho(#phi) available" );
459464 registry.get <TH1 >(HIST (" eventQA/hEventCounterMixed" ))->GetXaxis ()->SetBinLabel (kLeadJetCut , " leading jet pT cut" );
@@ -697,6 +702,10 @@ struct JetSpectraEseTask {
697702 registry.fill (HIST (" eventQA/hEventCounter" ), kCentCut );
698703
699704 const auto psi{procEP<PsiFillerEse>(collision)};
705+ if (!psi.isValid ) {
706+ return ;
707+ }
708+ registry.fill (HIST (" eventQA/hEventCounter" ), kEPValid );
700709 const auto qPerc{collision.qPERCFT0C ()};
701710 if (qPerc[0 ] < 0 ) {
702711 return ;
@@ -853,6 +862,10 @@ struct JetSpectraEseTask {
853862 registry.fill (HIST (" eventQA/hEventCounterMixed" ), kCentCut );
854863
855864 const auto psi{procEP<PsiFillerFalse>(c1)};
865+ if (!psi.isValid ) {
866+ continue ;
867+ }
868+ registry.fill (HIST (" eventQA/hEventCounterMixed" ), kEPValid );
856869 const auto qPerc{c1.qPERCFT0C ()};
857870 if (qPerc[0 ] < 0 ) {
858871 continue ;
@@ -1002,6 +1015,9 @@ struct JetSpectraEseTask {
10021015 }
10031016
10041017 [[maybe_unused]] const auto psi{procEP<PsiFillerEP>(collision)};
1018+ if (!psi.isValid ) {
1019+ return ;
1020+ }
10051021 detCorrelation (collision);
10061022 auto originalCollision =
10071023 collision.collision_as <OgCol>();
@@ -1024,6 +1040,9 @@ struct JetSpectraEseTask {
10241040 float count{0.5 };
10251041 registry.fill (HIST (" hEventCounterOcc" ), count++);
10261042 const auto psi{procEP<PsiFillerFalse>(collision)};
1043+ if (!psi.isValid ) {
1044+ return ;
1045+ }
10271046 const auto qPerc{collision.qPERCFT0C ()};
10281047
10291048 auto occupancy{collision.trackOccupancyInTimeRange ()};
@@ -1400,7 +1419,9 @@ struct JetSpectraEseTask {
14001419 fillEPCos (vec, epCorrContainer22, epCorrContainer24, epCorrContainer44);
14011420 }
14021421 }
1403- return {.psi2 = epMap.at (cfgEPRefA), .psi3 = ep3Map.at (cfgEPRefA)};
1422+ // check A is valid
1423+ bool isValidA{epMap.at (cfgEPRefA) != InvalidValue};
1424+ return {.psi2 = epMap.at (cfgEPRefA), .psi3 = ep3Map.at (cfgEPRefA), .isValid = isValidA};
14041425 }
14051426 template <typename collision>
14061427 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 +1632,8 @@ struct JetSpectraEseTask {
16111632 if constexpr (fillHist) {
16121633 registry.fill (HIST (" eventQA/hRhoPhiCheck" ), 0.5 );
16131634 }
1614- const float pValue = 0.01 ;
1615- if (cfgRhoPhiPvalCriteria && cDF < pValue ) {
1635+
1636+ if (cfgRhoPhiPvalCriteria && cDF < cfgRhoPhiPvalCut ) {
16161637 const float noFlow = 0 .0f ;
16171638 modulationFit->SetParameter (1 , noFlow); // o2-linter: disable=magic-number (fit params)
16181639 modulationFit->SetParameter (3 , noFlow); // o2-linter: disable=magic-number (fit params)
@@ -1701,6 +1722,9 @@ struct JetSpectraEseTask {
17011722 }
17021723
17031724 const auto psi{procEP<PsiFillerEse>(collision)};
1725+ if (!psi.isValid ) {
1726+ return ;
1727+ }
17041728 auto qPerc{collision.qPERCFT0C ()};
17051729 if (qPerc[0 ] < 0 ) {
17061730 return ;
0 commit comments