Repository navigation
[PWGHF] Refactor XiC0 and OmegaC0 QA workflows - #18728
fcatalan92 wants to merge 36 commits into
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Error while checking build/O2Physics/o2 for 5d1e814 at 2026-11-13 13:25: Full log here. |
|
Error while checking build/O2Physics/staging for 5d1e814 at 2026-11-13 13:35: Full log here. |
|
Error while checking build/O2Physics/code-check for 5d1e814 at 2026-11-13 13:36: Full log here. |
|
Error while checking build/O2Physics/code-check for 53cbff8 at 2026-11-13 16:18: Full log here. |
|
Error while checking build/O2Physics/code-check for 69c46a2 at 2026-11-13 18:49: Full log here. |
lubynets
left a comment
There was a problem hiding this comment.
Hi Fabio, I had a look at the candidateCreatorXic0Omegac0Qa.cxx, in particular at the KF-related part, and left some comments, which I hope you will find useful.
| const KFParticle* v0Daughters[2] = {&kfPos, &kfNeg}; | ||
| KFParticle kfV0; | ||
| kfV0.SetConstructMethod(configs.kfConstructMethod); | ||
| try { |
There was a problem hiding this comment.
The KFParticle code does not throw exceptions so the try-catch block is not needed (?)
P.S. I know that it is present in some different place of O2Physics, namely in the XicToXiPiPi creator.
| Configurable<bool> refitWithMaterialCorrectionLF{"refitWithMaterialCorrectionLF", false, "Do refit after material correction applied"}; | ||
|
|
||
| Configurable<bool> propagateToPCA{"propagateToPCA", true, "Create tracks version propagated to PCA"}; | ||
| Configurable<double> maxR{"maxR", 200., "Reject PCA's above this radius"}; |
There was a problem hiding this comment.
Is double precision needed? Since the names of Configurables are anyway changed, and the wagons at HY will require careful re-setting, maybe it makes sense to make them float?
| Configurable<bool> kfDoDCAFitterPreMinimV0FromLF{"kfDoDCAFitterPreMinimV0FromLF", true, "KF : do DCAFitter pre-optimization before KF fit to include material correction for V0"}; | ||
| Configurable<bool> kfDoDCAFitterPreMinimCascFromLF{"kfDoDCAFitterPreMinimCascFromLF", false, "KF : do DCAFitter pre-optimization before KF fit to include material correction for Xi"}; | ||
| } LFConfigs; | ||
| Configurable<bool> kfTuneForOmega{"kfTuneForOmega", false, "if enabled, take main cascade properties from omega fit instread of Xi fit(=default)"}; |
| Configurable<bool> kfDoDCAFitterPreMinimCascFromLF{"kfDoDCAFitterPreMinimCascFromLF", false, "KF : do DCAFitter pre-optimization before KF fit to include material correction for Xi"}; | ||
| } LFConfigs; | ||
| Configurable<bool> kfTuneForOmega{"kfTuneForOmega", false, "if enabled, take main cascade properties from omega fit instread of Xi fit(=default)"}; | ||
| Configurable<int> kfConstructMethod{"kfConstructMethod", 2, "2 : Daughter particle masses stay fixed in construction process"}; |
There was a problem hiding this comment.
Alternative value - 0, when daughters' masses do not stay fixed. Maybe it makes sense to provide a reference to the KF code? https://github.com/alisw/KFParticle/blob/a00323cd7b022430abcb3c43f18188b291b0c803/KFParticle/KFParticleBase.cxx#L625
Otherwise not clear for the user, why the method is"2" and what are the alternatives.
| auto posTrack = lfTracks.rawIteratorAt(v0AodElement.posTrackId()); | ||
| auto negTrack = lfTracks.rawIteratorAt(v0AodElement.negTrackId()); | ||
| auto bachTrack = lfTracks.rawIteratorAt(cascAodElement.bachelorId()); | ||
| //------------------------------Create cascade track------------------------------ |
There was a problem hiding this comment.
There is a room for code repetition reduction.
| int pdgIdOfCharmBaryon = kXiC0; | ||
| double massOfCascade = o2::constants::physics::MassXiMinus; | ||
|
|
||
| if (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi) { |
| massOfCascade = o2::constants::physics::MassOmegaMinus; | ||
| } | ||
|
|
||
| if (decayChannel == hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaK) { |
| // Calculate normalised decay length using KFParticle | ||
| float dlV0{}, errDlV0{}; | ||
| kfV0ToPv.GetDecayLength(dlV0, errDlV0); | ||
| dlV0 = std::abs(dlV0); // KFParticle returns a signed decay length |
There was a problem hiding this comment.
It is signed by purpose, isn't it better to leave it signed and let the users at postprocessing steps convert it to unsigned if they need?
Since the sign reflects the relative position of primary and secondary vertices with respect to particle's momentum direction; this information may be important for resolution effects study.
This PR refactors the XiC0 and OmegaC0 QA workflows to use a common candidate data model for the different decay channels, following the pattern of the 2-prong and 3-prong workflows. It also aligns better the DCA and KFParticle reconstruction approaches, with KFParticle-specific quantities stored separately in a table joinable with the base one.
The PR also streamlines candidate building around a shared workflow for the DCA and KFParticle approaches, and updates the MC matching, selectors, ML responses, tree creators and analysis task to use the new schema.
The changes were tested locally for the OmegaC0 workflow.
@jinhyunni Please have a look, I did not test this for the XiC0, so if you can give it a try, it would be great!
@mtorresc15