File tree Expand file tree Collapse file tree
PWGLF/TableProducer/Strangeness Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,12 @@ struct lambdakzeromcbuilder {
104104
105105 for (auto & v0 : v0table) {
106106 thisInfo.packedMcParticleIndices = 0 ; // not de-referenced properly yet
107+ thisInfo.label = -1 ;
108+ thisInfo.motherLabel = -1 ;
109+ thisInfo.pdgCode = 0 ;
110+ thisInfo.pdgCodeMother = 0 ;
111+ thisInfo.pdgCodePositive = 0 ;
112+ thisInfo.pdgCodeNegative = 0 ;
107113 auto lNegTrack = v0.negTrack_as <aod::McTrackLabels>();
108114 auto lPosTrack = v0.posTrack_as <aod::McTrackLabels>();
109115
Original file line number Diff line number Diff line change @@ -421,15 +421,19 @@ struct strangederivedbuilder {
421421 uint32_t indMCColl = -1 ;
422422 if (v0.has_mcParticle ()) {
423423 auto mcParticle = v0.mcParticle ();
424- indMCColl = mcParticle.mcCollisionId ();
424+ if (mcParticle.has_mcCollision ()) {
425+ indMCColl = mcParticle.mcCollisionId ();
426+ }
425427 }
426428 v0mccollref (indMCColl);
427429 }
428430 for (const auto & casc : CascTable_thisColl) {
429431 uint32_t indMCColl = -1 ;
430432 if (casc.has_mcParticle ()) {
431433 auto mcParticle = casc.mcParticle ();
432- indMCColl = mcParticle.mcCollisionId ();
434+ if (mcParticle.has_mcCollision ()) {
435+ indMCColl = mcParticle.mcCollisionId ();
436+ }
433437 }
434438 cascmccollref (indMCColl);
435439 }
You can’t perform that action at this time.
0 commit comments