Skip to content

Commit 037fda5

Browse files
committed
Fix small bug in fOriginMcRec MC matching
1 parent 5206ce3 commit 037fda5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

PWGHF/TableProducer/treeCreatorOmegacSt.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ struct HfTreeCreatorOmegacSt {
366366
{
367367
mapMcPartToGenTable.clear();
368368
for (const auto& mcParticle : mcParticles) {
369+
origin = 0;
370+
idxBhadMothers.clear();
371+
decayChannel = -1;
369372
const bool isOmegaC = std::abs(mcParticle.pdgCode()) == constants::physics::Pdg::kOmegaC0;
370373
const bool isXiC = std::abs(mcParticle.pdgCode()) == constants::physics::Pdg::kXiC0;
371374
if (!isOmegaC && !isXiC) {
@@ -397,7 +400,6 @@ struct HfTreeCreatorOmegacSt {
397400
continue;
398401
}
399402

400-
int decayChannel = -1;
401403
const int pdgCasc = std::abs(mcParticles.iteratorAt(idxCascDaughter).pdgCode());
402404

403405
if (isOmegaC) {
@@ -716,6 +718,11 @@ struct HfTreeCreatorOmegacSt {
716718

717719
//--- do the MC Rec match
718720
if (mcParticles) {
721+
isMatched = false;
722+
origin = 0;
723+
idxBhadMothers.clear();
724+
indexRecCharmBaryon = -1;
725+
indexRec = -1;
719726
auto arrayDaughters = std::array{
720727
trackId.template track_as<TracksExtMc>(), // bachelor <- charm baryon
721728
casc.bachelor_as<TracksExtMc>(), // bachelor <- cascade

0 commit comments

Comments
 (0)