diff --git a/PWGUD/Tasks/sginclusivePhiKstarSD.cxx b/PWGUD/Tasks/sginclusivePhiKstarSD.cxx index 4aeb475109b..ea7c42308a2 100644 --- a/PWGUD/Tasks/sginclusivePhiKstarSD.cxx +++ b/PWGUD/Tasks/sginclusivePhiKstarSD.cxx @@ -368,6 +368,7 @@ struct SginclusivePhiKstarSD { "All Events", "has_udMcCollision", Form("generatorsID = %d", generatedId.value), + Form("upcFlag = %d%s", upcflag.value, check(upcflag.value != -1)), Form("GapsideMC = %d", gapsideMC.value), Form("|Vz| < %.1f", vzCut.value), Form("Occupancy < %.0f%s", confgOccCut.value, check(useOccCut.value)), @@ -381,7 +382,6 @@ struct SginclusivePhiKstarSD { std::string("kIsGoodZvtxFT0vsPV") + check(useZvtxftovpv.value), std::string("kIsVertexITSTPC") + check(useVtxItsTpc.value), Form("RCTFlag = %d%s", cutRCTflag.value, check(cutRCTflag.value > 0)), - Form("upcFlag = %d%s", upcflag.value, check(upcflag.value != -1)), Form("%d < numContrib < %d%s", mintrack.value, maxtrack.value, check(usenumContrib.value))}; for (size_t i = 0; i < eveCutLabelsMC.size(); ++i) { @@ -1421,71 +1421,70 @@ struct SginclusivePhiKstarSD { registry.get(HIST("Reco/Stat"))->Fill(4.0, 1.); registry.get(HIST("Reco/Stat"))->Fill(truegapSide, 1.); - if (upcflag != -1 && collision.flags() == upcflag) { - auto partSlice = McParts.sliceBy(partPerMcCollision, mccoll.globalIndex()); - for (const auto& trk1 : partSlice) { - if (std::abs(trk1.pdgCode()) == o2::constants::physics::Pdg::kK0Star892) { - vkstar.SetCoordinates(trk1.px(), trk1.py(), trk1.pz(), o2::constants::physics::MassK0Star892); - auto kDaughters = trk1.daughters_as(); - const size_t kExpectedNumberOfDaughters = 2; - if (kDaughters.size() != kExpectedNumberOfDaughters) { + auto partSlice = McParts.sliceBy(partPerMcCollision, mccoll.globalIndex()); + for (const auto& trk1 : partSlice) { + if (std::abs(trk1.pdgCode()) == o2::constants::physics::Pdg::kK0Star892) { + vkstar.SetCoordinates(trk1.px(), trk1.py(), trk1.pz(), o2::constants::physics::MassK0Star892); + auto kDaughters = trk1.daughters_as(); + const size_t kExpectedNumberOfDaughters = 2; + if (kDaughters.size() != kExpectedNumberOfDaughters) { + continue; + } + auto daughtp = false; + auto daughtm = false; + for (const auto& kCurrentDaughter : kDaughters) { + if (!kCurrentDaughter.isPhysicalPrimary()) { continue; } - auto daughtp = false; - auto daughtm = false; - for (const auto& kCurrentDaughter : kDaughters) { - if (!kCurrentDaughter.isPhysicalPrimary()) { - continue; - } - if (std::abs(kCurrentDaughter.pdgCode()) == PDG_t::kKPlus) { - daughtp = true; - } else if (std::abs(kCurrentDaughter.pdgCode()) == PDG_t::kPiPlus) { - daughtm = true; - } + if (std::abs(kCurrentDaughter.pdgCode()) == PDG_t::kKPlus) { + daughtp = true; + } else if (std::abs(kCurrentDaughter.pdgCode()) == PDG_t::kPiPlus) { + daughtm = true; } - if (daughtp && daughtm) { - if (std::abs(vkstar.Rapidity()) < 0.5) { - registry.get(HIST("MC/accMPtRap_kstar_G1"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.); - if (truegapSide == gapsideMC) { - registry.get(HIST("MC/accMPtRap_kstar_G11"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.); - } + } + if (daughtp && daughtm) { + if (std::abs(vkstar.Rapidity()) < 0.5) { + registry.get(HIST("MC/accMPtRap_kstar_G1"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.); + if (truegapSide == gapsideMC) { + registry.get(HIST("MC/accMPtRap_kstar_G11"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.); } } } - // phi - if (std::abs(trk1.pdgCode()) == o2::constants::physics::Pdg::kPhi) { - if (trk1.has_mothers()) { - continue; - } - vphi.SetCoordinates(trk1.px(), trk1.py(), trk1.pz(), o2::constants::physics::MassPhi); - auto kDaughters = trk1.daughters_as(); - const size_t kExpectedNumberOfDaughters1 = 2; - if (kDaughters.size() != kExpectedNumberOfDaughters1) { + } + // phi + if (std::abs(trk1.pdgCode()) == o2::constants::physics::Pdg::kPhi) { + if (trk1.has_mothers()) { + continue; + } + vphi.SetCoordinates(trk1.px(), trk1.py(), trk1.pz(), o2::constants::physics::MassPhi); + auto kDaughters = trk1.daughters_as(); + const size_t kExpectedNumberOfDaughters1 = 2; + if (kDaughters.size() != kExpectedNumberOfDaughters1) { + continue; + } + auto daughtp1 = false; + auto daughtm1 = false; + for (const auto& kCurrentDaughter : kDaughters) { + if (!kCurrentDaughter.isPhysicalPrimary()) { continue; } - auto daughtp1 = false; - auto daughtm1 = false; - for (const auto& kCurrentDaughter : kDaughters) { - if (!kCurrentDaughter.isPhysicalPrimary()) { - continue; - } - if (kCurrentDaughter.pdgCode() == PDG_t::kKPlus) { - daughtp1 = true; - } else if (kCurrentDaughter.pdgCode() == PDG_t::kKMinus) { - daughtm1 = true; - } + if (kCurrentDaughter.pdgCode() == PDG_t::kKPlus) { + daughtp1 = true; + } else if (kCurrentDaughter.pdgCode() == PDG_t::kKMinus) { + daughtm1 = true; } - if (daughtp1 && daughtm1) { - if (std::abs(vphi.Rapidity()) < 0.5) { - registry.get(HIST("MC/accMPtRap_phi_G1"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.); - if (truegapSide == gapsideMC) { - registry.get(HIST("MC/accMPtRap_phi_G11"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.); - } + } + if (daughtp1 && daughtm1) { + if (std::abs(vphi.Rapidity()) < 0.5) { + registry.get(HIST("MC/accMPtRap_phi_G1"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.); + if (truegapSide == gapsideMC) { + registry.get(HIST("MC/accMPtRap_phi_G11"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.); } } } } } + if (truegapSide != gapsideMC) return; registry.fill(HIST("Reco/hEventCutFlowMC"), 4); @@ -1516,7 +1515,7 @@ struct SginclusivePhiKstarSD { if (useTfb && collision.tfb() != 1) return; - registry.fill(HIST("Reco/hEventCutFlowMC"), 1); + registry.fill(HIST("Reco/hEventCutFlowMC"), 11); if (useItsrofb && collision.itsROFb() != 1) return;