Skip to content

Commit

Permalink
PWGHF: add histo for mult/cent normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
Luigi Dello Stritto committed Jul 18, 2024
1 parent 08d77e4 commit 5c8fc2c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions PWGHF/TableProducer/candidateCreator2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ struct HfCandidateCreator2Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -623,7 +623,7 @@ struct HfCandidateCreator2Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -640,7 +640,7 @@ struct HfCandidateCreator2Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ struct HfCandidateCreator3Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -423,7 +423,7 @@ struct HfCandidateCreator3Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -440,7 +440,7 @@ struct HfCandidateCreator3Prong {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/TableProducer/candidateCreatorCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ struct HfCandidateCreatorCascade {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -401,7 +401,7 @@ struct HfCandidateCreatorCascade {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -418,7 +418,7 @@ struct HfCandidateCreatorCascade {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/TableProducer/candidateCreatorDstar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ struct HfCandidateCreatorDstar {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -471,7 +471,7 @@ struct HfCandidateCreatorDstar {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -488,7 +488,7 @@ struct HfCandidateCreatorDstar {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ struct HfCandidateCreatorXic0Omegac0 {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -625,7 +625,7 @@ struct HfCandidateCreatorXic0Omegac0 {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand All @@ -642,7 +642,7 @@ struct HfCandidateCreatorXic0Omegac0 {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb);

/// monitor the satisfied event selections
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);

} /// end loop over collisions
}
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/trackIndexSkimCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct HfTrackIndexSkimCreatorTagSelCollisions {
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<applyTrigSel, centEstimator, BCs>(collision, centrality, ccdb);

if (fillHistograms) {
hfEvSel.fillHistograms(collision, rejectionMask);
hfEvSel.fillHistograms(collision, rejectionMask, centrality);
// additional centrality histos
if constexpr (centEstimator != o2::hf_centrality::None) {
if (rejectionMask == 0) {
Expand Down
7 changes: 5 additions & 2 deletions PWGHF/Utils/utilsEvSelHf.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {

// histogram names
static constexpr char nameHistCollisions[] = "hCollisions";
static constexpr char nameHistCollisionsCent[] = "hCollisionsCent";
static constexpr char nameHistPosZBeforeEvSel[] = "hPosZBeforeEvSel";
static constexpr char nameHistPosZAfterEvSel[] = "hPosZAfterEvSel";
static constexpr char nameHistPosXAfterEvSel[] = "hPosXAfterEvSel";
static constexpr char nameHistPosYAfterEvSel[] = "hPosYAfterEvSel";
static constexpr char nameHistNumPvContributorsAfterSel[] = "hNumPvContributorsAfterSel";

std::shared_ptr<TH1> hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel;
std::shared_ptr<TH1> hCollisions, hCollisionsCent, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel;

// util to retrieve trigger mask in case of software triggers
Zorro zorro;
Expand All @@ -111,6 +112,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
void addHistograms(o2::framework::HistogramRegistry& registry)
{
hCollisions = registry.add<TH1>(nameHistCollisions, "HF event counter;;# of accepted collisions", {o2::framework::HistType::kTH1D, {axisEvents}});
hCollisionsCent = registry.add<TH1>(nameHistCollisionsCent, "HF event counter;T0M;# of accepted collisions", {o2::framework::HistType::kTH1D, {{100, 0., 100.}}});
hPosZBeforeEvSel = registry.add<TH1>(nameHistPosZBeforeEvSel, "all events;#it{z}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{400, -20., 20.}}});
hPosZAfterEvSel = registry.add<TH1>(nameHistPosZAfterEvSel, "selected events;#it{z}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{400, -20., 20.}}});
hPosXAfterEvSel = registry.add<TH1>(nameHistPosXAfterEvSel, "selected events;#it{x}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{200, -0.5, 0.5}}});
Expand Down Expand Up @@ -220,7 +222,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
/// \param collision analysed collision
/// \param rejectionMask bitmask storing the info about which ev. selections are not satisfied by the collision
template <typename Coll>
void fillHistograms(Coll const& collision, const uint16_t rejectionMask)
void fillHistograms(Coll const& collision, const uint16_t rejectionMask, float& centrality)
{
hCollisions->Fill(EventRejection::None);
const float posZ = collision.posZ();
Expand All @@ -237,6 +239,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
hPosYAfterEvSel->Fill(collision.posY());
hPosZAfterEvSel->Fill(posZ);
hNumPvContributorsAfterSel->Fill(collision.numContrib());
hCollisionsCent->Fill(centrality);
}
};

Expand Down

0 comments on commit 5c8fc2c

Please sign in to comment.