@@ -350,7 +350,8 @@ struct HfDataCreatorCharmResoReduced {
350350 doprocessDstarV0MC || doprocessDstarTrackMC || doprocessDstarV0AndTrackMC || doprocessDstarV0MCWithMl || doprocessDstarTrackMCWithMl || doprocessDstarV0AndTrackMCWithMl ||
351351 doprocessDplusV0MC || doprocessDplusTrackMC || doprocessDplusV0AndTrackMC || doprocessDplusV0MCWithMl || doprocessDplusTrackMCWithMl || doprocessDplusV0AndTrackMCWithMl) {
352352 // MC Rec
353- registry.add (" hMCRecCounter" , " Number of Reconstructed MC Matched candidates per channel" , {HistType::kTH1D , {{31 , -15.5 , 15.5 }}});
353+ int nChannels = hf_decay::hf_cand_reso::DecayChannelMain::NChannelsMain;
354+ registry.add (" hMCRecCounter" , " Number of Reconstructed MC Matched candidates per channel" , {HistType::kTH1D , {{2 * nChannels + 1 , -(nChannels + 0.5 ), nChannels + 0.5 }}});
354355 registry.add (" hMCRecDebug" , " Debug of MC Reco" , {HistType::kTH1D , {{551 , -0.5 , 550.5 }}});
355356 registry.add (" hMCRecOrigin" , " Origin of Matched particles" , {HistType::kTH1D , {{3 , -0.5 , 2.5 }}});
356357 registry.add (" hMCRecMassGen" , " Generated inv. mass of resoncances" , {HistType::kTH1D , {{2000 , 1.8 , 3.8 }}});
@@ -645,24 +646,24 @@ struct HfDataCreatorCharmResoReduced {
645646 vecDaughtersReso.push_back (tracks.rawIteratorAt (candCharmBach.prongPiId ()));
646647 // Check if D* is matched
647648 flagCharmBach = candCharmBach.flagMcMatchRec ();
648- if (std::abs ( flagCharmBach) > 0 ) {
649+ if (flagCharmBach != 0 ) {
649650 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::DstarMatched);
650651 origin = candCharmBach.originMcRec ();
651652 }
652653 // Check if D0 is matched
653654 flagCharmBachInterm = candCharmBach.flagMcMatchRecD0 ();
654- if (std::abs ( flagCharmBachInterm) > 0 ) {
655+ if (flagCharmBachInterm != 0 ) {
655656 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::D0Matched);
656657 }
657658 // Check if V0 is matched
658659 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.posTrackId ()));
659660 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.negTrackId ()));
660661 flagV0 = getMatchingFlagV0 (particlesMc, std::array{vecDaughtersReso[3 ], vecDaughtersReso[4 ]});
661- if (std::abs ( flagV0) > 0 ) {
662+ if (flagV0 != 0 ) {
662663 SETBIT (debugMcRec, std::abs (flagV0));
663664 }
664665 // If both D* and K0s are matched, try to match resonance
665- if (std::abs ( flagCharmBach) > 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
666+ if (flagCharmBach != 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
666667 std::array<int , 5 > pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , +kPiPlus , -kPiPlus };
667668 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], vecDaughtersReso[2 ], vecDaughtersReso[3 ], vecDaughtersReso[4 ]};
668669 for (const auto & [decayChannelFlag, pdgCodeReso] : hf_decay::hf_cand_reso::particlesToDstarK0s) {
@@ -672,7 +673,7 @@ struct HfDataCreatorCharmResoReduced {
672673 break ;
673674 }
674675 }
675- } else if (std::abs ( flagCharmBachInterm) > 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
676+ } else if (flagCharmBachInterm != 0 && flagV0 == hf_decay::hf_cand_reso::PartialMatchMc::K0Matched) {
676677 std::array<int , 4 > pdgCodesDaughters = {+kPiPlus , -kKPlus , +kPiPlus , -kPiPlus };
677678 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], vecDaughtersReso[3 ], vecDaughtersReso[4 ]};
678679 // Peaking background of D0K0s <- Ds* with spurious soft pion
@@ -703,15 +704,15 @@ struct HfDataCreatorCharmResoReduced {
703704 // Check if D+ is matched
704705 flagCharmBach = candCharmBach.flagMcMatchRec ();
705706 flagCharmBachInterm = candCharmBach.flagMcDecayChanRec ();
706- if (std::abs ( flagCharmBach) > 0 ) {
707+ if (flagCharmBach != 0 ) {
707708 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::DplusMatched);
708709 origin = candCharmBach.originMcRec ();
709710 }
710711 // Check if V0 is matched
711712 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.posTrackId ()));
712713 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.negTrackId ()));
713714 flagV0 = getMatchingFlagV0 (particlesMc, std::array{vecDaughtersReso[3 ], vecDaughtersReso[4 ]});
714- if (std::abs ( flagV0) > 0 ) {
715+ if (flagV0 != 0 ) {
715716 SETBIT (debugMcRec, std::abs (flagV0));
716717 }
717718 // If both D+ and K0s are matched, try to match resonance
@@ -755,15 +756,15 @@ struct HfDataCreatorCharmResoReduced {
755756 // Check if D0 is matched
756757 flagCharmBach = candCharmBach.flagMcMatchRec ();
757758 flagCharmBachInterm = candCharmBach.flagMcDecayChanRec ();
758- if (std::abs ( flagCharmBach) > 0 ) {
759+ if (flagCharmBach != 0 ) {
759760 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::D0Matched);
760761 origin = candCharmBach.originMcRec ();
761762 }
762763 // Check if V0 is matched
763764 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.posTrackId ()));
764765 vecDaughtersReso.push_back (tracks.rawIteratorAt (bachelorV0.negTrackId ()));
765766 flagV0 = getMatchingFlagV0 (particlesMc, std::array{vecDaughtersReso[2 ], vecDaughtersReso[3 ]});
766- if (std::abs ( flagV0) > 0 ) {
767+ if (flagV0 != 0 ) {
767768 SETBIT (debugMcRec, std::abs (flagV0));
768769 }
769770 // No physical channel expected in D0 K0s
@@ -797,7 +798,7 @@ struct HfDataCreatorCharmResoReduced {
797798 registry.fill (HIST (" hMCRecOrigin" ), origin);
798799 registry.fill (HIST (" hMCRecMassGen" ), invMassGen);
799800 }
800- if (std::abs ( flagCharmBach) > 0 ) {
801+ if (flagCharmBach != 0 ) {
801802 registry.fill (HIST (" hMCRecCharmDau" ), flagCharmBach);
802803 }
803804 }
@@ -843,22 +844,22 @@ struct HfDataCreatorCharmResoReduced {
843844 vecDaughtersReso.push_back (tracks.rawIteratorAt (candCharmBach.prongPiId ()));
844845 // Check if D* is matched
845846 flagCharmBach = candCharmBach.flagMcMatchRec ();
846- if (std::abs ( flagCharmBach) > 0 ) {
847+ if (flagCharmBach != 0 ) {
847848 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::DstarMatched);
848849 origin = candCharmBach.originMcRec ();
849850 }
850851 // Check if D0 is matched
851852 flagCharmBachInterm = candCharmBach.flagMcMatchRecD0 ();
852- if (std::abs ( flagCharmBachInterm) > 0 ) {
853+ if (flagCharmBachInterm != 0 ) {
853854 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::D0Matched);
854855 }
855856 // Check if Track is matched
856857 flagTrack = getMatchingFlagTrack (bachelorTrack);
857- if (std::abs ( flagTrack) > 0 ) {
858+ if (flagTrack != 0 ) {
858859 SETBIT (debugMcRec, flagTrack);
859860 }
860861 // If both D* and Track are matched, try to match resonance
861- if (std::abs ( flagCharmBach) > 0 && flagTrack == hf_decay::hf_cand_reso::PartialMatchMc::PionMatched) {
862+ if (flagCharmBach != 0 && flagTrack == hf_decay::hf_cand_reso::PartialMatchMc::PionMatched) {
862863 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], vecDaughtersReso[2 ], bachelorTrack};
863864 auto pdgCodesDaughters = std::array{+kPiPlus , -kKPlus , +kPiPlus , -kPiPlus };
864865 for (const auto & [decayChannelFlag, pdgCodeReso] : hf_decay::hf_cand_reso::particlesToDstarPi) {
@@ -887,13 +888,13 @@ struct HfDataCreatorCharmResoReduced {
887888 // Check if D+ is matched
888889 flagCharmBach = candCharmBach.flagMcMatchRec ();
889890 flagCharmBachInterm = candCharmBach.flagMcDecayChanRec ();
890- if (std::abs ( flagCharmBach) > 0 ) {
891+ if (flagCharmBach != 0 ) {
891892 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::DplusMatched);
892893 origin = candCharmBach.originMcRec ();
893894 }
894895 // Check if Track is matched
895896 flagTrack = getMatchingFlagTrack (bachelorTrack);
896- if (std::abs ( flagTrack) > 0 ) {
897+ if (flagTrack != 0 ) {
897898 SETBIT (debugMcRec, flagTrack);
898899 }
899900 // If both D+ and Track are matched, try to match resonance
@@ -926,11 +927,14 @@ struct HfDataCreatorCharmResoReduced {
926927 // Check if D0 is matched
927928 flagCharmBach = candCharmBach.flagMcMatchRec ();
928929 flagCharmBachInterm = candCharmBach.flagMcDecayChanRec ();
929- if (std::abs ( flagCharmBach) > 0 ) {
930+ if (flagCharmBach != 0 ) {
930931 SETBIT (debugMcRec, hf_decay::hf_cand_reso::PartialMatchMc::D0Matched);
931932 origin = candCharmBach.originMcRec ();
932933 }
933934 flagTrack = getMatchingFlagTrack (bachelorTrack);
935+ if (flagTrack != 0 ) {
936+ SETBIT (debugMcRec, flagTrack);
937+ }
934938 if (hf_decay::hf_cand_2prong::daughtersD0Main.contains (static_cast <hf_decay::hf_cand_2prong::DecayChannelMain>(std::abs (flagCharmBach))) && flagTrack == hf_decay::hf_cand_reso::PartialMatchMc::PionMatched) {
935939 auto arrDaughtersReso = std::array{vecDaughtersReso[0 ], vecDaughtersReso[1 ], bachelorTrack};
936940 auto pdgCodesDzeroDaughters = hf_decay::hf_cand_2prong::daughtersD0Main.at (static_cast <hf_decay::hf_cand_2prong::DecayChannelMain>(std::abs (flagCharmBach)));
@@ -971,7 +975,7 @@ struct HfDataCreatorCharmResoReduced {
971975 registry.fill (HIST (" hMCRecOrigin" ), origin);
972976 registry.fill (HIST (" hMCRecMassGen" ), invMassGen);
973977 }
974- if (std::abs ( flagCharmBach) > 0 ) {
978+ if (flagCharmBach != 0 ) {
975979 registry.fill (HIST (" hMCRecCharmDau" ), flagCharmBach);
976980 }
977981 } // fillMcRecoInfoDTrack
0 commit comments