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
47 changes: 35 additions & 12 deletions PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ struct FemtoUniverseEfficiencyBase {
Configurable<float> confNsigmaTPCProton{"confNsigmaTPCProton", 3.0, "TPC Proton Sigma for momentum < confMomProton"};
Configurable<float> confNsigmaCombinedPion{"confNsigmaCombinedPion", 3.0, "TPC and TOF Pion Sigma (combined) for momentum > confMomPion"};
Configurable<float> confNsigmaTPCPion{"confNsigmaTPCPion", 3.0, "TPC Pion Sigma for momentum < confMomPion"};
Configurable<bool> confPDGCheckMCReco{"confPDGCheckMCReco", true, "Check PDG code of MC reco paricles"};

} ConfBothTracks;

/// Lambda cuts
Expand Down Expand Up @@ -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}}});
Expand All @@ -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}}});
Expand Down Expand Up @@ -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());
Expand All @@ -418,29 +430,40 @@ 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());
}

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());
Expand All @@ -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());
Expand Down
Loading