@@ -809,6 +809,8 @@ struct k892hadronphoton {
809809 int trkCode = 10 ; // 1: TPC-only, 2: TPC+Something, 3: ITS-Only, 4: ITS+TPC + Something, 10: anything else
810810 auto photonPosTrackCode = kstar.photonPosTrackCode ();
811811 auto photonNegTrackCode = kstar.photonNegTrackCode ();
812+ auto kshortPosTrackCode = kstar.kshortPosTrackCode ();
813+ auto kshortNegTrackCode = kstar.kshortNegTrackCode ();
812814
813815 if (isGamma) {
814816 if (photonPosTrackCode == DauTPCOnly && photonNegTrackCode == DauTPCOnly)
@@ -820,13 +822,13 @@ struct k892hadronphoton {
820822 if (photonPosTrackCode == DauITSTrackerOnly || photonNegTrackCode == DauITSTrackerOnly)
821823 trkCode = 4 ;
822824 } else {
823- if (photonPosTrackCode == DauTPCOnly && photonNegTrackCode == DauTPCOnly)
825+ if (kshortPosTrackCode == DauTPCOnly && kshortNegTrackCode == DauTPCOnly)
824826 trkCode = 1 ;
825- if ((photonPosTrackCode != DauTPCOnly && photonNegTrackCode == DauTPCOnly) || (photonPosTrackCode == DauTPCOnly && photonNegTrackCode != DauTPCOnly))
827+ if ((kshortPosTrackCode != DauTPCOnly && kshortNegTrackCode == DauTPCOnly) || (kshortPosTrackCode == DauTPCOnly && kshortNegTrackCode != DauTPCOnly))
826828 trkCode = 2 ;
827- if (photonPosTrackCode == DauITSTPC && photonNegTrackCode == DauITSTPC)
829+ if (kshortPosTrackCode == DauITSTPC && kshortNegTrackCode == DauITSTPC)
828830 trkCode = 3 ;
829- if (photonPosTrackCode == DauITSTrackerOnly || photonNegTrackCode == DauITSTrackerOnly)
831+ if (kshortPosTrackCode == DauITSTrackerOnly || kshortNegTrackCode == DauITSTrackerOnly)
830832 trkCode = 4 ;
831833 }
832834
@@ -899,7 +901,7 @@ struct k892hadronphoton {
899901 if (std::abs (kshortPDGCodeGrandMother) == o2::constants::physics::Pdg::kK0Star892 && std::abs (photonPDGCodeGrandMother) == o2::constants::physics::Pdg::kK0Star892 && (photonGlobalIndexGrandMother == kshortGlobalIndexGrandMother)) // K*(892)0
900902 histos.fill (HIST (MainDir[mode]) + HIST (" /MC/BkgStudy/h2dPtVsMassKStar_KStarPionKaon" ), kstarpT, kstarMass);
901903
902- if (photonGlobalIndexGrandMother == kshortGlobalIndexGrandMother) {
904+ if (( photonGlobalIndexGrandMother == kshortGlobalIndexGrandMother) && (photonPDGCodeGrandMother != o2::constants::physics::Pdg:: kK0Star892 ) && (photonPDGCodeGrandMother != PDG_t:: kProton ) ) {
903905 histos.fill (HIST (MainDir[mode]) + HIST (" /MC/BkgStudy/h2dPtVsMassKStar_PionKaon" ), kstarpT, kstarMass);
904906 histos.fill (HIST (MainDir[mode]) + HIST (" /MC/BkgStudy/h2dPionKaonMother" ), kshortPDGCodeGrandMother, photonPDGCodeGrandMother);
905907 }
0 commit comments