Skip to content

Commit 4aed085

Browse files
authored
[PWGCF] FU: TOF match. eff. update and D0 task update (BDT vs pT plots) (#16615)
1 parent 2f71f4d commit 4aed085

2 files changed

Lines changed: 55 additions & 30 deletions

File tree

PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,11 @@ struct FemtoUniverseEfficiencyBase {
206206
trackHistoPartOneRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartOne, confIsDebug);
207207
registryMCOrigin.add("part1/hRecoPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
208208
registryMCOrigin.add("part1/hTruthPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
209-
registryTOFMatch.add("part1/hTofMatchPtBeforePID", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
210-
registryTOFMatch.add("part1/hTofMatchPtAfterPID", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
209+
registryTOFMatch.add("part1/hTofMatchPtBeforePIDAllPart", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
210+
registryTOFMatch.add("part1/hTofMatchPtBeforePIDPartWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
211+
registryTOFMatch.add("part1/hTofMatchPtAfterPIDAllPart", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
212+
registryTOFMatch.add("part1/hTofMatchPtAfterPIDPartWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
213+
registryTOFMatch.add("part1/hTofMatchPtAfterPIDPrimaryWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
211214
registryTOFMatch.add("part1/hTpcPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
212215
registryPDG.add("part1/PDGvspT", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}});
213216
registryPDG.add("part1/PDGvspTall", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}});
@@ -234,8 +237,11 @@ struct FemtoUniverseEfficiencyBase {
234237
trackHistoPartTwoRec.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartTwo, confIsDebug);
235238
registryMCOrigin.add("part2/hRecoPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
236239
registryMCOrigin.add("part2/hTruthPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
237-
registryTOFMatch.add("part2/hTofMatchPtBeforePID", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
238-
registryTOFMatch.add("part2/hTofMatchPtAfterPID", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
240+
registryTOFMatch.add("part2/hTofMatchPtBeforePIDAllPart", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
241+
registryTOFMatch.add("part2/hTofMatchPtBeforePIDPartWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
242+
registryTOFMatch.add("part2/hTofMatchPtAfterPIDAllPart", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
243+
registryTOFMatch.add("part2/hTofMatchPtAfterPIDPartWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
244+
registryTOFMatch.add("part2/hTofMatchPtAfterPIDPrimaryWithTof", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
239245
registryTOFMatch.add("part2/hTpcPt", " ;#it{p}_{T} (GeV/c); Entries", {HistType::kTH1F, {{confTempFitVarpTBins}}});
240246
registryPDG.add("part2/PDGvspT", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}});
241247
registryPDG.add("part2/PDGvspTall", "PDG;#it{p}_{T} (GeV/c); PDG", {HistType::kTH2F, {{confTempFitVarpTBins}, {16001, -8000.5, 8000.5}}});
@@ -644,7 +650,11 @@ struct FemtoUniverseEfficiencyBase {
644650
continue;
645651
}
646652
registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 3);
647-
registryTOFMatch.fill(HIST("part1/hTofMatchPtBeforePID"), part.pt());
653+
// TOF Matching efficiency before PID
654+
registryTOFMatch.fill(HIST("part1/hTofMatchPtBeforePIDAllPart"), part.pt());
655+
if (part.mLambda() == 1) {
656+
registryTOFMatch.fill(HIST("part1/hTofMatchPtBeforePIDPartWithTof"), part.pt());
657+
}
648658

649659
if (!ConfTracksPid.trkUsePassPIDSelection) {
650660
if (!isParticleNSigma(confPDGCodePartOne, static_cast<bool>(part.mLambda()), 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))) {
@@ -660,9 +670,10 @@ struct FemtoUniverseEfficiencyBase {
660670
}
661671
registryCuts.fill(HIST("part1/cutsVspT"), part.pt(), 4);
662672

663-
// TOF Matching efficiency
673+
// TOF Matching efficiency after PID
674+
registryTOFMatch.fill(HIST("part1/hTofMatchPtAfterPIDAllPart"), part.pt());
664675
if (part.mLambda() == 1) {
665-
registryTOFMatch.fill(HIST("part1/hTofMatchPtAfterPID"), part.pt());
676+
registryTOFMatch.fill(HIST("part1/hTofMatchPtAfterPIDPartWithTof"), part.pt());
666677
} else {
667678
registryTOFMatch.fill(HIST("part1/hTpcPt"), part.pt());
668679
}
@@ -672,6 +683,11 @@ struct FemtoUniverseEfficiencyBase {
672683

673684
registryPDG.fill(HIST("part1/PDGvspTall"), part.pt(), mcParticle.pdgMCTruth());
674685

686+
// Primary particles which have TOF after PID
687+
if (part.mLambda() == 1 && mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary) {
688+
registryTOFMatch.fill(HIST("part1/hTofMatchPtAfterPIDPrimaryWithTof"), part.pt());
689+
}
690+
675691
if (fillSecTrkContHistos) {
676692
if (mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary) {
677693
registrySecTrkCont.fill(HIST("part1/hDCAxy_Primary"), part.pt(), part.tempFitVar());
@@ -723,7 +739,11 @@ struct FemtoUniverseEfficiencyBase {
723739
continue;
724740
}
725741
registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 3);
726-
registryTOFMatch.fill(HIST("part2/hTofMatchPtBeforePID"), part.pt());
742+
// TOF Matching efficiency before PID
743+
registryTOFMatch.fill(HIST("part2/hTofMatchPtBeforePIDAllPart"), part.pt());
744+
if (part.mLambda() == 1) {
745+
registryTOFMatch.fill(HIST("part2/hTofMatchPtBeforePIDPartWithTof"), part.pt());
746+
}
727747

728748
if (!ConfTracksPid.trkUsePassPIDSelection) {
729749
if (!isParticleNSigma(confPDGCodePartTwo, static_cast<bool>(part.mLambda()), 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))) {
@@ -739,9 +759,10 @@ struct FemtoUniverseEfficiencyBase {
739759
}
740760
registryCuts.fill(HIST("part2/cutsVspT"), part.pt(), 4);
741761

742-
// TOF Matching efficiency
762+
// TOF Matching efficiency after PID
763+
registryTOFMatch.fill(HIST("part2/hTofMatchPtAfterPIDAllPart"), part.pt());
743764
if (part.mLambda() == 1) {
744-
registryTOFMatch.fill(HIST("part2/hTofMatchPtAfterPID"), part.pt());
765+
registryTOFMatch.fill(HIST("part2/hTofMatchPtAfterPIDPartWithTof"), part.pt());
745766
} else {
746767
registryTOFMatch.fill(HIST("part2/hTpcPt"), part.pt());
747768
}
@@ -751,6 +772,11 @@ struct FemtoUniverseEfficiencyBase {
751772

752773
registryPDG.fill(HIST("part2/PDGvspTall"), part.pt(), mcParticle.pdgMCTruth());
753774

775+
// Primary particles which have TOF after PID
776+
if (part.mLambda() == 1 && mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary) {
777+
registryTOFMatch.fill(HIST("part2/hTofMatchPtAfterPIDPrimaryWithTof"), part.pt());
778+
}
779+
754780
if (fillSecTrkContHistos) {
755781
if (mcParticle.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary) {
756782
registrySecTrkCont.fill(HIST("part2/hDCAxy_Primary"), part.pt(), part.tempFitVar());

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct FemtoUniversePairTaskTrackD0 {
175175
// Correlated background for D0/D0bar candidates
176176
Configurable<bool> fillCorrBkgs{"fillCorrBkgs", false, "Fill histograms with correlated background candidates"};
177177
// Configurable to enable BDT vs pT histograms for D0/D0bar at MC Reco level
178-
Configurable<bool> fillBDTvsPt{"fillBDTvsPt", false, "Fill BDT vs pT histograms for D0/D0bar candidates"};
178+
Configurable<bool> fillBDTvsPt{"fillBDTvsPt", true, "Fill BDT vs pT histograms for D0/D0bar candidates"};
179179

180180
// Efficiency
181181
Configurable<bool> doEfficiencyCorr{"doEfficiencyCorr", false, "Apply efficiency corrections"};
@@ -534,12 +534,10 @@ struct FemtoUniversePairTaskTrackD0 {
534534
registry.add("DebugBdtMcReco/hBdtScore1VsPt", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
535535
registry.add("DebugBdtMcReco/hBdtScore2VsPt", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
536536
registry.add("DebugBdtMcReco/hBdtScore3VsPt", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
537-
registry.add("DebugBdtMcReco/hBdtScore1VsPtD0", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
538-
registry.add("DebugBdtMcReco/hBdtScore2VsPtD0", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
539-
registry.add("DebugBdtMcReco/hBdtScore3VsPtD0", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
540-
registry.add("DebugBdtMcReco/hBdtScore1VsPtD0bar", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
541-
registry.add("DebugBdtMcReco/hBdtScore2VsPtD0bar", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
542-
registry.add("DebugBdtMcReco/hBdtScore3VsPtD0bar", ";BDT score;#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisBdtScore, {vbins}}});
537+
registry.add("DebugBdtMcReco/hBdtScore3VsPtVsMassPromptD0", ";BDT score;#it{p}_{T} (GeV/#it{c});M(K#pi) (GeV/#it{c}^{2})", {HistType::kTH3F, {axisBdtScore, {vbins}, confInvMassBins}});
538+
registry.add("DebugBdtMcReco/hBdtScore3VsPtVsMassNonPromptD0", ";BDT score;#it{p}_{T} (GeV/#it{c});M(K#pi) (GeV/#it{c}^{2})", {HistType::kTH3F, {axisBdtScore, {vbins}, confInvMassBins}});
539+
registry.add("DebugBdtMcReco/hBdtScore3VsPtVsMassPromptD0bar", ";BDT score;#it{p}_{T} (GeV/#it{c});M(K#pi) (GeV/#it{c}^{2})", {HistType::kTH3F, {axisBdtScore, {vbins}, confInvMassBins}});
540+
registry.add("DebugBdtMcReco/hBdtScore3VsPtVsMassNonPromptD0bar", ";BDT score;#it{p}_{T} (GeV/#it{c});M(K#pi) (GeV/#it{c}^{2})", {HistType::kTH3F, {axisBdtScore, {vbins}, confInvMassBins}});
543541
}
544542
if (applyMLOpt) {
545543
registry.add("D0D0bar_MLSel/hMassVsPt1", "2-prong candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {confInvMassBins, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
@@ -1480,41 +1478,42 @@ struct FemtoUniversePairTaskTrackD0 {
14801478
mcRecoRegistry.fill(HIST("hMcRecD0"), part.pt(), part.eta());
14811479
mcRecoRegistry.fill(HIST("hMcRecD0Pt"), part.pt());
14821480
mcRecoRegistry.fill(HIST("hMcRecD0Phi"), part.phi());
1483-
if (fillBDTvsPt) {
1484-
registry.fill(HIST("DebugBdtMcReco/hBdtScore1VsPtD0"), part.decayVtxX(), part.pt());
1485-
registry.fill(HIST("DebugBdtMcReco/hBdtScore2VsPtD0"), part.decayVtxY(), part.pt());
1486-
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtD0"), part.decayVtxZ(), part.pt());
1487-
}
1481+
14881482
if (part.tpcNClsFound() == 0) { // prompt candidates
14891483
mcRecoRegistry.fill(HIST("hMcRecD0Prompt"), part.pt(), part.eta());
14901484
mcRecoRegistry.fill(HIST("hMcRecD0PromptPt"), part.pt());
14911485
mcRecoRegistry.fill(HIST("hMcRecD0PromptPhi"), part.phi());
1486+
if (fillBDTvsPt) {
1487+
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtVsMassPromptD0"), part.decayVtxZ(), part.pt(), part.mLambda());
1488+
}
14921489
} else if (part.tpcNClsFound() == 1) { // non-prompt candidates
14931490
mcRecoRegistry.fill(HIST("hMcRecD0NonPrompt"), part.pt(), part.eta());
14941491
mcRecoRegistry.fill(HIST("hMcRecD0NonPromptPt"), part.pt());
14951492
mcRecoRegistry.fill(HIST("hMcRecD0NonPromptPhi"), part.phi());
1493+
if (fillBDTvsPt) {
1494+
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtVsMassNonPromptD0"), part.decayVtxZ(), part.pt(), part.mAntiLambda());
1495+
}
14961496
}
14971497
} else if (mcpart.pdgMCTruth() == ConfDmesons.confPDGCodeD0bar) {
14981498
mcRecoRegistry.fill(HIST("hMcRecD0bar"), part.pt(), part.eta());
14991499
mcRecoRegistry.fill(HIST("hMcRecD0barPt"), part.pt());
15001500
mcRecoRegistry.fill(HIST("hMcRecD0barPhi"), part.phi());
1501-
if (fillBDTvsPt) {
1502-
registry.fill(HIST("DebugBdtMcReco/hBdtScore1VsPtD0bar"), part.decayVtxX(), part.pt());
1503-
registry.fill(HIST("DebugBdtMcReco/hBdtScore2VsPtD0bar"), part.decayVtxY(), part.pt());
1504-
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtD0bar"), part.decayVtxZ(), part.pt());
1505-
}
1501+
15061502
if (part.tpcNClsFound() == 0) { // prompt candidates
15071503
mcRecoRegistry.fill(HIST("hMcRecD0barPrompt"), part.pt(), part.eta());
15081504
mcRecoRegistry.fill(HIST("hMcRecD0barPromptPt"), part.pt());
1505+
if (fillBDTvsPt) {
1506+
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtVsMassPromptD0bar"), part.decayVtxZ(), part.pt(), part.mLambda());
1507+
}
15091508
} else if (part.tpcNClsFound() == 1) { // non-prompt candidates
15101509
mcRecoRegistry.fill(HIST("hMcRecD0barNonPrompt"), part.pt(), part.eta());
15111510
mcRecoRegistry.fill(HIST("hMcRecD0barNonPromptPt"), part.pt());
1511+
if (fillBDTvsPt) {
1512+
registry.fill(HIST("DebugBdtMcReco/hBdtScore3VsPtVsMassNonPromptD0bar"), part.decayVtxZ(), part.pt(), part.mAntiLambda());
1513+
}
15121514
}
15131515
}
15141516
}
1515-
// if (isParticleNSigma(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))) {
1516-
// hTrackDCA.fillQA<true, true>(part);
1517-
//} This part required change
15181517
}
15191518
}
15201519
PROCESS_SWITCH(FemtoUniversePairTaskTrackD0, processMcReco, "Process MC reco data", false);

0 commit comments

Comments
 (0)