Repository navigation
[PWGLF] Omega(2012): shared selection core, Xi(1530)K mode and ML training-table exporter - #18208
Merged
Merged
Conversation
- Use v001 resonance tables (ResoCollisions_001, ResoMicroTracks_001, ResoMCMicroTracks_001, ResoMCParents_001); keep ResoTracks as fallback - Unify full/micro track selection and PID in a single code path, handling quantised v001 DCA/nSigma values and producer pT-dependent DCA bits - Apply pion PID on micro tracks; apply cUseOnlyTOFTrackPi to both pions and cUseOnlyTOFTrackKa to the kaon; add cByPassTOF and optional pT-dependent PID/DCA - Restore secondary-resonance and K1 candidate cuts (mass window, other-pair masses, opening angle, pair asymmetry); -999 disables a cut and skips its computation; fill QAcut and kaon QA - Iterate unordered pion pairs to stop double-filling triplets, with a canonical pion assignment for role-dependent quantities - Cache per-collision selections, record cut-flow from the selection functions, add event cuts and init-time config validation - Replace TLorentzVector with ROOT::Math vectors, use PDG constants, remove unused options
- Use const references in range-based loops over configured PID cuts - Replace magic numbers in init checks with named constants
…isMicroCore.h Split the K1(1270) microtrack histogram task into a reusable core header and a thin workflow, so that other K1 workflows can share one selection and candidate loop implementation instead of copying it. - PWGLF/Core/K1AnalysisMicroCore.h (new): event, track, PID, secondary and candidate configurable groups (no group prefix, so all JSON keys and defaults are unchanged), the track quality/PID stages, the quantised DCA/nSigma grid checks, the sibling-based truth classification, the unordered triplet loop with its selection cache and cut-flow histograms, and the histogram registration. No using-directives, no runDataProcessing.h. - k1AnalysisMicro.cxx: struct K1AnalysisMicro now owns the configurable groups, the histogram registry and the process functions, and calls the core. Process switches, configurable names/defaults, histogram names and the selection are unchanged.
Add a derived-table workflow that writes the unlike-sign K1(1270) micro candidates selected by the shared K1 core, together with the canonical tracks and a 125-entry feature vector for ML training. - PWGLF/Core/K1MlFeatures.h (new): canonical unlike-sign role assignment (kaon, same-sign pion, opposite-sign pion) and the master feature builder of the frozen feature contract (FeatureContractSha256), with compile-time checks of the feature-name count and of the projection indices. The pion mass keeps the contract value 0.13957039 GeV (O2 MassPionCharged is 0.1395704 and would change the features). - PWGLF/DataModel/LFK1MlTables.h (new): K1MlEvents, K1MlTracks, K1MlCandidates, K1MlInputs (float[125] features), K1MlTruth and K1MlGenAudit. Relations point only to the derived tables. - K1AnalysisMicroCore.h: optional candidate callback and loose-stage traversal (pass bits 1/2/4/8/16; selected = 31), loose cut-flow histograms. The histogram task does not use them and is unchanged. Candidates at the selected stage are emitted only if they satisfy the canonical/feature contract, as at the loose stage. - k1TrainingTable.cxx (new, workflow k1-training-table): struct K1TrainingTable reuses the core loop; invalid candidates are skipped and counted in ML/exportSkipped by build status instead of aborting.
…ilder The K1 ML feature contract SHA covers the 125 feature names and the three projection index lists only, so switching the pion mass from the local literal to o2::constants::physics::MassPionCharged does not change the contract identity. Feature values change at the 1e-8 relative level for the pair masses; exports written with the previous literal are therefore not byte-identical to new exports.
Initialize the TPC n-sigma once from the species instead of overwriting a NaN default in both branches. The selection is unchanged.
Move the event, track-quality, TOF-requirement and PID selection of resonance daughters into PWGLF/Core/ResoAnalysisSelectionCore.h. The K1 core keeps the K1 selection, truth classification, candidate loop and its cut-flow/ML audit histograms, and hands the selected pion pairs and candidates to the task through hooks. The K1 analysis histograms are now registered and filled in k1AnalysisMicro.cxx; the training-table task writes only the ML tables, CutFlow/*, ML/* and MCReco event counters. The selection, all configurable names and the ML table output are unchanged.
Include Math/Vector4Dfwd.h where ROOT::Math::PxPyPzMVector is used, drop the unused LFResonanceTables.h and PhysicsConstants.h includes, simplify the candidate-cut boolean expressions, use designated initializers for EncodedValue and remove redundant int64_t casts. No change in behaviour.
…ining-table exporter Move the Xi, K0s and track selection and the candidate enumeration of the Omega(2012) analysis into PWGLF/Core/Omega2012AnalysisCore.h with hooks for the task histograms, in the same way as the K1 core. The two decay modes are analysed separately throughout: Omega(2012)- -> Xi- K0S (unchanged histogram output) and Omega(2012)- -> Xi(1530)0 K- -> Xi- pi+ K-. The previous three-body code combined Xi + pi + K0S, which cannot be an Omega(2012)- by charge, and is removed; the new mode uses a charged kaon track selected with ResoAnalysisSelectionCore, with wrong-sign controls kept apart from the signal pattern. Add the per-mode feature contracts (Omega2012MlFeatures.h), the derived tables (LFOmega2012MlTables.h) and the omega2012-training-table workflow that writes the candidates of each mode, their features, pass bits and MC truth, plus a generated-parent audit by decay channel.
# Conflicts: # PWGLF/Tasks/Resonances/k1AnalysisMicro.cxx
BongHwi
requested review from
HorstMa,
abmodak,
alibuild,
dmallick2,
ercolessi,
gbencedi,
lhusova,
maciacco,
mario-krueger,
mpuccio,
omvazque,
prottayCMT,
romainschotter,
skundu692 and
smaff92
as code owners
October 7, 2026 23:04
|
O2 linter results: ❌ 0 errors, |
Collaborator
|
Error while checking build/O2Physics/code-check for a24fd98 at 2026-10-08 01:38: Full log here. |
BongHwi
enabled auto-merge (squash)
October 8, 2026 02:43
Collaborator
Author
mpuccio
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors
omega2012Analysisalong the lines of the K1(1270) split (#18167) and adds an ML exporter.The two decay modes stay strictly separate (histograms, tables, features, truth).
PWGLF/Core/Omega2012AnalysisCore.h: Xi / K0S / track selection, candidate loops and truth matching per mode, cut-flow histogramsprocessData,processMixedEvent,processMC,processMCGenerated)omega2012_3body(Xi + pi + K0S) with Xi- pi+ K- using micro tracks;new
processXi1530K{Micro,Tracks,MCMicro,MixedMicro}, wrong-sign controls in a separate folderomega2012-training-tableworkflow (omega2012TrainingTable.cxx,LFOmega2012MlTables.h,Omega2012MlFeatures.h):per-mode candidate, feature, truth tables and a generated-parent audit table