Skip to content

Commit bd4749c

Browse files
committed
Do not allow run data and MC process functions together (now that the histograms changed)
1 parent dc03730 commit bd4749c

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

PWGHF/D2H/Tasks/taskOmegac0ToOmegapi.cxx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,10 @@ struct HfTaskOmegac0ToOmegapi {
113113

114114
void init(InitContext&)
115115
{
116-
std::array<bool, 6> doprocess{doprocessDataWithKFParticle, doprocessDataWithKFParticleMl, doprocessDataWithKFParticleFT0C, doprocessDataWithKFParticleMlFT0C, doprocessDataWithKFParticleFT0M, doprocessDataWithKFParticleMlFT0M};
117-
if (std::accumulate(doprocess.begin(), doprocess.end(), 0) > 1) {
118-
LOGP(fatal, "At most one data process function should be enabled at a time.");
119-
}
120-
121-
std::array<bool, 2> doprocessMc{doprocessMcWithKFParticle, doprocessMcWithKFParticleMl};
122-
if (std::accumulate(doprocessMc.begin(), doprocessMc.end(), 0) > 1) {
123-
LOGP(fatal, "At most one MC process function should be enabled at a time.");
124-
}
125-
126-
if ((std::accumulate(doprocess.begin(), doprocess.end(), 0) + std::accumulate(doprocessMc.begin(), doprocessMc.end(), 0)) == 0) {
127-
LOGP(fatal, "At least one process function should be enabled.");
116+
std::array<bool, 8> doprocess{doprocessDataWithKFParticle, doprocessDataWithKFParticleMl, doprocessDataWithKFParticleFT0C, doprocessDataWithKFParticleMlFT0C,
117+
doprocessDataWithKFParticleFT0M, doprocessDataWithKFParticleMlFT0M, doprocessMcWithKFParticle, doprocessMcWithKFParticleMl};
118+
if ((std::accumulate(doprocess.begin(), doprocess.end(), 0)) != 1) {
119+
LOGP(fatal, "One and only one process function should be enabled at a time.");
128120
}
129121

130122
const AxisSpec thnAxisMass{thnConfigAxisMass, "inv. mass (#Omega#pi) (GeV/#it{c}^{2})"};
@@ -244,10 +236,10 @@ struct HfTaskOmegac0ToOmegapi {
244236
auto numPvContributors = candidate.template collision_as<CollType>().numContrib();
245237

246238
if constexpr (applyMl) {
247-
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(), candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), numPvContributors);
239+
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(), candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), numPvContributors, candidate.mlProbOmegac()[0]);
248240

249241
} else {
250-
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(), candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), numPvContributors, candidate.mlProbOmegac()[0]);
242+
registry.fill(HIST("hReco"), candidate.invMassCharmBaryon(), candidate.ptCharmBaryon(), candidate.kfRapOmegac(), candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), numPvContributors);
251243
}
252244
}
253245

0 commit comments

Comments
 (0)