Skip to content

Commit 166b556

Browse files
committed
[PWGHF] Add the configurable occupancy estimator in candidate creator
1 parent ec85005 commit 166b556

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ struct HfCandidateCreator2Prong {
105105
Configurable<double> minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any X is smaller than this"};
106106
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
107107
Configurable<bool> fillHistograms{"fillHistograms", true, "do validation plots"};
108+
Configurable<int> occEstimator{"occEstimator", 1, "Occupancy estimation (1: ITS, 2: FT0C)"};
108109
// magnetic field setting from CCDB
109110
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
110111
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -750,7 +751,7 @@ struct HfCandidateCreator2Prong {
750751

751752
/// bitmask with event. selection info
752753
float centrality{-1.f};
753-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
754+
float occupancy = getOccupancyColl(collision, occEstimator);
754755
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
755756

756757
/// monitor the satisfied event selections
@@ -768,7 +769,7 @@ struct HfCandidateCreator2Prong {
768769

769770
/// bitmask with event. selection info
770771
float centrality{-1.f};
771-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
772+
float occupancy = getOccupancyColl(collision, occEstimator);
772773
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
773774

774775
/// monitor the satisfied event selections
@@ -786,7 +787,7 @@ struct HfCandidateCreator2Prong {
786787

787788
/// bitmask with event. selection info
788789
float centrality{-1.f};
789-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
790+
float occupancy = getOccupancyColl(collision, occEstimator);
790791
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
791792

792793
/// monitor the satisfied event selections
@@ -809,7 +810,7 @@ struct HfCandidateCreator2Prong {
809810

810811
/// bitmask with event. selection info
811812
float centrality{-1.f};
812-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
813+
float occupancy = getOccupancyColl(collision, occEstimator);
813814
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BcFullInfos>(collision, centrality, ccdb, registry, bcs);
814815

815816
/// monitor the satisfied event selections

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ struct HfCandidateCreator3Prong {
110110
Configurable<double> minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any X is smaller than this"};
111111
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
112112
Configurable<bool> fillHistograms{"fillHistograms", true, "do validation plots"};
113+
Configurable<int> occEstimator{"occEstimator", 1, "Occupancy estimation (1: ITS, 2: FT0C)"};
113114
// magnetic field setting from CCDB
114115
Configurable<bool> isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"};
115116
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -894,7 +895,7 @@ struct HfCandidateCreator3Prong {
894895

895896
/// bitmask with event. selection info
896897
float centrality{-1.f};
897-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
898+
float occupancy = getOccupancyColl(collision, occEstimator);
898899
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
899900

900901
/// monitor the satisfied event selections
@@ -912,7 +913,7 @@ struct HfCandidateCreator3Prong {
912913

913914
/// bitmask with event. selection info
914915
float centrality{-1.f};
915-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
916+
float occupancy = getOccupancyColl(collision, occEstimator);
916917
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
917918

918919
/// monitor the satisfied event selections
@@ -930,7 +931,7 @@ struct HfCandidateCreator3Prong {
930931

931932
/// bitmask with event. selection info
932933
float centrality{-1.f};
933-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
934+
float occupancy = getOccupancyColl(collision, occEstimator);
934935
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
935936

936937
/// monitor the satisfied event selections
@@ -953,7 +954,7 @@ struct HfCandidateCreator3Prong {
953954

954955
/// bitmask with event. selection info
955956
float centrality{-1.f};
956-
float occupancy = getOccupancyColl(collision, OccupancyEstimator::Its);
957+
float occupancy = getOccupancyColl(collision, occEstimator);
957958
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BcFullInfos>(collision, centrality, ccdb, registry, bcs);
958959

959960
/// monitor the satisfied event selections

0 commit comments

Comments
 (0)