@@ -561,11 +561,6 @@ struct HfFilter { // Main struct for HF triggers
561561 auto invMassDsToKKPi = RecoDecay::m (std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massK, massK, massPi});
562562 auto invMassDsToPiKK = RecoDecay::m (std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massK});
563563
564- if (activateQA) {
565- hMassVsPtC[kDs ]->Fill (ptD, invMassDsToKKPi);
566- hMassVsPtC[kDs ]->Fill (ptD, invMassDsToPiKK);
567- }
568-
569564 int retValue = 0 ;
570565 if (std::abs (invMassDsToKKPi - massDs) < 0.04 ) {
571566 retValue |= BIT (0 );
@@ -575,9 +570,15 @@ struct HfFilter { // Main struct for HF triggers
575570 }
576571 if (std::abs (invMassKKFirst - massPhi) < 0.02 ) {
577572 retValue |= BIT (2 );
573+ if (activateQA) {
574+ hMassVsPtC[kDs ]->Fill (ptD, invMassDsToKKPi);
575+ }
578576 }
579577 if (std::abs (invMassKKSecond - massPhi) < 0.02 ) {
580578 retValue |= BIT (3 );
579+ if (activateQA) {
580+ hMassVsPtC[kDs ]->Fill (ptD, invMassDsToPiKK);
581+ }
581582 }
582583
583584 return retValue;
@@ -841,9 +842,9 @@ struct HfFilter { // Main struct for HF triggers
841842 auto scores = outputTensor[1 ].GetTensorMutableData <float >();
842843
843844 if (applyML && activateQA) {
844- hBDTScoreBkg[iCharmPart]->Fill (scores[0 ]);
845- hBDTScorePrompt[iCharmPart]->Fill (scores[1 ]);
846- hBDTScoreNonPrompt[iCharmPart]->Fill (scores[2 ]);
845+ hBDTScoreBkg[iCharmPart + 1 ]->Fill (scores[0 ]);
846+ hBDTScorePrompt[iCharmPart + 1 ]->Fill (scores[1 ]);
847+ hBDTScoreNonPrompt[iCharmPart + 1 ]->Fill (scores[2 ]);
847848 }
848849
849850 int tagBDT = isBDTSelected (scores, iCharmPart + 1 );
@@ -872,25 +873,25 @@ struct HfFilter { // Main struct for HF triggers
872873 auto pVec3Prong = RecoDecay::pVec (pVecFirst, pVecSecond, pVecThird);
873874 auto pt3Prong = RecoDecay::pt (pVec3Prong);
874875
875- std::array<int , kNCharmParticles - 1 > is3ProngInMass{};
876- if (is3Prong[0 ]) {
876+ std::array<int , kNCharmParticles - 1 > is3ProngInMass{0 };
877+ if (is3Prong[0 ] && (isCharmTagged[ 0 ] || isBeautyTagged[ 0 ]) ) {
877878 is3ProngInMass[0 ] = isSelectedDplusInMassRange (pVecFirst, pVecThird, pVecSecond, pt3Prong);
878879 }
879- if (is3Prong[1 ]) {
880+ if (is3Prong[1 ] && (isCharmTagged[ 1 ] || isBeautyTagged[ 1 ]) ) {
880881 is3ProngInMass[1 ] = isSelectedDsInMassRange (pVecFirst, pVecThird, pVecSecond, pt3Prong);
881882 }
882- if (is3Prong[2 ]) {
883+ if (is3Prong[2 ] && (isCharmTagged[ 2 ] || isBeautyTagged[ 2 ]) ) {
883884 is3ProngInMass[2 ] = isSelectedLcInMassRange (pVecFirst, pVecThird, pVecSecond, pt3Prong);
884885 }
885- if (is3Prong[3 ]) {
886+ if (is3Prong[3 ] && (isCharmTagged[ 3 ] || isBeautyTagged[ 3 ]) ) {
886887 is3ProngInMass[3 ] = isSelectedXicInMassRange (pVecFirst, pVecThird, pVecSecond, pt3Prong);
887888 }
888889
889890 if (pt3Prong >= pTThreshold3Prong) {
890891 keepEvent[kHighPt ] = true ;
891892 if (activateQA) {
892893 for (auto iCharmPart{1 }; iCharmPart < kNCharmParticles ; ++iCharmPart) {
893- if (is3Prong[iCharmPart - 1 ]) {
894+ if (is3Prong[iCharmPart - 1 ] && (isCharmTagged[iCharmPart - 1 ] || isBeautyTagged[iCharmPart - 1 ]) ) {
894895 hCharmHighPt[iCharmPart]->Fill (pt3Prong);
895896 }
896897 }
0 commit comments