Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 52 additions & 53 deletions PWGUD/Tasks/sginclusivePhiKstarSD.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand All @@ -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) {
Expand Down Expand Up @@ -1421,71 +1421,70 @@ struct SginclusivePhiKstarSD {
registry.get<TH1>(HIST("Reco/Stat"))->Fill(4.0, 1.);
registry.get<TH1>(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<aod::UDMcParticles>();
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<aod::UDMcParticles>();
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<TH3>(HIST("MC/accMPtRap_kstar_G1"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.);
if (truegapSide == gapsideMC) {
registry.get<TH3>(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<TH3>(HIST("MC/accMPtRap_kstar_G1"))->Fill(vkstar.M(), vkstar.Pt(), vkstar.Rapidity(), 1.);
if (truegapSide == gapsideMC) {
registry.get<TH3>(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<aod::UDMcParticles>();
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<aod::UDMcParticles>();
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<TH3>(HIST("MC/accMPtRap_phi_G1"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.);
if (truegapSide == gapsideMC) {
registry.get<TH3>(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<TH3>(HIST("MC/accMPtRap_phi_G1"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.);
if (truegapSide == gapsideMC) {
registry.get<TH3>(HIST("MC/accMPtRap_phi_G11"))->Fill(vphi.M(), vphi.Pt(), vphi.Rapidity(), 1.);
}
}
}
}
}

if (truegapSide != gapsideMC)
return;
registry.fill(HIST("Reco/hEventCutFlowMC"), 4);
Expand Down Expand Up @@ -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;
Expand Down
Loading