Skip to content

Commit bc7d649

Browse files
authored
fix candidate struct initialisation
1 parent b7178db commit bc7d649

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

PWGLF/Tasks/Nuspex/antidLambdaEbye.cxx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ struct antidLambdaEbye {
341341
if (track.pt() <= antidPtTof || (track.pt() > antidPtTof && hasTof && std::abs(mass - o2::constants::physics::MassDeuteron) < tofMassMax)) {
342342
histos.fill(HIST("tpcNsigmaGlo"), track.pt(), nSigmaTPC);
343343
tempHistos.fill(HIST("tempAntid"), std::abs(track.eta()), track.pt());
344-
candidateAntids.emplace_back(track.pt(), track.eta(), track.globalIndex());
344+
CandidateAntid candAntid;
345+
candAntid.pt = track.pt();
346+
candAntid.eta = track.eta();
347+
candAntid.gloablIndex = track.globalIndex();
348+
candidateAntids.push_back(candAntid);
345349
}
346350
}
347351

@@ -379,14 +383,25 @@ struct antidLambdaEbye {
379383
trkId.emplace_back(pos.globalIndex());
380384
trkId.emplace_back(neg.globalIndex());
381385

382-
candidateV0s.emplace_back(v0.pt(), v0.eta(), pos.globalIndex(), neg.globalIndex());
386+
CandidateV0 candV0;
387+
candV0.pt = v0.pt();
388+
candV0.eta = v0.eta();
389+
candV0.globalIndexPos = pos.globalIndex();
390+
candV0.globalIndexNeg = neg.globalIndex();
391+
candidateV0s.push_back(candV0);
383392
}
384393

385394
// reject events having multiple v0s from same tracks (TODO: also across collisions?)
386395
std::sort(trkId.begin(), trkId.end());
387396
if (std::adjacent_find(trkId.begin(), trkId.end()) != trkId.end()) {
388397
candidateV0s.clear();
389-
candidateV0s.emplace_back(-999.f, -999.f, -999, -999);
398+
399+
CandidateV0 candV0;
400+
candV0.pt = -999.f;
401+
candV0.eta = -999.f;
402+
candV0.globalIndexPos = -999;
403+
candV0.globalIndexNeg = -999;
404+
candidateV0s.push_back(candV0);
390405
return;
391406
}
392407

0 commit comments

Comments
 (0)