Skip to content

Commit 6bcff8b

Browse files
authored
[PWGHF] enabling MC checks on Lc-h correl (#15767)
1 parent 0f2c43e commit 6bcff8b

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

PWGHF/HFC/DataModel/CorrelationTables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ DECLARE_SOA_TABLE(LcRecoInfo, "AOD", "LCRECOINFO", //! Lc candidates Reconstruct
218218
aod::hf_correlation_lc_hadron::MLc,
219219
aod::hf_correlation_lc_hadron::PtLc,
220220
aod::hf_correlation_lc_hadron::MlScoreBkg,
221-
aod::hf_correlation_lc_hadron::MlScorePrompt);
221+
aod::hf_correlation_lc_hadron::MlScorePrompt,
222+
aod::hf_correlation_lc_hadron::PoolBin);
222223

223224
DECLARE_SOA_TABLE(LcGenInfo, "AOD", "LCGENOINFO", //! Lc candidates Generated Information
224225
aod::hf_correlation_lc_hadron::IsPrompt);

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ struct HfCorrelatorLcHadrons {
356356
registry.add("hcountLctriggersMcGen", "Lc trigger particles - MC gen;;N of trigger Lc", {HistType::kTH2F, {{1, -0.5, 0.5}, {axisPtLc}}});
357357
registry.add("hPtCandMcGen", "Lc,Hadron particles - MC gen;particle #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1D, {axisPtLc}});
358358
registry.add("hYMcGen", "Lc,Hadron candidates - MC gen;candidate #it{#y};entries", {HistType::kTH1D, {axisRapidity}});
359-
registry.add("hPtCandMcGenPrompt", "Lc,Hadron particles - MC Gen Prompt", {HistType::kTH1D, {axisPtLc}});
360-
registry.add("hPtCandMcGenNonPrompt", "Lc,Hadron particles - MC Gen Non Prompt", {HistType::kTH1D, {axisPtLc}});
359+
registry.add("hPtCandMcGenPrompt", "Lc,Hadron particles - MC Gen Prompt", {HistType::kTH2D, {{axisPtLc}, {axisPoolBin}}});
360+
registry.add("hPtCandMcGenNonPrompt", "Lc,Hadron particles - MC Gen Non Prompt", {HistType::kTH2D, {{axisPtLc}, {axisPoolBin}}});
361361
registry.add("hPtParticleAssocMcGen", "Associated Particle - MC Gen", {HistType::kTH1D, {axisPtHadron}});
362362
registry.add("hEtaMcGen", "Lc,Hadron particles - MC Gen", {HistType::kTH1D, {axisEta}});
363363
registry.add("hPhiMcGen", "Lc,Hadron particles - MC Gen", {HistType::kTH1D, {axisPhi}});
@@ -439,7 +439,7 @@ struct HfCorrelatorLcHadrons {
439439
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
440440
outputMl[iclass] = candidate.mlProbLcToPKPi()[classMl->at(iclass)];
441441
}
442-
entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
442+
entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore
443443
if (!skipMixedEventTableFilling) {
444444
entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, HfHelper::invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp);
445445
}
@@ -451,7 +451,7 @@ struct HfCorrelatorLcHadrons {
451451
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
452452
outputMl[iclass] = candidate.mlProbLcToPiKP()[classMl->at(iclass)];
453453
}
454-
entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
454+
entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore
455455
if (!skipMixedEventTableFilling) {
456456
entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, HfHelper::invMassLcToPiKP(candidate), poolBin, gCollisionId, timeStamp);
457457
}
@@ -611,7 +611,7 @@ struct HfCorrelatorLcHadrons {
611611
registry.fill(HIST("hMassLcMcRecSig"), HfHelper::invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
612612
registry.fill(HIST("hMassLcVsPtMcRec"), HfHelper::invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
613613
registry.fill(HIST("hSelectionStatusLcToPKPiMcRec"), candidate.isSelLcToPKPi());
614-
entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
614+
entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore
615615
entryLcCandGenInfo(isLcPrompt);
616616
}
617617
if (candidate.isSelLcToPiKP() >= selectionFlagLc) {
@@ -629,7 +629,7 @@ struct HfCorrelatorLcHadrons {
629629
registry.fill(HIST("hMassLcMcRecSig"), HfHelper::invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc);
630630
registry.fill(HIST("hMassLcVsPtMcRec"), HfHelper::invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc);
631631
registry.fill(HIST("hSelectionStatusLcToPiKPMcRec"), candidate.isSelLcToPiKP());
632-
entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
632+
entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore
633633
entryLcCandGenInfo(isLcPrompt);
634634
}
635635
} else {
@@ -855,9 +855,9 @@ struct HfCorrelatorLcHadrons {
855855
isLcPrompt = particle.originMcGen() == RecoDecay::OriginType::Prompt;
856856
isLcNonPrompt = particle.originMcGen() == RecoDecay::OriginType::NonPrompt;
857857
if (isLcPrompt) {
858-
registry.fill(HIST("hPtCandMcGenPrompt"), particle.pt());
858+
registry.fill(HIST("hPtCandMcGenPrompt"), particle.pt(), poolBin);
859859
} else if (isLcNonPrompt) {
860-
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle.pt());
860+
registry.fill(HIST("hPtCandMcGenNonPrompt"), particle.pt(), poolBin);
861861
}
862862

863863
// prompt and non-prompt division

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ struct HfCorrelatorLcScHadrons {
931931
registry.fill(HIST("hPtVsMultiplicityMcRecNonPrompt"), ptCand, multiplicityFT0M);
932932
}
933933

934-
entryCandCandRecoInfo(massCandPKPi, ptCand, outputMlPKPi[0], outputMlPKPi[1]);
934+
entryCandCandRecoInfo(massCandPKPi, ptCand, outputMlPKPi[0], outputMlPKPi[1], poolBin);
935935
entryCandCandGenInfo(isPrompt);
936936
if (!skipMixedEventTableFilling) {
937937
entryCand(candidate.phi(), etaCand, ptCand, massCandPKPi, poolBin, gCollisionId, timeStamp);
@@ -952,7 +952,7 @@ struct HfCorrelatorLcScHadrons {
952952
registry.fill(HIST("hPtCandSigNonPrompt"), ptCand);
953953
registry.fill(HIST("hPtVsMultiplicityMcRecNonPrompt"), ptCand, multiplicityFT0M);
954954
}
955-
entryCandCandRecoInfo(massCandPiKP, ptCand, outputMlPiKP[0], outputMlPiKP[1]);
955+
entryCandCandRecoInfo(massCandPiKP, ptCand, outputMlPiKP[0], outputMlPiKP[1], poolBin);
956956
entryCandCandGenInfo(isPrompt);
957957
if (!skipMixedEventTableFilling) {
958958
entryCand(candidate.phi(), etaCand, ptCand, massCandPiKP, poolBin, gCollisionId, timeStamp);

PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ struct HfTaskCorrelationLcHadrons {
259259
}
260260
// Histograms for MC Reco analysis
261261
if (fillHistoMcRec) {
262-
registry.add("hMassPromptLcVsPt", "Lc prompt candidates mass Vs Pt", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
263-
registry.add("hMassNonPromptLcVsPt", "Lc non prompt candidates mass Vs Pt", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
262+
registry.add("hMassPromptLcVsPt", "Lc prompt candidates mass Vs Pt", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisPoolBin}}});
263+
registry.add("hMassNonPromptLcVsPt", "Lc non prompt candidates mass Vs Pt", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisPoolBin}}});
264264
registry.add("hDeltaEtaPtIntSignalRegionMcRec", stringLcHadron + stringSignal + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}});
265265
registry.add("hDeltaPhiPtIntSignalRegionMcRec", stringLcHadron + stringSignal + stringDeltaPhi + "entries", {HistType::kTH1D, {axisDeltaPhi}});
266266
registry.add("hDeltaEtaPtIntSidebandsMcRec", stringLcHadron + stringSideband + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}});
@@ -577,6 +577,7 @@ struct HfTaskCorrelationLcHadrons {
577577
float const ptLc = std::abs(candidate.ptLc());
578578
float const bdtScorePrompt = candidate.mlScorePrompt();
579579
float const bdtScoreBkg = candidate.mlScoreBkg();
580+
int const poolBin = candidate.poolBin();
580581
int const effBinLc = o2::analysis::findBin(binsPtEfficiencyLc, ptLc);
581582
bool const isLcPrompt = candidate.isPrompt();
582583

@@ -597,7 +598,7 @@ struct HfTaskCorrelationLcHadrons {
597598
}
598599
registry.fill(HIST("hMassLcVsPt"), massLc, ptLc, efficiencyWeightLc);
599600
registry.fill(HIST("hMassLcVsPtWoEff"), massLc, ptLc);
600-
registry.fill(HIST("hMassPromptLcVsPt"), massLc, ptLc, efficiencyWeightLc);
601+
registry.fill(HIST("hMassPromptLcVsPt"), massLc, ptLc, poolBin, efficiencyWeightLc);
601602
registry.fill(HIST("hBdtScorePrompt"), bdtScorePrompt);
602603
registry.fill(HIST("hBdtScoreBkg"), bdtScoreBkg);
603604
} else {
@@ -607,7 +608,7 @@ struct HfTaskCorrelationLcHadrons {
607608
}
608609
registry.fill(HIST("hMassLcVsPt"), massLc, ptLc, efficiencyWeightLc);
609610
registry.fill(HIST("hMassLcVsPtWoEff"), massLc, ptLc);
610-
registry.fill(HIST("hMassNonPromptLcVsPt"), massLc, ptLc, efficiencyWeightLc);
611+
registry.fill(HIST("hMassNonPromptLcVsPt"), massLc, ptLc, poolBin, efficiencyWeightLc);
611612
registry.fill(HIST("hBdtScorePrompt"), bdtScorePrompt);
612613
registry.fill(HIST("hBdtScoreBkg"), bdtScoreBkg);
613614
}

0 commit comments

Comments
 (0)