Skip to content

Commit df135d6

Browse files
authored
[PWGHF] candidateCreatorXicToXiPiPi, candidateSelectorXicToXiPiPi: fixed bug caused by missing condition (#18657)
1 parent 30e1261 commit df135d6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,8 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
13501350
// Check whether the charm baryon is non-prompt (from a b quark).
13511351
if (flag != 0) {
13521352
// fill inclusive generated Xic+
1353-
registry.fill(HIST("hYPtGen"), particle.y(), particle.pt());
1353+
if (fillMcHistograms)
1354+
registry.fill(HIST("hYPtGen"), particle.y(), particle.pt());
13541355

13551356
origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers);
13561357
// Calculate the decay length of the generated particle

‎PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ struct HfCandidateSelectorXicToXiPiPi {
655655
if constexpr (IsMc) {
656656
if (isMatchedSignal) {
657657
registry.fill(HIST("hSelCandidatesRecSig"), PidSelected);
658-
registry.fill(HIST("hMassPtRecSig"), hfCandXic.invMassXicPlus(), hfCandXic.pt());
658+
if (fillQAHistograms)
659+
registry.fill(HIST("hMassPtRecSig"), hfCandXic.invMassXicPlus(), hfCandXic.pt());
659660
} else {
660661
registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected);
661662
}

0 commit comments

Comments
 (0)