Skip to content

Commit 4697285

Browse files
authored
[PWGHF] Add centrality information to OmegaC tree creator (#13423)
1 parent d1e7d6a commit 4697285

File tree

2 files changed

+193
-58
lines changed

2 files changed

+193
-58
lines changed

PWGHF/D2H/Tasks/taskOmegac0ToOmegapi.cxx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,6 @@ struct HfTaskOmegac0ToOmegapi {
168168
registry.get<THnSparse>(HIST("hReco"))->Sumw2();
169169
}
170170

171-
/// Evaluate centrality/multiplicity percentile (centrality estimator is automatically selected based on the used table)
172-
/// \param candidate is candidate
173-
/// \return centrality/multiplicity percentile of the collision
174-
template <typename Coll>
175-
float evaluateCentralityColl(const Coll& collision)
176-
{
177-
return o2::hf_centrality::getCentralityColl<Coll>(collision);
178-
}
179-
180171
template <bool ApplyMl, typename CandType>
181172
void processData(const CandType& candidates)
182173
{
@@ -214,7 +205,7 @@ struct HfTaskOmegac0ToOmegapi {
214205
continue;
215206
}
216207

217-
float const cent = evaluateCentralityColl(collision);
208+
float const cent = o2::hf_centrality::getCentralityColl(collision);
218209

219210
if constexpr (ApplyMl) {
220211
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(),
@@ -283,7 +274,7 @@ struct HfTaskOmegac0ToOmegapi {
283274

284275
auto collision = candidate.template collision_as<CollisionsWithMcLabels>();
285276
uint16_t const numPvContributors = collision.numContrib();
286-
float const mcCent = evaluateCentralityColl(collision.template mcCollision_as<McCollisionWithCents>());
277+
float const mcCent = o2::hf_centrality::getCentralityColl(collision.template mcCollision_as<McCollisionWithCents>());
287278

288279
if constexpr (ApplyMl) {
289280
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(), mcCent, numPvContributors, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), candidate.mlProbOmegac()[0]);
@@ -309,7 +300,7 @@ struct HfTaskOmegac0ToOmegapi {
309300
maxNumContrib = recCol.numContrib() > maxNumContrib ? recCol.numContrib() : maxNumContrib;
310301
}
311302

312-
float const mcCent = evaluateCentralityColl(mcCollision);
303+
float const mcCent = o2::hf_centrality::getCentralityColl(mcCollision);
313304

314305
if (particle.originMcGen() == RecoDecay::OriginType::Prompt) {
315306
registry.fill(HIST("hMcGen"), ptGen, -1., yGen, RecoDecay::OriginType::Prompt, mcCent, maxNumContrib);

0 commit comments

Comments
 (0)