@@ -130,11 +130,9 @@ struct HfCorrelatorD0HadronsSelection {
130130 }
131131 }
132132 if (useSel8) {
133- isSel8 = false ;
134133 isSel8 = collision.sel8 ();
135134 }
136135 if (selNoSameBunchPileUpColl) {
137- isNosameBunchPileUp = false ;
138136 isNosameBunchPileUp = collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup );
139137 }
140138 isSelColl = isD0Found && isSel8 && isNosameBunchPileUp;
@@ -538,14 +536,12 @@ struct HfCorrelatorD0Hadrons {
538536 // MC reco level
539537 bool flagD0 = false ;
540538 bool flagD0bar = false ;
541- bool isD0Prompt = false ;
542- bool isD0NonPrompt = false ;
543539 std::vector<float > outputMlD0 = {-1 ., -1 ., -1 .};
544540 std::vector<float > outputMlD0bar = {-1 ., -1 ., -1 .};
545541
546542 for (const auto & candidate : candidates) {
547- isD0Prompt = candidate.originMcRec () == RecoDecay::OriginType::Prompt;
548- isD0NonPrompt = candidate.originMcRec () == RecoDecay::OriginType::NonPrompt;
543+ bool isD0Prompt = candidate.originMcRec () == RecoDecay::OriginType::Prompt;
544+ bool isD0NonPrompt = candidate.originMcRec () == RecoDecay::OriginType::NonPrompt;
549545 // check decay channel flag for candidate
550546 if (!TESTBIT (candidate.hfflag (), aod::hf_cand_2prong::DecayType::D0ToPiK)) {
551547 continue ;
@@ -640,7 +636,6 @@ struct HfCorrelatorD0Hadrons {
640636 registry.fill (HIST (" hTrackCounter" ), 1 ); // fill no. of tracks before soft pion removal
641637
642638 bool isPhysicalPrimary = false ;
643- int trackOrigin = -1 ;
644639 // ===== soft pion removal ===================================================
645640 double invMassDstar1 = 0 , invMassDstar2 = 0 ;
646641 bool isSoftPiD0 = false , isSoftPiD0bar = false ;
@@ -704,7 +699,7 @@ struct HfCorrelatorD0Hadrons {
704699 if (track.has_mcParticle ()) {
705700 auto mcParticle = track.template mcParticle_as <aod::McParticles>();
706701 isPhysicalPrimary = mcParticle.isPhysicalPrimary ();
707- trackOrigin = RecoDecay::getCharmHadronOrigin (mcParticles, mcParticle, true );
702+ auto trackOrigin = RecoDecay::getCharmHadronOrigin (mcParticles, mcParticle, true );
708703 entryD0HadronGenInfo (isD0Prompt, isPhysicalPrimary, trackOrigin);
709704 } else {
710705 entryD0HadronGenInfo (isD0Prompt, isPhysicalPrimary, 0 );
0 commit comments