Skip to content

Commit ae207c0

Browse files
mfagginMattia Faggin
andauthored
[PWGHF] Fill proton PID info only if necessary, to save memory. (#11141)
Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent 52d7ad8 commit ae207c0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,17 @@ struct HfCandidateCreator3Prong {
219219
{
220220
fillProngPid<HfProngSpecies::Pion>(track0, rowProng0PidPi);
221221
fillProngPid<HfProngSpecies::Kaon>(track0, rowProng0PidKa);
222-
fillProngPid<HfProngSpecies::Proton>(track0, rowProng0PidPr);
223222
fillProngPid<HfProngSpecies::Pion>(track1, rowProng1PidPi);
224223
fillProngPid<HfProngSpecies::Kaon>(track1, rowProng1PidKa);
225-
fillProngPid<HfProngSpecies::Proton>(track1, rowProng1PidPr);
226224
fillProngPid<HfProngSpecies::Pion>(track2, rowProng2PidPi);
227225
fillProngPid<HfProngSpecies::Kaon>(track2, rowProng2PidKa);
228-
fillProngPid<HfProngSpecies::Proton>(track2, rowProng2PidPr);
226+
227+
/// fill proton PID information only if necessary
228+
if (createLc || createXic) {
229+
fillProngPid<HfProngSpecies::Proton>(track0, rowProng0PidPr);
230+
fillProngPid<HfProngSpecies::Proton>(track1, rowProng1PidPr);
231+
fillProngPid<HfProngSpecies::Proton>(track2, rowProng2PidPr);
232+
}
229233
}
230234

231235
template <bool doPvRefit = false, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename Cand>

0 commit comments

Comments
 (0)