@@ -34,7 +34,7 @@ using namespace constants::physics;
3434
3535struct ThreeParticleCorrelations {
3636 Service<o2::ccdb::BasicCCDBManager> ccdb;
37-
37+
3838 // Analysis parameters
3939 float centMin = 0.0 , centMax = 90.0 ;
4040 float zvtxMax = 7.0 ;
@@ -66,7 +66,7 @@ struct ThreeParticleCorrelations {
6666 Filter collCent = aod::cent::centFT0C > centMin && aod::cent::centFT0C < centMax;
6767 Filter collZvtx = nabs(aod::collision::posZ) < zvtxMax;
6868 Filter mcCollZvtx = nabs(aod::mccollision::posZ) < zvtxMax;
69- Filter evSelect = aod::evsel::sel8 == true && aod::evsel:: kNoSameBunchPileup == true && aod::evsel:: kIsGoodZvtxFT0vsPV == true ;
69+ Filter evSelect = aod::evsel::sel8 == true ;
7070
7171 // V0 filters
7272 Filter v0Pt = aod::v0data::pt > v0PtMin && aod::v0data::pt < v0PtMax;
@@ -154,12 +154,17 @@ struct ThreeParticleCorrelations {
154154 const AxisSpec lambdaInvMassAxis{100 , 1.08 , 1.16 };
155155
156156 // QA & PID
157- rQARegistry.add (" hTrackPt" , " hTrackPt" , {HistType::kTH1D , {{100 , 0 , 4 }}});
158- rQARegistry.add (" hTrackEta" , " hTrackEta" , {HistType::kTH1D , {{100 , -1 , 1 }}});
159- rQARegistry.add (" hTrackPhi" , " hTrackPhi" , {HistType::kTH1D , {{100 , (-1 . / 2 ) * constants::math::PI, (5 . / 2 ) * constants::math::PI}}});
157+ rQARegistry.add (" hNEvents" , " hNEvents" , {HistType::kTH1D , {{3 , 0 , 3 }}});
158+ rQARegistry.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (1 , " All" );
159+ rQARegistry.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (2 , " kNoSameBunchPileup" );
160+ rQARegistry.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (3 , " kIsGoodZvtxFT0vsPV" );
161+
160162 rQARegistry.add (" hEventCentrality" , " hEventCentrality" , {HistType::kTH1D , {{centralityAxis}}});
161163 rQARegistry.add (" hEventCentrality_MC" , " hEventCentrality_MC" , {HistType::kTH1D , {{centralityAxis}}});
162164 rQARegistry.add (" hEventZvtx" , " hEventZvtx" , {HistType::kTH1D , {{zvtxAxis}}});
165+ rQARegistry.add (" hTrackPt" , " hTrackPt" , {HistType::kTH1D , {{100 , 0 , 4 }}});
166+ rQARegistry.add (" hTrackEta" , " hTrackEta" , {HistType::kTH1D , {{100 , -1 , 1 }}});
167+ rQARegistry.add (" hTrackPhi" , " hTrackPhi" , {HistType::kTH1D , {{100 , (-1 . / 2 ) * constants::math::PI, (5 . / 2 ) * constants::math::PI}}});
163168
164169 rQARegistry.add (" hPtPion" , " hPtPion" , {HistType::kTH2D , {{trackPtAxis}, {centralityAxis}}});
165170 rQARegistry.add (" hPtKaon" , " hPtKaon" , {HistType::kTH2D , {{trackPtAxis}, {centralityAxis}}});
@@ -227,8 +232,7 @@ struct ThreeParticleCorrelations {
227232 rMCRegistry.add (" hPIDKaonP" , " hPIDKaonP" , {HistType::kTH3D , {{trackPtAxis}, {trackEtaAxis}, {centralityAxis}}});
228233 rMCRegistry.add (" hPIDKaonN" , " hPIDKaonN" , {HistType::kTH3D , {{trackPtAxis}, {trackEtaAxis}, {centralityAxis}}});
229234 rMCRegistry.add (" hPIDProtonP" , " hPIDProtonP" , {HistType::kTH3D , {{trackPtAxis}, {trackEtaAxis}, {centralityAxis}}});
230- rMCRegistry.add (" hPIDProtonN" , " hPIDProtonN" , {HistType::kTH3D , {{trackPtAxis}, {trackEtaAxis}, {centralityAxis}}});
231-
235+ rMCRegistry.add (" hPIDProtonN" , " hPIDProtonN" , {HistType::kTH3D , {{trackPtAxis}, {trackEtaAxis}, {centralityAxis}}});
232236 rMCRegistry.add (" hPIDLambdaP_SGNL" , " hPIDLambdaP_SGNL" , {HistType::kTH3D , {{v0PtAxis}, {v0EtaAxis}, {centralityAxis}}});
233237 rMCRegistry.add (" hPIDLambdaP_SB" , " hPIDLambdaP_SB" , {HistType::kTH3D , {{v0PtAxis}, {v0EtaAxis}, {centralityAxis}}});
234238 rMCRegistry.add (" hPIDLambdaN_SGNL" , " hPIDLambdaN_SGNL" , {HistType::kTH3D , {{v0PtAxis}, {v0EtaAxis}, {centralityAxis}}});
@@ -299,6 +303,10 @@ struct ThreeParticleCorrelations {
299303 void processSame (MyFilteredCollision const & collision, MyFilteredV0s const & v0s, MyFilteredTracks const & tracks, aod::BCsWithTimestamps const &)
300304 {
301305
306+ if (!acceptEvent (collision, true )) {
307+ return ;
308+ }
309+
302310 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
303311 auto bField = getMagneticField (bc.timestamp ());
304312 rQARegistry.fill (HIST (" hEventCentrality" ), collision.centFT0C ());
@@ -410,6 +418,10 @@ struct ThreeParticleCorrelations {
410418 // Start of the Mixed-Event correlations
411419 for (const auto & [coll_1, v0_1, coll_2, track_2] : pairData) {
412420
421+ if (!acceptEvent (coll_1, false ) || !acceptEvent (coll_2, false )) {
422+ return ;
423+ }
424+
413425 auto bc = coll_1.bc_as <aod::BCsWithTimestamps>();
414426 auto bField = getMagneticField (bc.timestamp ());
415427 for (const auto & [trigger, associate] : soa::combinations (soa::CombinationsFullIndexPolicy (v0_1, track_2))) {
@@ -612,7 +624,7 @@ struct ThreeParticleCorrelations {
612624 void processMCRec (MyFilteredMCRecCollision const & collision, MyFilteredMCV0s const & v0s, MyFilteredMCTracks const & tracks, aod::McCollisions const &, aod::McParticles const &)
613625 {
614626
615- if (!collision.has_mcCollision ()) {
627+ if (!acceptEvent (collision, false ) || ! collision.has_mcCollision ()) {
616628 return ;
617629 }
618630
@@ -828,6 +840,31 @@ struct ThreeParticleCorrelations {
828840 }
829841
830842 // ==========================================================================================================================================================================================================================================================================
843+
844+ template <class CollCand >
845+ bool acceptEvent (const CollCand& collision, bool FillHist) // Event filter
846+ {
847+
848+ if (FillHist) {
849+ rQARegistry.fill (HIST (" hNEvents" ), 0.5 );
850+ }
851+
852+ if (!collision.selection_bit (aod::evsel::kNoSameBunchPileup )) { // kNoSameBunchPileup
853+ return false ;
854+ }
855+ if (FillHist) {
856+ rQARegistry.fill (HIST (" hNEvents" ), 1.5 );
857+ }
858+
859+ if (!collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )) { // kIsGoodZvtxFT0vsPV
860+ return false ;
861+ }
862+ if (FillHist) {
863+ rQARegistry.fill (HIST (" hNEvents" ), 2.5 );
864+ }
865+
866+ return true ;
867+ }
831868
832869 template <class V0Cand >
833870 bool v0Filters (const V0Cand& v0, bool MCRec) // V0 filter
0 commit comments