Skip to content

Conversation

@lubynets
Copy link
Contributor

@lubynets lubynets commented Oct 17, 2025

Algorithm error fixes:

  • In the previous edition of the code when a certain V0 candidate (say $K^0_S$ ) was processed, its daughter tracks were filled into the tree not only as current V0's decay products ($\pi^+$ and $\pi^-$), but also as decay products of another V0 species (e.g. $\Lambda$) if these daughters participated in construction of such V0s (see attached picture).
Screenshot from 2025-10-17 16-29-08 Quantitatively, this effect had very insufficient impact (less than $10^{-3}$). This error is fixed in the PR.
  • Track selection, implemented via soa::Filtered had no effect in the V0 struct. It is fixed by implementation the track selection via boolean function.
    Note: default track selection in the V0 struct is changed from 1 to 0 (GlobalTrack to NoCut).

Functionality enhancement:
Added a possibility to cut on $N \sigma_{\mathrm{TOF}}$ for V0-based selected tracks and a possibility to reject tracks unmatched to TOF. Both $N \sigma_{\mathrm{TOF}}$ and a requirement to reject unmatched to TOF tracks are added as configurables - float and bool respectively, individually for all particle species.
Note: o2-analysis-lf-strangenesstofpid workflow is required as dependency.

Code cleaning:

  • got rid of instantiations of V0 daughter objects when they are not necessary (e.g. do not instantiate electrons when current V0 is $\Lambda$);
  • got rid of copy of TOF track objects into a vector, use their pointers instead;
  • factored out repeating peaces of code into lambda-functions;
  • repeating parts of the data model factored out into macros;
  • common for V0 and TOF struct functions (track, event selection, downsamling Tsallis) moved to the header file;
  • removed Tracks table from passed into V0 process functions.

Tagging @amaringarcia

@github-actions github-actions bot added the dpg label Oct 17, 2025
@github-actions github-actions bot changed the title tpcSkimsTableCreator: algo bugfix; add nSigma TOF cut; code cleaning [DPG] tpcSkimsTableCreator: algo bugfix; add nSigma TOF cut; code cleaning Oct 17, 2025
@github-actions
Copy link

github-actions bot commented Oct 17, 2025

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

@lubynets lubynets marked this pull request as draft October 17, 2025 14:55
@lubynets lubynets marked this pull request as ready for review October 17, 2025 15:22
@ddobrigk
Copy link
Collaborator

ddobrigk commented Oct 17, 2025

Hi @lubynets, sorry to ambush you a little bit, but please be mindful that primary TOF is not directly applicable for secondaries because a relatively large number of daughter prongs is associated to an incorrect collision (different than the V0 or cascade). For example, see here the rate of pions from K0 for which the pion track is in the same collision as the K0 mother:

image

In addition to this, the length traveled prior to decay should also be considered. To address these two factors, there is the 'strangeness tof pid' functionality (see this talk), which reassociates weak decay tracks to the collision their weakly decaying mothers are associated to and redoes the TOF calculation. It might be best to consider using that option instead, even if I'm admittedly still discussing a few details of the time re-association calculation with @njacazio (which we should hopefully sort out soon).

@lubynets
Copy link
Contributor Author

Hi @ddobrigk,
Thanks for your comment! Do I understand correctly that for addressing the issues mentioned by you one should include the strangenesstofpid.cxx workflow into submission chain and subscribe for V0TOFPIDs (or V0TOFNSigmas) table in the process() functions?

@ddobrigk
Copy link
Collaborator

Hi @ddobrigk, Thanks for your comment! Do I understand correctly that for addressing the issues mentioned by you one should include the strangenesstofpid.cxx workflow into submission chain and subscribe for V0TOFPIDs (or V0TOFNSigmas) table in the process() functions?

Hi @lubynets , yes, that's the workflow, and you in fact only need the V0TOFNSigmas to cut on. Bear in mind that unlike the primary TOF, you need to provide the whole chain (i.e. v0.tofNSigmaLaPr() checks if the positive prong is compatible with being a proton from a lambda). This is necessary because the recalculation considers the segment traveled under the lambda hypothesis.

@lubynets lubynets marked this pull request as draft October 17, 2025 20:32
@vkucera
Copy link
Collaborator

vkucera commented Oct 18, 2025

@lubynets lubynets marked this pull request as ready for review October 21, 2025 09:00
@lubynets
Copy link
Contributor Author

Dear code owners, could you please consider the PR?

@lubynets
Copy link
Contributor Author

Dear code owners, could you please consider the PR?

Dear @chiarazampolli, @alcaliva, @catalinristea, could you please check the PR and approve it or provide comments (if any)?

@lubynets
Copy link
Contributor Author

Dear code owners, could you please consider the PR?

Dear @chiarazampolli, @alcaliva, @catalinristea, could you please check the PR and approve it or provide comments (if any)?

Dear @alcaliva (All cc), thanks for approving the PR! Could you please merge it?

@ddobrigk ddobrigk merged commit 29c4d0e into AliceO2Group:master Oct 30, 2025
13 of 14 checks passed
@ddobrigk
Copy link
Collaborator

Hi @lubynets I think approval is limited but clicking on merge is not, so I did it for you :-)

@lubynets lubynets deleted the tpcSkimCreatorDev branch October 30, 2025 15:10
@lubynets
Copy link
Contributor Author

Hi @lubynets I think approval is limited but clicking on merge is not, so I did it for you :-)

Sorry for being boring, but I did not have a button "Merge" to click on it (maybe it depends on the target repository settings), that's way I asked. Thanks for merging!

@vkucera
Copy link
Collaborator

vkucera commented Oct 30, 2025

Hi @lubynets I think approval is limited but clicking on merge is not, so I did it for you :-)

@ddobrigk Only users with write permissions can merge.

@ddobrigk
Copy link
Collaborator

Ah - sorry, my bad, I think I remembered incorrectly then...

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.

4 participants