2222#include " PWGLF/DataModel/LFStrangenessTables.h"
2323#include " PWGMM/Mult/DataModel/Index.h"
2424
25+ #include " Common/CCDB/ctpRateFetcher.h"
2526#include " Common/Core/EventPlaneHelper.h"
2627#include " Common/Core/TrackSelection.h"
2728#include " Common/Core/trackUtilities.h"
@@ -141,6 +142,9 @@ struct FlowGfwOmegaXi {
141142 O2_DEFINE_CONFIGURABLE (cfgCutPtOmegaMin, float , 0 .2f , " Minimal pT for Omega" )
142143 O2_DEFINE_CONFIGURABLE (cfgCutPtOmegaMax, float , 10 .0f , " Maximal pT for Omega" )
143144 O2_DEFINE_CONFIGURABLE (cfgCutPtPIDDauMin, float , 0 .15f , " Minimal pT for daughter PID" )
145+ O2_DEFINE_CONFIGURABLE (cfgCutPtPIDbachMin, float , 0 .15f , " Minimal pT for daughter PID" )
146+ O2_DEFINE_CONFIGURABLE (cfgCutPtPIDposdauMin, float , 0 .15f , " Minimal pT for daughter PID" )
147+ O2_DEFINE_CONFIGURABLE (cfgCutPtPIDnegdauMin, float , 0 .15f , " Minimal pT for daughter PID" )
144148 // track quality selections for daughter track
145149 O2_DEFINE_CONFIGURABLE (cfgCheckITSNCls, bool , false , " check minimum number of ITS clusters" )
146150 O2_DEFINE_CONFIGURABLE (cfgCheckITSHits, bool , false , " check minimum number of ITS hits" )
@@ -160,6 +164,8 @@ struct FlowGfwOmegaXi {
160164 O2_DEFINE_CONFIGURABLE (cfgCutOccupancyHigh, int , 500 , " High cut on TPC occupancy" )
161165 O2_DEFINE_CONFIGURABLE (cfgMultPVCut, int , 5 , " Use apassX MultPVCut function or not (-1)" )
162166 O2_DEFINE_CONFIGURABLE (cfgDoV0AT0Acut, bool , true , " do V0A-T0A cut" )
167+ O2_DEFINE_CONFIGURABLE (cfgCutminIR, float , -1 , " cut min IR" )
168+ O2_DEFINE_CONFIGURABLE (cfgCutmaxIR, float , -1 , " cut max IR" )
163169 } evtSeleOpts;
164170
165171 O2_DEFINE_CONFIGURABLE (cfgCasc_rapidity, float , 0.5 , " rapidity" )
@@ -209,6 +215,7 @@ struct FlowGfwOmegaXi {
209215
210216 // Connect to ccdb
211217 Service<ccdb::BasicCCDBManager> ccdb;
218+ ctpRateFetcher rateFetcher;
212219 O2_DEFINE_CONFIGURABLE (cfgnolaterthan, int64_t , std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), " latest acceptable timestamp of creation for the object" )
213220 O2_DEFINE_CONFIGURABLE (cfgurl, std::string, " http://alice-ccdb.cern.ch" , " url of the ccdb repository" )
214221
@@ -383,7 +390,7 @@ struct FlowGfwOmegaXi {
383390 }
384391 }
385392
386- registry.add (" hEventCount" , " " , {HistType::kTH1D , {{12 , 0 , 12 }}});
393+ registry.add (" hEventCount" , " " , {HistType::kTH1D , {{14 , 0 , 14 }}});
387394 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (1 , " Filtered event" );
388395 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (2 , " after sel8" );
389396 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (3 , " after kTVXinTRD" );
@@ -396,6 +403,9 @@ struct FlowGfwOmegaXi {
396403 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (10 , " after MultPVCut" );
397404 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (11 , " after TPC occupancy cut" );
398405 registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (12 , " after V0AT0Acut" );
406+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (13 , " after IRmincut" );
407+ registry.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (14 , " after IRmaxcut" );
408+ registry.add (" hInteractionRate" , " " , {HistType::kTH1D , {{1000 , 0 , 1000 }}});
399409
400410 // QA
401411 if (cfgOutputQA) {
@@ -879,9 +889,10 @@ struct FlowGfwOmegaXi {
879889 weight_loc = 1 / eff;
880890 return true ;
881891 }
892+
882893 // event selection
883894 template <typename TCollision>
884- bool eventSelected (TCollision collision, const float centrality)
895+ bool eventSelected (TCollision collision, const float centrality, float interactionRate = - 1 )
885896 {
886897 if (evtSeleOpts.cfgDoTVXinTRD .value && collision.alias_bit (kTVXinTRD )) {
887898 // TRD triggered
@@ -958,13 +969,25 @@ struct FlowGfwOmegaXi {
958969 }
959970 registry.fill (HIST (" hEventCount" ), 11.5 );
960971
972+ registry.fill (HIST (" hInteractionRate" ), interactionRate);
973+ if (interactionRate > 0 && interactionRate < evtSeleOpts.cfgCutminIR .value )
974+ return false ;
975+ registry.fill (HIST (" hEventCount" ), 12.5 );
976+ if (interactionRate > evtSeleOpts.cfgCutmaxIR .value )
977+ return false ;
978+ registry.fill (HIST (" hEventCount" ), 13.5 );
979+
961980 return true ;
962981 }
963982
964983 void processData (AodCollisions::iterator const & collision, aod::BCsWithTimestamps const &, AodTracks const & tracks, aod::CascDataExt const & Cascades, aod::V0Datas const & V0s, DaughterTracks const &)
965984 {
966985 o2::aod::ITSResponse itsResponse;
967986 int nTot = tracks.size ();
987+ auto bc = collision.bc_as <aod::BCsWithTimestamps>();
988+ int runNumber = bc.runNumber ();
989+ double interactionRate = rateFetcher.fetch (ccdb.service , bc.timestamp (), runNumber, " ZNC hadronic" ) * 1 .e -3 ;
990+
968991 registry.fill (HIST (" hEventCount" ), 0.5 );
969992 if (nTot < 1 )
970993 return ;
@@ -973,11 +996,9 @@ struct FlowGfwOmegaXi {
973996 if (!collision.sel8 ())
974997 return ;
975998 registry.fill (HIST (" hEventCount" ), 1.5 );
976- if (eventSelected (collision, cent))
999+ if (eventSelected (collision, cent, interactionRate ))
9771000 return ;
9781001 TH1D* hLocalDensity = new TH1D (" hphi" , " hphi" , 400 , -constants::math::TwoPI, constants::math::TwoPI);
979- auto bc = collision.bc_as <aod::BCsWithTimestamps>();
980- int runNumber = bc.runNumber ();
9811002 loadCorrections (bc.timestamp ());
9821003 float vtxz = collision.posZ ();
9831004 registry.fill (HIST (" hVtxZ" ), vtxz);
@@ -1025,6 +1046,9 @@ struct FlowGfwOmegaXi {
10251046 }
10261047 // fill GFW of V0 flow
10271048 double lowpt = trkQualityOpts.cfgCutPtPIDDauMin .value ;
1049+ double bachPtcut = trkQualityOpts.cfgCutPtPIDbachMin .value ;
1050+ double posdauPtcut = trkQualityOpts.cfgCutPtPIDposdauMin .value ;
1051+ double negdauPtcut = trkQualityOpts.cfgCutPtPIDnegdauMin .value ;
10281052
10291053 if (cfgOutputV0) {
10301054 for (const auto & v0 : V0s) {
@@ -1199,14 +1223,14 @@ struct FlowGfwOmegaXi {
11991223 if (casc.pt () > trkQualityOpts.cfgCutPtOmegaMin .value && casc.pt () < trkQualityOpts.cfgCutPtOmegaMax .value ) {
12001224 if (casc.sign () < 0 && std::fabs (casc.yOmega ()) < cfgCasc_rapidity &&
12011225 (std::fabs (bachelor.tpcNSigmaKa ()) < cfgNSigma[2 ] && std::fabs (posdau.tpcNSigmaPr ()) < cfgNSigma[1 ] && std::fabs (negdau.tpcNSigmaPi ()) < cfgNSigma[0 ]) &&
1202- ((std::fabs (bachelor.tofNSigmaKa ()) < cfgNSigma[5 ] || bachelor.pt () < lowpt ) && (std::fabs (posdau.tofNSigmaPr ()) < cfgNSigma[4 ] || posdau.pt () < lowpt ) && (std::fabs (negdau.tofNSigmaPi ()) < cfgNSigma[3 ] || negdau.pt () < lowpt )) &&
1203- ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Kaon>(bachelor)) < cfgNSigma[8 ]) || bachelor.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < lowpt )) {
1226+ ((std::fabs (bachelor.tofNSigmaKa ()) < cfgNSigma[5 ] || bachelor.pt () < bachPtcut ) && (std::fabs (posdau.tofNSigmaPr ()) < cfgNSigma[4 ] || posdau.pt () < posdauPtcut ) && (std::fabs (negdau.tofNSigmaPi ()) < cfgNSigma[3 ] || negdau.pt () < negdauPtcut )) &&
1227+ ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Kaon>(bachelor)) < cfgNSigma[8 ]) || bachelor.pt () < bachPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < posdauPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < negdauPtcut )) {
12041228 registry.fill (HIST (" InvMassOmega_all" ), casc.pt (), casc.mOmega (), casc.eta (), cent);
12051229 isOmega = true ;
12061230 } else if (casc.sign () > 0 && std::fabs (casc.yOmega ()) < cfgCasc_rapidity &&
12071231 (std::fabs (bachelor.tpcNSigmaKa ()) < cfgNSigma[2 ] && std::fabs (negdau.tpcNSigmaPr ()) < cfgNSigma[1 ] && std::fabs (posdau.tpcNSigmaPi ()) < cfgNSigma[0 ]) &&
1208- ((std::fabs (bachelor.tofNSigmaKa ()) < cfgNSigma[5 ] || bachelor.pt () < lowpt ) && (std::fabs (negdau.tofNSigmaPr ()) < cfgNSigma[4 ] || negdau.pt () < lowpt ) && (std::fabs (posdau.tofNSigmaPi ()) < cfgNSigma[3 ] || posdau.pt () < lowpt )) &&
1209- ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Kaon>(bachelor)) < cfgNSigma[8 ]) || bachelor.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < lowpt )) {
1232+ ((std::fabs (bachelor.tofNSigmaKa ()) < cfgNSigma[5 ] || bachelor.pt () < bachPtcut ) && (std::fabs (negdau.tofNSigmaPr ()) < cfgNSigma[4 ] || negdau.pt () < negdauPtcut ) && (std::fabs (posdau.tofNSigmaPi ()) < cfgNSigma[3 ] || posdau.pt () < posdauPtcut )) &&
1233+ ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Kaon>(bachelor)) < cfgNSigma[8 ]) || bachelor.pt () < bachPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < posdauPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < negdauPtcut )) {
12101234 registry.fill (HIST (" InvMassOmega_all" ), casc.pt (), casc.mOmega (), casc.eta (), cent);
12111235 isOmega = true ;
12121236 }
@@ -1215,14 +1239,14 @@ struct FlowGfwOmegaXi {
12151239 if (casc.pt () > trkQualityOpts.cfgCutPtXiMin .value && casc.pt () < trkQualityOpts.cfgCutPtXiMax .value ) {
12161240 if (casc.sign () < 0 && std::fabs (casc.yXi ()) < cfgCasc_rapidity &&
12171241 (std::fabs (bachelor.tpcNSigmaPi ()) < cfgNSigma[0 ] && std::fabs (posdau.tpcNSigmaPr ()) < cfgNSigma[1 ] && std::fabs (negdau.tpcNSigmaPi ()) < cfgNSigma[0 ]) &&
1218- ((std::fabs (bachelor.tofNSigmaPi ()) < cfgNSigma[3 ] || bachelor.pt () < lowpt ) && (std::fabs (posdau.tofNSigmaPr ()) < cfgNSigma[4 ] || posdau.pt () < lowpt ) && (std::fabs (negdau.tofNSigmaPi ()) < cfgNSigma[3 ] || negdau.pt () < lowpt )) &&
1219- ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(bachelor)) < cfgNSigma[6 ]) || bachelor.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < lowpt )) {
1242+ ((std::fabs (bachelor.tofNSigmaPi ()) < cfgNSigma[3 ] || bachelor.pt () < bachPtcut ) && (std::fabs (posdau.tofNSigmaPr ()) < cfgNSigma[4 ] || posdau.pt () < posdauPtcut ) && (std::fabs (negdau.tofNSigmaPi ()) < cfgNSigma[3 ] || negdau.pt () < negdauPtcut )) &&
1243+ ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(bachelor)) < cfgNSigma[6 ]) || bachelor.pt () < bachPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < posdauPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < negdauPtcut )) {
12201244 registry.fill (HIST (" InvMassXi_all" ), casc.pt (), casc.mXi (), casc.eta (), cent);
12211245 isXi = true ;
12221246 } else if (casc.sign () > 0 && std::fabs (casc.yXi ()) < cfgCasc_rapidity &&
12231247 (std::fabs (bachelor.tpcNSigmaPi ()) < cfgNSigma[0 ] && std::fabs (negdau.tpcNSigmaPr ()) < cfgNSigma[1 ] && std::fabs (posdau.tpcNSigmaPi ()) < cfgNSigma[0 ]) &&
1224- ((std::fabs (bachelor.tofNSigmaPi ()) < cfgNSigma[3 ] || bachelor.pt () < lowpt ) && (std::fabs (negdau.tofNSigmaPr ()) < cfgNSigma[4 ] || negdau.pt () < lowpt ) && (std::fabs (posdau.tofNSigmaPi ()) < cfgNSigma[3 ] || posdau.pt () < lowpt )) &&
1225- ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(bachelor)) < cfgNSigma[6 ]) || bachelor.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < lowpt ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < lowpt )) {
1248+ ((std::fabs (bachelor.tofNSigmaPi ()) < cfgNSigma[3 ] || bachelor.pt () < bachPtcut ) && (std::fabs (negdau.tofNSigmaPr ()) < cfgNSigma[4 ] || negdau.pt () < negdauPtcut ) && (std::fabs (posdau.tofNSigmaPi ()) < cfgNSigma[3 ] || posdau.pt () < posdauPtcut )) &&
1249+ ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(bachelor)) < cfgNSigma[6 ]) || bachelor.pt () < bachPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Proton>(posdau)) < cfgNSigma[7 ]) || posdau.pt () < posdauPtcut ) && ((std::fabs (itsResponse.nSigmaITS <o2::track::PID::Pion>(negdau)) < cfgNSigma[6 ]) || negdau.pt () < negdauPtcut )) {
12261250 registry.fill (HIST (" InvMassXi_all" ), casc.pt (), casc.mXi (), casc.eta (), cent);
12271251 isXi = true ;
12281252 }
0 commit comments