diff --git a/PWGHF/D2H/Tasks/taskPtFlucCharmHadrons.cxx b/PWGHF/D2H/Tasks/taskPtFlucCharmHadrons.cxx index 02edb798a8c..cae7bf1d295 100644 --- a/PWGHF/D2H/Tasks/taskPtFlucCharmHadrons.cxx +++ b/PWGHF/D2H/Tasks/taskPtFlucCharmHadrons.cxx @@ -198,26 +198,21 @@ struct HfTaskPtFlucCharmHadrons { template bool isSelectedHfCollision(Coll const& collision, float& cent) { - o2::hf_evsel::HfCollisionRejectionMask collRejMask{}; - if (centEstimator == CentralityEstimator::FT0A) - { - collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); - } else if (centEstimator == CentralityEstimator::FT0C) - { - collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); - } else if (centEstimator == CentralityEstimator::FT0M) - { - collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); - } else if (centEstimator == CentralityEstimator::FV0A) - { - collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); - } else - { - LOG(fatal) << "Centrality estimator not recognized for collision selection"; - std::abort(); - } - hfEvSel.fillHistograms(collision, collRejMask, cent); - return collRejMask == 0; + o2::hf_evsel::HfCollisionRejectionMask collRejMask{}; + if (centEstimator == CentralityEstimator::FT0A) { + collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); + } else if (centEstimator == CentralityEstimator::FT0C) { + collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); + } else if (centEstimator == CentralityEstimator::FT0M) { + collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); + } else if (centEstimator == CentralityEstimator::FV0A) { + collRejMask = hfEvSel.getHfCollisionRejectionMask(collision, cent, ccdb, registry); + } else { + LOG(fatal) << "Centrality estimator not recognized for collision selection"; + std::abort(); + } + hfEvSel.fillHistograms(collision, collRejMask, cent); + return collRejMask == 0; } /// Get candidate mass @@ -394,12 +389,10 @@ struct HfTaskPtFlucCharmHadrons { } } - for (const auto& cand : candidates) - { + for (const auto& cand : candidates) { // apply ML selection auto [ml1, ml2] = getMlScores(cand); - if (!passMlCut(ml1, ml2)) - { + if (!passMlCut(ml1, ml2)) { continue; } @@ -426,8 +419,7 @@ struct HfTaskPtFlucCharmHadrons { // fill charm-bulk correlation thnsparse registry.fill(HIST("hCharmBulkCorrelations"), invMass, cent, pt, sign, ml1, ml2, eta, meanPtA, meanPtB, candPtProduct); } - } else - { + } else { int nDcandTotA = 0; for (const auto& cand : candidates) { if (!passCandInA(cand)) {