diff --git a/PWGLF/Tasks/Resonances/chk892pp.cxx b/PWGLF/Tasks/Resonances/chk892pp.cxx index 14fee0d3359..60133267f8f 100644 --- a/PWGLF/Tasks/Resonances/chk892pp.cxx +++ b/PWGLF/Tasks/Resonances/chk892pp.cxx @@ -191,7 +191,7 @@ struct Chk892pp { /// PID Selections, pion struct : ConfigurableGroup { - Configurable cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool + Configurable cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool Configurable cfgMaxTPCnSigmaPion{"cfgMaxTPCnSigmaPion", 5.0, "TPC nSigma cut for Pion"}; // TPC Configurable cfgMaxTOFnSigmaPion{"cfgMaxTOFnSigmaPion", 5.0, "TOF nSigma cut for Pion"}; // TOF Configurable cfgNsigmaCutCombinedPion{"cfgNsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined @@ -546,8 +546,8 @@ struct Chk892pp { if (std::abs(track.dcaXY()) > TrackCuts.cfgMaxbDCArToPVcut) return false; } - if (TrackCuts.cfgpTdepDCAzCut) { - // Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution + if (TrackCuts.cfgpTdepDCAzCut) { + // Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution if (std::abs(track.dcaZ()) > (0.004 + (0.013 / track.pt()))) return false; } else { @@ -914,7 +914,6 @@ struct Chk892pp { return true; } // matchRecoToTruthKstar - void effKstarProcessGen(MCTrueTrackCandidates const& mcparts) { for (const auto& part : mcparts) { @@ -925,44 +924,37 @@ struct Chk892pp { if (std::abs(part.y()) > KstarCuts.cfgKstarMaxRap) continue; + const int pionWanted = (part.pdgCode() > 0) ? +kPiPlus : -kPiPlus; + bool hasRightPion = false; + bool hasK0sToPipi = false; + + for (const auto& d1 : part.template daughters_as()) { + const int pdg1 = d1.pdgCode(); + if (pdg1 == pionWanted) { + hasRightPion = true; + } else if (std::abs(pdg1) == kPDGK0) { + for (const auto& d2 : d1.template daughters_as()) { + if (std::abs(d2.pdgCode()) == kPDGK0s) { + bool seenPip = false, seenPim = false; + for (const auto& d3 : d2.template daughters_as()) { + if (d3.pdgCode() == +kPiPlus) + seenPip = true; + else if (d3.pdgCode() == -kPiPlus) + seenPim = true; + } + if (seenPip && seenPim) { + hasK0sToPipi = true; + break; + } + } + } + } + if (hasRightPion && hasK0sToPipi) + break; + } - const int pionWanted = (part.pdgCode() > 0) ? +kPiPlus : -kPiPlus; - bool hasRightPion = false; - bool hasK0sToPipi = false; - - for (const auto& d1 : part.template daughters_as()) { - const int pdg1 = d1.pdgCode(); - if (pdg1 == pionWanted) - { - hasRightPion = true; - } else if (std::abs(pdg1) == kPDGK0) - { - for (const auto& d2 : d1.template daughters_as()) - { - if (std::abs(d2.pdgCode()) == kPDGK0s) - { - bool seenPip = false, seenPim = false; - for (const auto& d3 : d2.template daughters_as()) - { - if (d3.pdgCode() == +kPiPlus) - seenPip = true; - else if (d3.pdgCode() == -kPiPlus) - seenPim = true; - } - if (seenPip && seenPim) - { - hasK0sToPipi = true; - break; - } - } - } - } - if (hasRightPion && hasK0sToPipi) break; - } - - if (!(hasRightPion && hasK0sToPipi)) - continue; - + if (!(hasRightPion && hasK0sToPipi)) + continue; const auto mcid = part.mcCollisionId(); if (allowedMcIds.count(mcid) == 0) @@ -973,15 +965,14 @@ struct Chk892pp { continue; const float lCentrality = iter->second; - + histos.fill(HIST("EffKstar/genKstar"), part.pt(), lCentrality); - if (part.vt() == 0) - { - histos.fill(HIST("EffKstar/genKstar_pri"), part.pt(), lCentrality); - } + if (part.vt() == 0) { + histos.fill(HIST("EffKstar/genKstar_pri"), part.pt(), lCentrality); + } } - } //effKstarProcessGen + } // effKstarProcessGen template void effKstarProcessReco(V0RangeT const& v0s, TrkRangeT const& tracks) @@ -1068,11 +1059,9 @@ struct Chk892pp { const float lCentrality = iter->second; histos.fill(HIST("Correction/sigLoss_num"), part.pt(), lCentrality); - if (part.vt() == 0) - { - histos.fill(HIST("Correction/sigLoss_num_pri"), part.pt(), lCentrality); - } - + if (part.vt() == 0) { + histos.fill(HIST("Correction/sigLoss_num_pri"), part.pt(), lCentrality); + } } } // fillSigLossNum @@ -1097,11 +1086,9 @@ struct Chk892pp { const float lCentrality = iter->second; histos.fill(HIST("Correction/sigLoss_den"), part.pt(), lCentrality); - if (part.vt() == 0) - { - histos.fill(HIST("Correction/sigLoss_den_pri"), part.pt(), lCentrality); - } - + if (part.vt() == 0) { + histos.fill(HIST("Correction/sigLoss_den_pri"), part.pt(), lCentrality); + } } } // fillSigLossDen