Skip to content

[Common/PWGHF]: store PID info in 2-prong candidate table and propagate it to analyses.#7805

Merged
ddobrigk merged 18 commits intoAliceO2Group:masterfrom
mfaggin:nsigma_pid_candcreator
Oct 18, 2024
Merged

[Common/PWGHF]: store PID info in 2-prong candidate table and propagate it to analyses.#7805
ddobrigk merged 18 commits intoAliceO2Group:masterfrom
mfaggin:nsigma_pid_candcreator

Conversation

@mfaggin
Copy link
Collaborator

@mfaggin mfaggin commented Sep 26, 2024

@fgrosa here a possible development for the 2-prong only. 3-prong case not yet addressed

mfaggin added a commit to mfaggin/O2Physics that referenced this pull request Sep 26, 2024
Please consider the following formatting changes to AliceO2Group#7805
@mfaggin mfaggin force-pushed the nsigma_pid_candcreator branch from fa42dfc to 1464526 Compare September 26, 2024 16:33
Copy link
Collaborator

@fgrosa fgrosa left a comment

Choose a reason for hiding this comment

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

Hi @mfaggin thanks for this implementation!
I started with the two major comments, I will check the minor details after the first revision maybe (waiting also @vkucera's feedback about the TrackSelectorPID.h)

@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 3, 2024

thanks @fgrosa , I've implemented the 2 major comments of yours. I've also reverted the pidCreator.cxx

Comment on lines 702 to 705
hf_cand::NSigTpcPi0, hf_cand::NSigTpcKa0,
hf_cand::NSigTpcPi1, hf_cand::NSigTpcKa1,
hf_cand::NSigTofPi0, hf_cand::NSigTofKa0,
hf_cand::NSigTofPi1, hf_cand::NSigTofKa1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

In terms of generalisation of the common HF PID code, it would be better to have one table per prong index and per species, e.g. HfPidProng0Pi, HfPidProng0Ka, HfPidProng1Pi,...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 15, 2024

Thanks a lot @vkucera for your suggestions. I've implemented them in the new commits.
A couple of comments:

  • I've decided not to rename neither NSigTpcPi0 etc. nor TpcTofNSigmaPi0 etc. because they are largely used in many selectors/ML inference class/analysis tasks also for the 3-prong analyses
  • as discussed yesterday, by mistake after your review I've done git pull --rebase upstream master instead of git merge the master branch. This changed my history locally and prevented me to smoothly push here again. I managed to push here after git pull --rebase origin <this_branch> but as you see now the history is destroyed (in particular: this put in time order my commits, mixing them up with pre-existing ones instead of putting all mine on top). I find it super dirty, and I'd propose to force-push from a backup branch that I have aligned with the upstream master. This will delete your review here I'm afraid... let me know what you think.

@vkucera
Copy link
Collaborator

vkucera commented Oct 15, 2024

Hi @mfaggin , I agree, in this case it is cleaner to force-push a history with only your work.

Mattia Faggin and others added 13 commits October 15, 2024 15:17
 - Needed tables added
 - TrackSelectorPID patch added to force the usage of a custom PID nSigma value (from 2-prong candidate table)
 - Add process functions via macro for combined TPC-TOF PID for 2-prong candidates
 - ML response class updated accordingly

TODO: propagate it to the next pieces of the chain.
Files to be adjusted:
 - []  TableProducer/derivedDataCreatorD0ToKPi.cxx
 - []  TableProducer/treeCreatorD0ToKPi.cxx
 - []  HFC/TableProducer/correlatorDMesonPairs.cxx
 - []  D2H/Tasks/taskd0.cxx
 - []  D2H/Tasks/taskBplus.cxx
 - put the PID nsigma columns in another table, to be joined in analysis
 - use dynamic columns for nsigma combined
@mfaggin mfaggin force-pushed the nsigma_pid_candcreator branch from ef70d15 to 7bec368 Compare October 15, 2024 13:25
Copy link
Collaborator

@vkucera vkucera left a comment

Choose a reason for hiding this comment

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

Thanks a lot @mfaggin for the great improvement. Please see some minor suggestions.

@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 15, 2024

Thanks @vkucera , I've just addressed also your last comments.
I've also managed to test the code locally for the standard D0 analysis, and everything worked for me.

@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 16, 2024

hPtCand1
hPtCand0
hPtCand

Hi @fgrosa @vkucera , I've just tried running the analysis aligning O2Physics to the master branch (blue) as well as with the development branch of this PR (red) and I checked the first 3 plots in the taskD0 output as an example. They all look identical (the weird shapes are just because I asked the configuration of a random train by Mingyu, where ML selections are applied with different values vs. pt).

I attach also the full files used for the tests, for completeness.
input_data.txt
configuration.json
run.txt

fgrosa
fgrosa previously approved these changes Oct 16, 2024
@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 16, 2024

Hi @vkucera , @fgrosa I moved the PR from "draft" to "ready for review"

Copy link
Collaborator

@vkucera vkucera left a comment

Choose a reason for hiding this comment

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

@mfaggin thanks for the thorough validation.
Please see a few small suggestions that would be good to implement before merging.

@mfaggin
Copy link
Collaborator Author

mfaggin commented Oct 17, 2024

tagging also @ddobrigk since a file in Common is touched

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants