Skip to content

Commit 6b05e22

Browse files
[PWGDQ] Update dqEfficiency_withAssoc.cxx (AliceO2Group#9652)
Co-authored-by: ALICE Action Bot <[email protected]>
1 parent b73307c commit 6b05e22

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ DECLARE_SOA_COLUMN(CosPBcandidate, cosPBcandidate, float);
8383
DECLARE_SOA_COLUMN(Chi2Bcandidate, chi2Bcandidate, float);
8484
DECLARE_SOA_COLUMN(DCAxyzBetweenProngs, dcaxyzBetweenProngs, float);
8585
DECLARE_SOA_COLUMN(McFlag, mcFlag, int8_t);
86+
// Candidate columns for prompt-non-prompt JPsi separation
87+
DECLARE_SOA_COLUMN(Massee, massee, float);
88+
DECLARE_SOA_COLUMN(Ptee, ptee, float);
89+
DECLARE_SOA_COLUMN(Lxyee, lxyee, float);
90+
DECLARE_SOA_COLUMN(Lzee, lzee, float);
91+
DECLARE_SOA_COLUMN(AmbiguousInBunchPairs, AmbiguousJpsiPairsInBunch, bool);
92+
DECLARE_SOA_COLUMN(AmbiguousOutOfBunchPairs, AmbiguousJpsiPairsOutOfBunch, bool);
93+
DECLARE_SOA_COLUMN(Corrassoc, corrassoc, bool);
8694
} // namespace dqanalysisflags
8795

8896
DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTS", dqanalysisflags::IsEventSelected); //! joinable to ReducedEvents
@@ -92,6 +100,7 @@ DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTS", dqanalysisflags::IsMuon
92100
DECLARE_SOA_TABLE(MuonAmbiguities, "AOD", "DQMUONAMB", dqanalysisflags::MuonAmbiguityInBunch, dqanalysisflags::MuonAmbiguityOutOfBunch); //! joinable to ReducedMuonTracks
93101
DECLARE_SOA_TABLE(Prefilter, "AOD", "DQPREFILTER", dqanalysisflags::IsBarrelSelectedPrefilter); //! joinable to ReducedTracksAssoc
94102
DECLARE_SOA_TABLE(BmesonCandidates, "AOD", "DQBMESONS", dqanalysisflags::massBcandidate, dqanalysisflags::deltaMassBcandidate, dqanalysisflags::pTBcandidate, dqanalysisflags::LxyBcandidate, dqanalysisflags::LxyzBcandidate, dqanalysisflags::LzBcandidate, dqanalysisflags::TauxyBcandidate, dqanalysisflags::TauzBcandidate, dqanalysisflags::DCAxyzBetweenProngs, dqanalysisflags::CosPBcandidate, dqanalysisflags::Chi2Bcandidate, dqanalysisflags::McFlag);
103+
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs, dqanalysisflags::Corrassoc);
95104
} // namespace o2::aod
96105

97106
// Declarations of various short names
@@ -1185,6 +1194,7 @@ struct AnalysisSameEventPairing {
11851194
Produces<aod::DimuonsExtra> dimuonsExtraList;
11861195
Produces<aod::DimuonsAll> dimuonAllList;
11871196
Produces<aod::DileptonsInfo> dileptonInfoList;
1197+
Produces<aod::JPsieeCandidates> PromptNonPromptSepTable;
11881198

11891199
o2::base::MatLayerCylSet* fLUT = nullptr;
11901200
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
@@ -1817,6 +1827,10 @@ struct AnalysisSameEventPairing {
18171827
// Fill histograms
18181828
bool isAmbiInBunch = false;
18191829
bool isAmbiOutOfBunch = false;
1830+
bool isCorrect_pair = false;
1831+
if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2)
1832+
isCorrect_pair = true;
1833+
18201834
for (int icut = 0; icut < ncuts; icut++) {
18211835
if (twoTrackFilter & (static_cast<uint32_t>(1) << icut)) {
18221836
isAmbiInBunch = (twoTrackFilter & (static_cast<uint32_t>(1) << 28)) || (twoTrackFilter & (static_cast<uint32_t>(1) << 29));
@@ -1825,6 +1839,7 @@ struct AnalysisSameEventPairing {
18251839
fHistMan->FillHistClass(histNames[icut][0].Data(), VarManager::fgValues); // reconstructed, unmatched
18261840
for (unsigned int isig = 0; isig < fRecMCSignals.size(); isig++) { // loop over MC signals
18271841
if (mcDecision & (static_cast<uint32_t>(1) << isig)) {
1842+
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch, isCorrect_pair);
18281843
fHistMan->FillHistClass(histNamesMC[icut * fRecMCSignals.size() + isig][0].Data(), VarManager::fgValues); // matched signal
18291844
if (fConfigQA) {
18301845
if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2) { // correct track-collision association

PWGDQ/Tasks/tableReader_withAssoc.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ DECLARE_SOA_COLUMN(TauxyBcandidate, tauxyBcandidate, float);
8989
DECLARE_SOA_COLUMN(TauzBcandidate, tauzBcandidate, float);
9090
DECLARE_SOA_COLUMN(CosPBcandidate, cosPBcandidate, float);
9191
DECLARE_SOA_COLUMN(Chi2Bcandidate, chi2Bcandidate, float);
92+
// Candidate columns for prompt-non-prompt JPsi separation
93+
DECLARE_SOA_COLUMN(Massee, massJPsi2ee, float);
94+
DECLARE_SOA_COLUMN(Ptee, ptJPsi2ee, float);
95+
DECLARE_SOA_COLUMN(Lxyee, lxyJPsi2ee, float);
96+
DECLARE_SOA_COLUMN(Lzee, lzJPsi2ee, float);
97+
DECLARE_SOA_COLUMN(AmbiguousInBunchPairs, AmbiguousJpsiPairsInBunch, bool);
98+
DECLARE_SOA_COLUMN(AmbiguousOutOfBunchPairs, AmbiguousJpsiPairsOutOfBunch, bool);
9299
} // namespace dqanalysisflags
93100

94101
DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTSA", dqanalysisflags::IsEventSelected); //! joinable to ReducedEvents
@@ -99,6 +106,7 @@ DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTSA", dqanalysisflags::IsMuo
99106
DECLARE_SOA_TABLE(MuonAmbiguities, "AOD", "DQMUONAMBA", dqanalysisflags::MuonAmbiguityInBunch, dqanalysisflags::MuonAmbiguityOutOfBunch); //! joinable to ReducedMuonTracks
100107
DECLARE_SOA_TABLE(Prefilter, "AOD", "DQPREFILTERA", dqanalysisflags::IsBarrelSelectedPrefilter); //! joinable to ReducedTracksAssoc
101108
DECLARE_SOA_TABLE(BmesonCandidates, "AOD", "DQBMESONSA", dqanalysisflags::massBcandidate, dqanalysisflags::deltamassBcandidate, dqanalysisflags::pTBcandidate, dqanalysisflags::LxyBcandidate, dqanalysisflags::LxyzBcandidate, dqanalysisflags::LzBcandidate, dqanalysisflags::TauxyBcandidate, dqanalysisflags::TauzBcandidate, dqanalysisflags::CosPBcandidate, dqanalysisflags::Chi2Bcandidate);
109+
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", dqanalysisflags::Massee, dqanalysisflags::Ptee, dqanalysisflags::Lxyee, dqanalysisflags::Lzee, dqanalysisflags::AmbiguousInBunchPairs, dqanalysisflags::AmbiguousOutOfBunchPairs);
102110
} // namespace o2::aod
103111

104112
// Declarations of various short names
@@ -1102,6 +1110,7 @@ struct AnalysisSameEventPairing {
11021110
Produces<aod::DimuonsAll> dimuonAllList;
11031111
Produces<aod::DileptonFlow> dileptonFlowList;
11041112
Produces<aod::DileptonsInfo> dileptonInfoList;
1113+
Produces<aod::JPsieeCandidates> PromptNonPromptSepTable;
11051114

11061115
o2::base::MatLayerCylSet* fLUT = nullptr;
11071116
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
@@ -1694,6 +1703,7 @@ struct AnalysisSameEventPairing {
16941703
isUnambiguous = !(isAmbiInBunch || isAmbiOutOfBunch);
16951704
if (sign1 * sign2 < 0) {
16961705
fHistMan->FillHistClass(histNames[icut][0].Data(), VarManager::fgValues);
1706+
PromptNonPromptSepTable(VarManager::fgValues[VarManager::kMass], VarManager::fgValues[VarManager::kPt], VarManager::fgValues[VarManager::kVertexingTauxyProjected], VarManager::fgValues[VarManager::kVertexingTauzProjected], isAmbiInBunch, isAmbiOutOfBunch);
16971707
if (isAmbiInBunch) {
16981708
fHistMan->FillHistClass(histNames[icut][3 + histIdxOffset].Data(), VarManager::fgValues);
16991709
}

0 commit comments

Comments
 (0)