Skip to content

[PWGDQ] Update table with properties for prompt-non prompt J/psi separation - #18370

Draft
JonathanWitte wants to merge 1 commit into
AliceO2Group:masterfrom
JonathanWitte:promptNonPromptSeparationTable
Draft

JonathanWitte wants to merge 1 commit into
AliceO2Group:masterfrom
JonathanWitte:promptNonPromptSeparationTable

Conversation

@JonathanWitte

Copy link
Copy Markdown

Thorough review and upgrade of the table used for P/NP separation
PromptNonPromptSepTable / o2::aod::JPsieeCandidates / "DQPSEUDOPROPER"

Recalculating missing properties
Removing TPC track quality properties due to MC mismatch
Add FT0C centrality in table
Move table fill outside of cut loop and guard missing options with condition

… add FT0C centrality value, and setup stable filling outside the cut loop
@github-actions github-actions Bot added the pwgdq label Oct 20, 2026
@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 522 warnings, 🔕 0 disabled

dqanalysisflags::MassDileptonCandidate, dqanalysisflags::Ptpair, dqanalysisflags::Etapair, dqanalysisflags::Ptassoc, dqanalysisflags::Etaassoc, dqanalysisflags::Phiassoc,
dqanalysisflags::Ptleg1, dqanalysisflags::Etaleg1, dqanalysisflags::Phileg1, dqanalysisflags::Ptleg2, dqanalysisflags::Etaleg2, dqanalysisflags::Phileg2);
DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER",
// bookkeeping / labels

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments, they just blow up the code, in general, if the namings are unique enough, no extra comments are needed

Same for the lines below

(fConfigML.applyBDT && fOutputMlPsi2ee.size() > 2) ? VarManager::fgValues[VarManager::kBdtNonprompt] : -999.f);
}
// flat table for prompt / non-prompt BDT training: one row per pair (not per cut; select cuts offline via PairFilter)
// Only meaningful with track covariances, the two-prong fitter and an event vertex covariance:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such calculations shouldnt be done directly here, but rather in the VarManager. So introduce new Variables kDCASigxy1, kDCASigxy2, kDCASigz1, kDCASigz1 and fill values in VarManager::FillPair and VarManager::FillPairVertexing, similar lxyOverErr and lxyzOverErr


// decay-length significances: kVertexingLxyOverErr / kVertexingLxyzOverErr are only filled in the
// KFParticle branch of FillPairVertexing, not with the DCAFitter used here -> compute them explicitly
auto ratio = [](float num, float den) -> float {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check here too is not necessary. You divide by an error which can not be negative

if (t1.sign() * t2.sign() < 0 && vertexingOK) {

// track DCA significances (DCA w.r.t. the collision the track was stored with, as kDCAxy1/kDCAz1)
auto dcaSig = [](float dca, float cov) -> float {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this function, track.cYY (etc.) shouldnt be negative so the check is not necessary

@@ -2293,10 +2375,6 @@ struct AnalysisSameEventPairing {
}
}
if (sign1 * sign2 < 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why introduce the check above again if it is already here?

const bool ambiOutOfBunch = (twoTrackFilter & (static_cast<uint32_t>(1) << 30)) || (twoTrackFilter & (static_cast<uint32_t>(1) << 31));
// kVertexingProcCode == 0: the fit failed; FillPairVertexing then returns early without updating the
// projected / pseudo-proper / pointing-angle variables, so they would be stale -> skip the pair
const bool vertexingOK = VarManager::fgValues[VarManager::kVertexingProcCode] > 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check here is also unneccessary, it is done already in the VarManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants