diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index af230c3628d..7c4e452bd8c 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -65,6 +65,11 @@ struct HfCandidateCreator2Prong { Configurable useSel8Trigger{"useSel8Trigger", true, "apply the sel8 event selection"}; Configurable zPvPosMax{"zPvPosMax", 10.f, "max. PV posZ (cm)"}; Configurable useTimeFrameBorderCut{"useTimeFrameBorderCut", true, "apply TF border cut"}; + Configurable useIsGoodZvtxFT0vsPV{"useIsGoodZvtxFT0vsPV", false, "check consistency between PVz from central barrel with that from FT0 timing"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", false, "exclude collisions in bunches with more than 1 reco. PV"}; // POTENTIALLY BAD FOR BEAUTY ANALYSES + Configurable useNumTracksInTimeRange{"useNumTracksInTimeRange", false, "apply occupancy selection (num. ITS tracks with at least 5 clusters in +-100us from current collision)"}; + Configurable numTracksInTimeRangeMin{"numTracksInTimeRangeMin", 0, "min. value for occupancy selection"}; + Configurable numTracksInTimeRangeMax{"numTracksInTimeRangeMax", 1000000, "max. value for occupancy selection"}; // vertexing Configurable constrainKfToPv{"constrainKfToPv", true, "constraint KFParticle to PV"}; Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; @@ -192,7 +197,7 @@ struct HfCandidateCreator2Prong { /// reject candidates not satisfying the event selections auto collision = rowTrackIndexProng2.template collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -333,7 +338,7 @@ struct HfCandidateCreator2Prong { /// reject candidates in collisions not satisfying the event selections auto collision = rowTrackIndexProng2.template collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -616,7 +621,7 @@ struct HfCandidateCreator2Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -633,7 +638,7 @@ struct HfCandidateCreator2Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -650,7 +655,7 @@ struct HfCandidateCreator2Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index e451eea36b3..cafcef912cc 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -53,6 +53,11 @@ struct HfCandidateCreator3Prong { Configurable useSel8Trigger{"useSel8Trigger", true, "apply the sel8 event selection"}; Configurable zPvPosMax{"zPvPosMax", 10.f, "max. PV posZ (cm)"}; Configurable useTimeFrameBorderCut{"useTimeFrameBorderCut", true, "apply TF border cut"}; + Configurable useIsGoodZvtxFT0vsPV{"useIsGoodZvtxFT0vsPV", false, "check consistency between PVz from central barrel with that from FT0 timing"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", false, "exclude collisions in bunches with more than 1 reco. PV"}; // POTENTIALLY BAD FOR BEAUTY ANALYSES + Configurable useNumTracksInTimeRange{"useNumTracksInTimeRange", false, "apply occupancy selection (num. ITS tracks with at least 5 clusters in +-100us from current collision)"}; + Configurable numTracksInTimeRangeMin{"numTracksInTimeRangeMin", 0, "min. value for occupancy selection"}; + Configurable numTracksInTimeRangeMax{"numTracksInTimeRangeMax", 1000000, "max. value for occupancy selection"}; // vertexing Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; Configurable useAbsDCA{"useAbsDCA", false, "Minimise abs. distance rather than chi2"}; @@ -184,7 +189,7 @@ struct HfCandidateCreator3Prong { /// reject candidates in collisions not satisfying the event selections auto collision = rowTrackIndexProng3.template collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -416,7 +421,7 @@ struct HfCandidateCreator3Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -433,7 +438,7 @@ struct HfCandidateCreator3Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -450,7 +455,7 @@ struct HfCandidateCreator3Prong { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index 9992aa7a7a9..af1374f63d1 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -52,6 +52,11 @@ struct HfCandidateCreatorCascade { Configurable useSel8Trigger{"useSel8Trigger", true, "apply the sel8 event selection"}; Configurable zPvPosMax{"zPvPosMax", 10.f, "max. PV posZ (cm)"}; Configurable useTimeFrameBorderCut{"useTimeFrameBorderCut", true, "apply TF border cut"}; + Configurable useIsGoodZvtxFT0vsPV{"useIsGoodZvtxFT0vsPV", false, "check consistency between PVz from central barrel with that from FT0 timing"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", false, "exclude collisions in bunches with more than 1 reco. PV"}; // POTENTIALLY BAD FOR BEAUTY ANALYSES + Configurable useNumTracksInTimeRange{"useNumTracksInTimeRange", false, "apply occupancy selection (num. ITS tracks with at least 5 clusters in +-100us from current collision)"}; + Configurable numTracksInTimeRangeMin{"numTracksInTimeRangeMin", 0, "min. value for occupancy selection"}; + Configurable numTracksInTimeRangeMax{"numTracksInTimeRangeMax", 1000000, "max. value for occupancy selection"}; // vertexing // Configurable bz{"bz", 5., "magnetic field"}; Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; @@ -164,7 +169,7 @@ struct HfCandidateCreatorCascade { /// reject candidates in collisions not satisfying the event selections auto collision = casc.template collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -394,7 +399,7 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -411,7 +416,7 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -428,7 +433,7 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index 29387816a1c..092d3d82453 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -67,6 +67,11 @@ struct HfCandidateCreatorDstar { Configurable useSel8Trigger{"useSel8Trigger", true, "apply the sel8 event selection"}; Configurable zPvPosMax{"zPvPosMax", 10.f, "max. PV posZ (cm)"}; Configurable useTimeFrameBorderCut{"useTimeFrameBorderCut", true, "apply TF border cut"}; + Configurable useIsGoodZvtxFT0vsPV{"useIsGoodZvtxFT0vsPV", false, "check consistency between PVz from central barrel with that from FT0 timing"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", false, "exclude collisions in bunches with more than 1 reco. PV"}; // POTENTIALLY BAD FOR BEAUTY ANALYSES + Configurable useNumTracksInTimeRange{"useNumTracksInTimeRange", false, "apply occupancy selection (num. ITS tracks with at least 5 clusters in +-100us from current collision)"}; + Configurable numTracksInTimeRangeMin{"numTracksInTimeRangeMin", 0, "min. value for occupancy selection"}; + Configurable numTracksInTimeRangeMax{"numTracksInTimeRangeMax", 1000000, "max. value for occupancy selection"}; // vertexing Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; @@ -198,7 +203,7 @@ struct HfCandidateCreatorDstar { /// reject candidates in collisions not satisfying the event selections auto collision = rowTrackIndexDstar.template collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -467,7 +472,7 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -484,7 +489,7 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -501,7 +506,7 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index b3e8ee6e0ab..28a87ae28be 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -67,6 +67,11 @@ struct HfCandidateCreatorXic0Omegac0 { Configurable useSel8Trigger{"useSel8Trigger", true, "apply the sel8 event selection"}; Configurable zPvPosMax{"zPvPosMax", 10.f, "max. PV posZ (cm)"}; Configurable useTimeFrameBorderCut{"useTimeFrameBorderCut", true, "apply TF border cut"}; + Configurable useIsGoodZvtxFT0vsPV{"useIsGoodZvtxFT0vsPV", false, "check consistency between PVz from central barrel with that from FT0 timing"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", false, "exclude collisions in bunches with more than 1 reco. PV"}; // POTENTIALLY BAD FOR BEAUTY ANALYSES + Configurable useNumTracksInTimeRange{"useNumTracksInTimeRange", false, "apply occupancy selection (num. ITS tracks with at least 5 clusters in +-100us from current collision)"}; + Configurable numTracksInTimeRangeMin{"numTracksInTimeRangeMin", 0, "min. value for occupancy selection"}; + Configurable numTracksInTimeRangeMax{"numTracksInTimeRangeMax", 1000000, "max. value for occupancy selection"}; Configurable propagateToPCA{"propagateToPCA", false, "create tracks version propagated to PCA"}; Configurable useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"}; @@ -218,7 +223,7 @@ struct HfCandidateCreatorXic0Omegac0 { auto collision = cand.collision_as(); float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); if (rejectionMask != 0) { /// at least one event selection not satisfied --> reject the candidate continue; @@ -619,7 +624,7 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -636,7 +641,7 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); @@ -653,7 +658,7 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; - const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f); + const auto rejectionMask = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, -1, useTimeFrameBorderCut, -zPvPosMax, zPvPosMax, 0, -1.f, useIsGoodZvtxFT0vsPV, useNoSameBunchPileup, useNumTracksInTimeRange, numTracksInTimeRangeMin, numTracksInTimeRangeMax); /// monitor the satisfied event selections monitorCollision(collision, rejectionMask, hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel); diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 1f0b6d756e0..e95c832f610 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -151,7 +151,7 @@ struct HfTrackIndexSkimCreatorTagSelCollisions { void selectCollision(const Col& collision) { float centrality = -1.; - const auto statusCollision = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, triggerClassRun2, useTimeFrameBorderCut, zVertexMin, zVertexMax, nContribMin, chi2Max); + const auto statusCollision = getHfCollisionRejectionMask(collision, centrality, centralityMin, centralityMax, useSel8Trigger, triggerClassRun2, useTimeFrameBorderCut, zVertexMin, zVertexMax, nContribMin, chi2Max, /*useIsGoodZvtxFT0vsPV*/ false, /*useNoSameBunchPileup*/ false, /*useNumTracksInTimeRange*/ false, /*numTracksInTimeRangeMin*/ 0, /*numTracksInTimeRangeMax*/ 1e+10); if (fillHistograms) { monitorCollision(collision, statusCollision, hEvents, hPrimVtxZBeforeSel, hPrimVtxZAfterSel, hPrimVtxXAfterSel, hPrimVtxYAfterSel, hNContributorsAfterSel); diff --git a/PWGHF/Utils/utilsEvSelHf.h b/PWGHF/Utils/utilsEvSelHf.h index 19b19f22d98..e80f517c419 100644 --- a/PWGHF/Utils/utilsEvSelHf.h +++ b/PWGHF/Utils/utilsEvSelHf.h @@ -26,6 +26,9 @@ enum EventRejection { Centrality, Trigger, TimeFrameBorderCut, + IsGoodZvtxFT0vsPV, + NoSameBunchPileup, + NumTracksInTimeRange, NContrib, Chi2, PositionZ, @@ -44,6 +47,9 @@ void setLabelHistoEvSel(Histo& hCollisions) hCollisions->GetXaxis()->SetBinLabel(EventRejection::Centrality + 1, "Centrality"); hCollisions->GetXaxis()->SetBinLabel(EventRejection::Trigger + 1, "Trigger"); hCollisions->GetXaxis()->SetBinLabel(EventRejection::TimeFrameBorderCut + 1, "TF border"); + hCollisions->GetXaxis()->SetBinLabel(EventRejection::IsGoodZvtxFT0vsPV + 1, "PV #it{z} consistency FT0 timing"); + hCollisions->GetXaxis()->SetBinLabel(EventRejection::NoSameBunchPileup + 1, "No same-bunch pile-up"); // POTENTIALLY BAD FOR BEAUTY ANALYSES + hCollisions->GetXaxis()->SetBinLabel(EventRejection::NumTracksInTimeRange + 1, "Occupancy"); hCollisions->GetXaxis()->SetBinLabel(EventRejection::NContrib + 1, "# of PV contributors"); hCollisions->GetXaxis()->SetBinLabel(EventRejection::Chi2 + 1, "PV #it{#chi}^{2}"); hCollisions->GetXaxis()->SetBinLabel(EventRejection::PositionZ + 1, "PV #it{z}"); @@ -65,7 +71,15 @@ void setLabelHistoEvSel(Histo& hCollisions) /// \param chi2PvMax maximum PV chi2 /// \return a bitmask with the event selections not satisfied by the analysed collision template -uint16_t getHfCollisionRejectionMask(const Coll& collision, float& centrality, float centralityMin, float centralityMax, bool useSel8Trigger, int triggerClass, bool useTimeFrameBorderCut, float zPvPosMin, float zPvPosMax, int nPvContributorsMin, float chi2PvMax) +uint16_t getHfCollisionRejectionMask(const Coll& collision, float& centrality, float centralityMin, float centralityMax, + bool useSel8Trigger, + int triggerClass, + bool useTimeFrameBorderCut, + float zPvPosMin, float zPvPosMax, + int nPvContributorsMin, + float chi2PvMax, + bool useIsGoodZvtxFT0vsPV, bool useNoSameBunchPileup, + bool useNumTracksInTimeRange, int numTracksInTimeRangeMin, int numTracksInTimeRangeMax) { uint16_t statusCollision{0}; // 16 bits, in case new ev. selections will be added @@ -96,6 +110,22 @@ uint16_t getHfCollisionRejectionMask(const Coll& collision, float& centrality, f if (useTimeFrameBorderCut && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { SETBIT(statusCollision, EventRejection::TimeFrameBorderCut); } + /// PVz consistency tracking - FT0 timing + if (useIsGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + SETBIT(statusCollision, EventRejection::IsGoodZvtxFT0vsPV); + } + /// remove collisions in bunches with more than 1 reco collision + /// POTENTIALLY BAD FOR BEAUTY ANALYSES + if (useNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + SETBIT(statusCollision, EventRejection::NoSameBunchPileup); + } + /// occupancy estimator (ITS tracks with at least 5 clusters in +-10us from current collision) + if (useNumTracksInTimeRange) { + const int numTracksInTimeRange = collision.trackOccupancyInTimeRange(); + if (numTracksInTimeRange < numTracksInTimeRangeMin || numTracksInTimeRange > numTracksInTimeRangeMax) { + SETBIT(statusCollision, EventRejection::NumTracksInTimeRange); + } + } } /// primary vertex z @@ -151,23 +181,41 @@ void monitorCollision(Coll const& collision, const uint16_t rejectionMask, Hist& } hCollisions->Fill(EventRejection::TimeFrameBorderCut); // Centrality + sel8 + TF border ok + /// PVz consistency tracking - FT0 timing + if (TESTBIT(rejectionMask, EventRejection::IsGoodZvtxFT0vsPV)) { + return; + } + hCollisions->Fill(EventRejection::IsGoodZvtxFT0vsPV); // Centrality + sel8 + TF border + PVz FTO ok + + /// same bunch pile-up + if (TESTBIT(rejectionMask, EventRejection::NoSameBunchPileup)) { + return; + } + hCollisions->Fill(EventRejection::NoSameBunchPileup); // Centrality + sel8 + TF border + PVz FTO + sam bunch pile-up ok + + /// occupancy + if (TESTBIT(rejectionMask, EventRejection::NumTracksInTimeRange)) { + return; + } + hCollisions->Fill(EventRejection::NumTracksInTimeRange); // Centrality + sel8 + TF border + PVz FTO + sam bunch pile-up + occupancy ok + /// PV contributors if (TESTBIT(rejectionMask, EventRejection::NContrib)) { return; } - hCollisions->Fill(EventRejection::NContrib); // Centrality + sel8 + TF border + PV contr ok + hCollisions->Fill(EventRejection::NContrib); // Centrality + sel8 + TF border + PVz FTO + sam bunch pile-up + occupancy + PV contr ok /// PV chi2 if (TESTBIT(rejectionMask, EventRejection::Chi2)) { return; } - hCollisions->Fill(EventRejection::Chi2); // Centrality + sel8 + TF border + PV contr + chi2 ok + hCollisions->Fill(EventRejection::Chi2); // Centrality + sel8 + TF border + PVz FTO + sam bunch pile-up + occupancy + PV contr + chi2 ok /// PV position Z if (TESTBIT(rejectionMask, EventRejection::PositionZ)) { return; } - hCollisions->Fill(EventRejection::PositionZ); // Centrality + sel8 + TF border + PV contr + chi2 + posZ ok + hCollisions->Fill(EventRejection::PositionZ); // Centrality + sel8 + TF border + PVz FTO + sam bunch pile-up + occupancy + PV contr + chi2 + posZ ok hPosXAfterEvSel->Fill(collision.posX()); hPosYAfterEvSel->Fill(collision.posY());