Skip to content

Commit ee8ec8f

Browse files
authored
[PWGEM/Dilepton] add protection in DileptonHadronMPC.h (#15761)
1 parent f4cf477 commit ee8ec8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PWGEM/Dilepton/Core/DileptonHadronMPC.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,10 @@ struct DileptonHadronMPC {
11391139
std::pair<int, int> key_df_collision = std::make_pair(ndf, collision.globalIndex());
11401140

11411141
if (nuls > 0 || nlspp > 0 || nlsmm > 0) { // at least 1 pair exists.
1142-
emh_ref->ReserveNTracksPerCollision(key_df_collision, refTracks_per_coll.size());
1142+
if (cfgDoMix) {
1143+
emh_ref->ReserveNTracksPerCollision(key_df_collision, refTracks_per_coll.size());
1144+
}
1145+
11431146
for (const auto& track : refTracks_per_coll) {
11441147
if (fEMTrackCut.IsSelected(track)) {
11451148
fRegistry.fill(HIST("Hadron/hs"), track.pt(), track.eta(), track.phi());

0 commit comments

Comments
 (0)