Skip to content

[PWGLF] Add customV0 pairing for Sigma+ PCM photon - #18175

Open
hfribert wants to merge 2 commits into
AliceO2Group:masterfrom
hfribert:sigmaplus-customV0
Open

hfribert wants to merge 2 commits into
AliceO2Group:masterfrom
hfribert:sigmaplus-customV0

Conversation

@hfribert

@hfribert hfribert commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

@fmazzasc

This PR adds the option to build the photon candidates itself instead of using V0Datas:

  • This is needed since the SVertexer is built for V0's from the primary vertex, which is not the case for the Sigma+'s photon (weak decay: Sigma+ --> p + pi0 --> p + 2 gamma (only 1 gamma reconstructed)). In MC local tests, this yields ~3x as many true Sigma+ as the V0Datas.
  • Pairing similar to the SVertexer: precuts on the daughters' polar angle difference and on the circles touching, then a vertex fit in every compatible collision (TPC-only daughters moved to the collision time, as in the strangenessbuilder)
  • For TPC-only daughters, the compatible collisions are taken from their full TPC time range
  • The proton daughter determines the collision (has ITS). For the photon deduplication (same photon in several candidates), only the Sigma+ candidate with the smallest DCA of the reconstructed mother to the PV is written
  • Also included additional photon & candidate variables, as well as histograms, for the direct comparison between the two different methods and for additional cuts in post-analysis

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

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

fitter.setCollinear(collinear);
int nCand = 0;
try {
nCand = fitter.process(posTrackParCov, negTrackParCov);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @hfribert ! It looks good. However, it is not clear to me how this is different than what is currently being done in the propagationService. Can you please elaborate a bit more?
Maybe we could discuss it tomorrow at the PAG-Strangeness meeting?
Thank you very much!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @romainschotter, thanks for having a look! The propagationService, as far as I saw, takes the SVertexer V0s as input. The SVertexer however applies cuts towards the primary vertex (e.g. mTPCTrackMaxDCAXY2ToMeanVertex), which seem to be too tight for many of the Sigma+ decays (after a couple of cm's). Many of these photons therefore wouldn't be available via the propagationService V0s.

for (int iCand = 0; iCand < static_cast<int>(mCandidatesOfTimeframe.size()); ++iCand) {
candsByPhoton[mCandidatesOfTimeframe[iCand].photonId].push_back(iCand);
}
std::vector<bool> keep(mCandidatesOfTimeframe.size(), !candDeduplicatePhotons);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In propagationService, deduplication is performed at the photon-building stage, whereas here it is done on the photon mother (the Sigma). Is there a specific reason or benefit to handling it this way?
Thank you very much!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason to deduplicate using the mother is that the photon does not point to the PV. For photon-based deduplication, I would also need to use the proton daughter, e.g., the CPA of the photon to the decay vertex (p + 2gamma). I also tried deduplicating using the proton-photon dca, which seems to yield fewer true candidates than taking the reconstructed mother dca-to-PV as a criterion.

@romainschotter romainschotter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(sorry misclick)

@alibuild

alibuild commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 3502361 at 2026-10-05 21:32:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 8 errors and 7 warnings.'
Found 8 errors and 7 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/26fac670f82450b48678cf3157501ed10d4b91bf/O2Physics-code-check/errors.txt
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:303:28: error: no header providing "TAxis" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:304:12: error: no header providing "size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:310:29: error: no header providing "TH1" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:333:29: error: no header providing "TH2" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:642:33: error: no header providing "o2::aod::track::extensions::TPCTimeErrEncoding" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:707:21: error: no header providing "o2::math_utils::CircleXYf_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:730:43: error: no header providing "o2::aod::track::TrackTimeAsym" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:784:77: error: no header providing "o2::constants::lhc::LHCBunchSpacingNS" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 7 -gt 0 ]]
++ cat /sw/BUILD/26fac670f82450b48678cf3157501ed10d4b91bf/O2Physics-code-check/warnings.txt
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:416:26: warning: use 'contains' to check for membership [readability-container-contains]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:642:5: warning: uninitialized record type: 'timeEncoding' [cppcoreguidelines-pro-type-member-init]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:643:27: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:656:21: warning: use designated initializer list to initialize 'TrackCand' [modernize-use-designated-initializers]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:690:33: warning: use designated initializer list to initialize 'SVCand' [modernize-use-designated-initializers]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:1348:37: warning: casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead [bugprone-incorrect-roundings]
PWGLF/TableProducer/Strangeness/sigmaplusbuilder.cxx:1707:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto]
++ [[ 8 -gt 0 ]]
++ exit 1
--

Full log here.

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

Development

Successfully merging this pull request may close these issues.

3 participants