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.
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 4, 2026 14:27
|
O2 linter results: ❌ 0 errors, |
Collaborator
Author
|
Hello @omvazque , could you approve this PR? |
Collaborator
|
Error while checking build/O2Physics/code-check for 0ac4b3f at 2026-10-04 17:06: Full log here. |
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.
Summary
Modernizes the K1(1270) micro analysis and adds a derived-table exporter for ML training, with the selection shared between both tasks.
Changes
PWGLF/Core/ResoAnalysisSelectionCore.h(new): generic event, track-quality, TOF-requirement and PID selection of resonance daughters for full and micro (quantised DCA/nSigma) v001 tracks, including grid-consistency checks of the cuts for micro tracks. PID is species-agnostic (PIDCutConfig), so other resonance tasks can reuse it.PWGLF/Core/K1AnalysisMicroCore.h(new): K1 selection (secondary/candidate cuts), truth classification and the (pion, pion, kaon) candidate enumeration with cut-flow instrumentation. Tasks receive the selected pairs/candidates through hooks.k1AnalysisMicro.cxx: updated to the v001 resonance tables and the shared core; all analysis histograms are registered and filled in the task.k1TrainingTable.cxx(new workflowk1-training-table) +PWGLF/DataModel/LFK1MlTables.h+PWGLF/Core/K1MlFeatures.h: writes unlike-sign candidates at the loose or selected stage with canonical tracks, master features, pass bits and MC truth.