From 5c8fc2c7aa18c5a04bbb408cdcc7a579fcf23dcf Mon Sep 17 00:00:00 2001 From: Luigi Dello Stritto Date: Thu, 18 Jul 2024 15:51:47 +0200 Subject: [PATCH] PWGHF: add histo for mult/cent normalization --- PWGHF/TableProducer/candidateCreator2Prong.cxx | 6 +++--- PWGHF/TableProducer/candidateCreator3Prong.cxx | 6 +++--- PWGHF/TableProducer/candidateCreatorCascade.cxx | 6 +++--- PWGHF/TableProducer/candidateCreatorDstar.cxx | 6 +++--- PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx | 6 +++--- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- PWGHF/Utils/utilsEvSelHf.h | 7 +++++-- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index 022173dddb4..2b02908cda8 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -606,7 +606,7 @@ struct HfCandidateCreator2Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -623,7 +623,7 @@ struct HfCandidateCreator2Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -640,7 +640,7 @@ struct HfCandidateCreator2Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index 3a72c0b5c5e..eeb5e5b622c 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -406,7 +406,7 @@ struct HfCandidateCreator3Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -423,7 +423,7 @@ struct HfCandidateCreator3Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -440,7 +440,7 @@ struct HfCandidateCreator3Prong { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index 3f391842c93..acf0c1acd88 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -384,7 +384,7 @@ struct HfCandidateCreatorCascade { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -401,7 +401,7 @@ struct HfCandidateCreatorCascade { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -418,7 +418,7 @@ struct HfCandidateCreatorCascade { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index e4a13157817..03222cab319 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -454,7 +454,7 @@ struct HfCandidateCreatorDstar { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -471,7 +471,7 @@ struct HfCandidateCreatorDstar { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -488,7 +488,7 @@ struct HfCandidateCreatorDstar { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 164c01a6bcd..ebbf7f453ef 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -608,7 +608,7 @@ struct HfCandidateCreatorXic0Omegac0 { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -625,7 +625,7 @@ struct HfCandidateCreatorXic0Omegac0 { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } @@ -642,7 +642,7 @@ struct HfCandidateCreatorXic0Omegac0 { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb); /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask); + hfEvSel.fillHistograms(collision, rejectionMask, centrality); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 98815d42c67..98743893d8b 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -137,7 +137,7 @@ struct HfTrackIndexSkimCreatorTagSelCollisions { const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(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) { diff --git a/PWGHF/Utils/utilsEvSelHf.h b/PWGHF/Utils/utilsEvSelHf.h index 1b5b0531a25..03399b8c1cf 100644 --- a/PWGHF/Utils/utilsEvSelHf.h +++ b/PWGHF/Utils/utilsEvSelHf.h @@ -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 hCollisions, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel; + std::shared_ptr hCollisions, hCollisionsCent, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel; // util to retrieve trigger mask in case of software triggers Zorro zorro; @@ -111,6 +112,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { void addHistograms(o2::framework::HistogramRegistry& registry) { hCollisions = registry.add(nameHistCollisions, "HF event counter;;# of accepted collisions", {o2::framework::HistType::kTH1D, {axisEvents}}); + hCollisionsCent = registry.add(nameHistCollisionsCent, "HF event counter;T0M;# of accepted collisions", {o2::framework::HistType::kTH1D, {{100, 0., 100.}}}); hPosZBeforeEvSel = registry.add(nameHistPosZBeforeEvSel, "all events;#it{z}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{400, -20., 20.}}}); hPosZAfterEvSel = registry.add(nameHistPosZAfterEvSel, "selected events;#it{z}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{400, -20., 20.}}}); hPosXAfterEvSel = registry.add(nameHistPosXAfterEvSel, "selected events;#it{x}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{200, -0.5, 0.5}}}); @@ -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 - 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(); @@ -237,6 +239,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { hPosYAfterEvSel->Fill(collision.posY()); hPosZAfterEvSel->Fill(posZ); hNumPvContributorsAfterSel->Fill(collision.numContrib()); + hCollisionsCent->Fill(centrality); } };