From 220e07e47184c835d900699554895d2e64680801 Mon Sep 17 00:00:00 2001 From: Alicja Plachta Date: Tue, 13 Jan 2026 14:29:00 +0100 Subject: [PATCH] Update cutsVspT histograms --- .../Tasks/femtoUniverseEfficiencyBase.cxx | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx index f2b17d05e88..78161244f66 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx @@ -62,6 +62,8 @@ struct FemtoUniverseEfficiencyBase { Configurable confNsigmaTPCProton{"confNsigmaTPCProton", 3.0, "TPC Proton Sigma for momentum < confMomProton"}; Configurable confNsigmaCombinedPion{"confNsigmaCombinedPion", 3.0, "TPC and TOF Pion Sigma (combined) for momentum > confMomPion"}; Configurable confNsigmaTPCPion{"confNsigmaTPCPion", 3.0, "TPC Pion Sigma for momentum < confMomPion"}; + Configurable confPDGCheckMCReco{"confPDGCheckMCReco", true, "Check PDG code of MC reco paricles"}; + } ConfBothTracks; /// Lambda cuts @@ -165,7 +167,7 @@ struct FemtoUniverseEfficiencyBase { { eventHisto.init(&qaRegistry); - registryCuts.add("part1/cutsVspT", ";#it{p}_{T} (GeV/c) ;Cut no.", {HistType::kTH2F, {{500, 0, 5}, {5, 0, 6}}}); + registryCuts.add("part1/cutsVspT", ";#it{p}_{T} (GeV/c) ;Cut no.", {HistType::kTH2F, {{500, 0, 5}, {7, 0, 7}}}); trackHistoPartOneGen.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarPDGBins, confIsMCGen, confPDGCodePartOne, false); trackHistoPartOneRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartOne, confIsDebug); registryMCOrigin.add("part1/hPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{240, 0, 6}}}); @@ -182,7 +184,7 @@ struct FemtoUniverseEfficiencyBase { registryPDG.add("part2/PDGvspT", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{500, 0, 5}, {16001, -8000.5, 8000.5}}}); registryPDG.add("part2/PDGvspTall", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{500, 0, 5}, {16001, -8000.5, 8000.5}}}); if (!confIsSame) { - registryCuts.add("part2/cutsVspT", ";#it{p}_{T} (GeV/c) ;Cut no.", {HistType::kTH2F, {{500, 0, 5}, {5, 0, 6}}}); + registryCuts.add("part2/cutsVspT", ";#it{p}_{T} (GeV/c) ;Cut no.", {HistType::kTH2F, {{500, 0, 5}, {7, 0, 7}}}); trackHistoPartTwoGen.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarPDGBins, confIsMCGen, confPDGCodePartTwo, false); trackHistoPartTwoRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartTwo, confIsDebug); registryMCOrigin.add("part2/hPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{240, 0, 6}}}); @@ -398,18 +400,28 @@ struct FemtoUniverseEfficiencyBase { for (const auto& part : grouppartsOneMCRec) { // only partition + registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 0); + + if (part.partType() != confParticleTypePartOne) { + continue; + } registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 1); - if (part.partType() != confParticleTypePartOne || part.sign() != confChargePart1 || !isParticleNSigma(confPDGCodePartOne, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron))) { + if (part.sign() != confChargePart1) { continue; } registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 2); - if (!part.has_fdMCParticle()) { + if (!isParticleNSigma(confPDGCodePartOne, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron))) { continue; } registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 3); + if (!part.has_fdMCParticle()) { + continue; + } + registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 4); + const auto mcParticle = part.fdMCParticle(); registryPDG.fill(HIST("part1/PDGvspTall"), part.pt(), mcParticle.pdgMCTruth()); @@ -418,12 +430,12 @@ struct FemtoUniverseEfficiencyBase { if (!(mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) { continue; } - registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 4); + registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 5); - if (!(std::abs(mcParticle.pdgMCTruth()) == std::abs(confPDGCodePartOne))) { + if (ConfBothTracks.confPDGCheckMCReco && !(std::abs(mcParticle.pdgMCTruth()) == std::abs(confPDGCodePartOne))) { continue; } - registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 5); + registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 6); registryPDG.fill(HIST("part1/PDGvspT"), part.pt(), mcParticle.pdgMCTruth()); registryMCOrigin.fill(HIST("part1/hPt"), mcParticle.pt()); @@ -431,16 +443,27 @@ struct FemtoUniverseEfficiencyBase { if (!confIsSame) { for (const auto& part : grouppartsTwoMCRec) { + registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 0); + + if (part.partType() != confParticleTypePartOne) { + continue; + } registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 1); - if (part.partType() != confParticleTypePartTwo || part.sign() != confChargePart2 || !isParticleNSigma(confPDGCodePartTwo, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron))) { + + if (part.sign() != confChargePart1) { continue; } registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 2); - if (!part.has_fdMCParticle()) { + if (!isParticleNSigma(confPDGCodePartOne, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC(part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF(part, o2::track::PID::Deuteron))) { continue; } registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 3); + + if (!part.has_fdMCParticle()) { + continue; + } + registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 4); const auto mcParticle = part.fdMCParticle(); registryPDG.fill(HIST("part2/PDGvspTall"), part.pt(), mcParticle.pdgMCTruth()); @@ -449,12 +472,12 @@ struct FemtoUniverseEfficiencyBase { if (!(mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) { continue; } - registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 4); + registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 5); - if (!(std::abs(mcParticle.pdgMCTruth()) == std::abs(confPDGCodePartTwo))) { + if (ConfBothTracks.confPDGCheckMCReco && !(std::abs(mcParticle.pdgMCTruth()) == std::abs(confPDGCodePartTwo))) { continue; } - registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 5); + registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 6); registryPDG.fill(HIST("part2/PDGvspT"), part.pt(), mcParticle.pdgMCTruth()); registryMCOrigin.fill(HIST("part2/hPt"), mcParticle.pt());