Skip to content

Commit 7e86ecc

Browse files
author
Luigi Dello Stritto
committed
Add histo with Reco MC collision centrality
1 parent aaf048c commit 7e86ecc

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,17 +805,19 @@ struct HfCandidateCreator2ProngExpressions {
805805
// Slice the collisions table to get the collision info for the current MC collision
806806
float centrality{-1.f};
807807
uint16_t rejectionMask{0};
808+
int nSplitColl = 0;
808809
if constexpr (centEstimator == CentralityEstimator::FT0C) {
809810
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0C, mcCollision.globalIndex());
810811
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
811812
} else if constexpr (centEstimator == CentralityEstimator::FT0M) {
812813
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0M, mcCollision.globalIndex());
814+
nSplitColl = collSlice.size();
813815
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
814816
} else if constexpr (centEstimator == CentralityEstimator::None) {
815817
const auto collSlice = collInfos.sliceBy(colPerMcCollision, mcCollision.globalIndex());
816818
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
817819
}
818-
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask);
820+
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask, nSplitColl);
819821
if (rejectionMask != 0) {
820822
// at least one event selection not satisfied --> reject all particles from this collision
821823
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,17 +684,19 @@ struct HfCandidateCreator3ProngExpressions {
684684
// Slice the collisions table to get the collision info for the current MC collision
685685
float centrality{-1.f};
686686
uint16_t rejectionMask{0};
687+
int nSplitColl = 0;
687688
if constexpr (centEstimator == CentralityEstimator::FT0C) {
688689
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0C, mcCollision.globalIndex());
689690
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
690691
} else if constexpr (centEstimator == CentralityEstimator::FT0M) {
691692
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0M, mcCollision.globalIndex());
693+
nSplitColl = collSlice.size();
692694
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
693695
} else if constexpr (centEstimator == CentralityEstimator::None) {
694696
const auto collSlice = collInfos.sliceBy(colPerMcCollision, mcCollision.globalIndex());
695697
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
696698
}
697-
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask);
699+
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask, nSplitColl);
698700
if (rejectionMask != 0) {
699701
// at least one event selection not satisfied --> reject all gen particles from this collision
700702
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {

PWGHF/TableProducer/candidateCreatorCascade.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,17 +539,19 @@ struct HfCandidateCreatorCascadeMc {
539539
// Slice the collisions table to get the collision info for the current MC collision
540540
float centrality{-1.f};
541541
uint16_t rejectionMask{0};
542+
int nSplitColl = 0;
542543
if constexpr (centEstimator == CentralityEstimator::FT0C) {
543544
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0C, mcCollision.globalIndex());
544545
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
545546
} else if constexpr (centEstimator == CentralityEstimator::FT0M) {
546547
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0M, mcCollision.globalIndex());
548+
nSplitColl = collSlice.size();
547549
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
548550
} else if constexpr (centEstimator == CentralityEstimator::None) {
549551
const auto collSlice = collInfos.sliceBy(colPerMcCollision, mcCollision.globalIndex());
550552
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
551553
}
552-
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask);
554+
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask, nSplitColl);
553555
if (rejectionMask != 0) {
554556
// at least one event selection not satisfied --> reject all particles from this collision
555557
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {

PWGHF/TableProducer/candidateCreatorDstar.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,17 +635,19 @@ struct HfCandidateCreatorDstarExpressions {
635635
// Slice the collisions table to get the collision info for the current MC collision
636636
float centrality{-1.f};
637637
uint16_t rejectionMask{0};
638+
int nSplitColl = 0;
638639
if constexpr (centEstimator == CentralityEstimator::FT0C) {
639640
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0C, mcCollision.globalIndex());
640641
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
641642
} else if constexpr (centEstimator == CentralityEstimator::FT0M) {
642643
const auto collSlice = collInfos.sliceBy(colPerMcCollisionFT0M, mcCollision.globalIndex());
644+
nSplitColl = collSlice.size();
643645
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
644646
} else if constexpr (centEstimator == CentralityEstimator::None) {
645647
const auto collSlice = collInfos.sliceBy(colPerMcCollision, mcCollision.globalIndex());
646648
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
647649
}
648-
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask);
650+
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask, nSplitColl);
649651
if (rejectionMask != 0) {
650652
// at least one event selection not satisfied --> reject all particles from this collision
651653
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {

PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,17 +2039,19 @@ struct HfCandidateCreatorXic0Omegac0Mc {
20392039
// Slice the collisions table to get the collision info for the current MC collision
20402040
float centrality{-1.f};
20412041
uint16_t rejectionMask{0};
2042+
int nSplitColl = 0;
20422043
if constexpr (centEstimator == CentralityEstimator::FT0C) {
20432044
const auto collSlice = collsWithMcLabels.sliceBy(colPerMcCollisionFT0C, mcCollision.globalIndex());
20442045
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
20452046
} else if constexpr (centEstimator == CentralityEstimator::FT0M) {
20462047
const auto collSlice = collsWithMcLabels.sliceBy(colPerMcCollisionFT0M, mcCollision.globalIndex());
2048+
nSplitColl = collSlice.size();
20472049
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
20482050
} else if constexpr (centEstimator == CentralityEstimator::None) {
20492051
const auto collSlice = collsWithMcLabels.sliceBy(colPerMcCollision, mcCollision.globalIndex());
20502052
rejectionMask = hfEvSelMc.getHfMcCollisionRejectionMask<BCsInfo, centEstimator>(mcCollision, collSlice, centrality);
20512053
}
2052-
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask);
2054+
hfEvSelMc.fillHistograms<centEstimator>(mcCollision, rejectionMask, nSplitColl);
20532055
if (rejectionMask != 0) {
20542056
/// at least one event selection not satisfied --> reject all particles from this collision
20552057
for (unsigned int i = 0; i < mcParticlesPerMcColl.size(); ++i) {

PWGHF/Utils/utilsEvSelHf.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ struct HfEventSelectionMc {
345345
// histogram names
346346
static constexpr char nameHistGenCollisionsCent[] = "hGenCollisionsCent";
347347
std::shared_ptr<TH1> hGenCollisionsCent;
348+
static constexpr char nameHistRecCollisionsCentMc[] = "hRecCollisionsCentMc";
349+
std::shared_ptr<TH1> hRecCollisionsCentMc;
350+
static constexpr char nameHistNSplitVertices[] = "hNSplitVertices";
351+
std::shared_ptr<TH1> hNSplitVertices;
348352
static constexpr char nameHistParticles[] = "hParticles";
349353
std::shared_ptr<TH1> hParticles;
350354

@@ -353,6 +357,8 @@ struct HfEventSelectionMc {
353357
void addHistograms(o2::framework::HistogramRegistry& registry)
354358
{
355359
hGenCollisionsCent = registry.add<TH1>(nameHistGenCollisionsCent, "HF event counter;T0M;# of generated collisions", {o2::framework::HistType::kTH1D, {{100, 0., 100.}}});
360+
hRecCollisionsCentMc = registry.add<TH1>(nameHistRecCollisionsCentMc, "HF event counter;T0M;# of reconstructed collisions", {o2::framework::HistType::kTH1D, {{100, 0., 100.}}});
361+
hNSplitVertices = registry.add<TH1>(nameHistNSplitVertices, "HF split vertices counter;;# of reconstructed collisions per mc collision", {o2::framework::HistType::kTH1D, {{4, 1., 5.}}});
356362
hParticles = registry.add<TH1>(nameHistParticles, "HF particle counter;;# of accepted particles", {o2::framework::HistType::kTH1D, {axisEvents}});
357363
// Puts labels on the collision monitoring histogram.
358364
setEventRejectionLabels(hParticles);
@@ -428,7 +434,7 @@ struct HfEventSelectionMc {
428434
/// \param collision analysed collision
429435
/// \param rejectionMask bitmask storing the info about which ev. selections are not satisfied by the collision
430436
template <o2::hf_centrality::CentralityEstimator centEstimator, typename Coll>
431-
void fillHistograms(Coll const& mcCollision, const uint16_t rejectionMask)
437+
void fillHistograms(Coll const& mcCollision, const uint16_t rejectionMask, int nSplitColl = 0)
432438
{
433439
hParticles->Fill(EventRejection::None);
434440

@@ -444,6 +450,14 @@ struct HfEventSelectionMc {
444450
}
445451
hParticles->Fill(reason);
446452
}
453+
454+
if constexpr (centEstimator == o2::hf_centrality::CentralityEstimator::FT0M) {
455+
hNSplitVertices->Fill(nSplitColl);
456+
for (int nColl = 0; nColl < nSplitColl; nColl++) {
457+
hRecCollisionsCentMc->Fill(mcCollision.centFT0M());
458+
}
459+
}
460+
447461
}
448462
};
449463
} // namespace o2::hf_evsel

0 commit comments

Comments
 (0)