-
Notifications
You must be signed in to change notification settings - Fork 615
[PWGHF] KFParticle based 3 prong decay reconstruction development #10610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fgrosa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me now, thanks @lubynets for reverting the PID variables!
|
Hi @lubynets, is this PR ready? Should we revert it to |
|
Hi @fgrosa, |
|
@lubynets Please fix the issues. |
@vkucera, I noticed the "magic number" issues, but I could not invent a meaningful name for the variable 2, because I do not understand the physics case - why a 3-prong decay particle has only two daughters. Can you please briefly hint what it means, so I could create a proper alias for 2? |
| const float x = candidate.xSecondaryVertex(); | ||
| const float y = candidate.ySecondaryVertex(); | ||
| const float z = candidate.zSecondaryVertex(); | ||
| const float errX = candidate.kfXError(); | ||
| const float errY = candidate.kfYError(); | ||
| const float errZ = candidate.kfZError(); | ||
| const float errPVX = candidate.kfXPVError(); | ||
| const float errPVY = candidate.kfYPVError(); | ||
| const float errPVZ = candidate.kfZPVError(); | ||
| const float chi2primKaon = candidate.kfChi2PrimProng1(); | ||
| const float dcaProtonPion = candidate.kfDcaProng0Prong2(); | ||
| const float chi2GeoProtonPion = candidate.kfChi2GeoProng0Prong2(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amount of code duplication is increasing with every addition. Please take a moment for a proper factorisation soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will try to reduce code duplication between MC and data functions.
There is one more place where duplication takes place - the lite and full tables. Won't it be better if they will be replaced with lite and "additional", where lite will remain as is, and "additional" will include only the difference between full and lite?
Or due to compatibility with other tasks the existing division into lite and full tables should remain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lubynets @vkucera if you agree, I would postpone it to a separated PR, since it would touch only one file while the current one is open since a while and it is implementing modifications to a few files that we would like to modify for a couple of central developments (see for event selection #10949, and another one regards the PID variables). If you confirm that it is ok for you, I would merge this PR. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @fgrosa (@vkucera cc),
From my side it's ok to prepare a separate PR dedicated to code duplication reduction (if Vit does not object).
I would also like to clarify whether my idea expressed above (replace "full" table with "additional / extended / etc") makes sense? Or should I contact those who is marked as code authors - Nicolo' and Luigi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lubynets thanks!
Regarding the names, while I understand the reasoning, I would keep full simply because it is the same for all channels and it's easier for newcomers to have similar names (or you change it for all the channels), but not a strong opinion ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, my idea is not about names change! (the name can be approved later)
The point is that there are two possibilities - to write Lite or Full table on user's request according to the Configurable flag. But the Lite is a subset of Full, so there are a lot of identical code lines, which we want to reduce.
My suggestion is to replace Full with Full* (the name can be a subject of discussion) which will contain the difference between Full and Lite - then there will be no code duplication. Then the Lite will be written always, by default, and Full* - only by user's request of one needs to save more information.
But I am not sure if it will be compatible with other tasks, and if it's OK to have two output tables instead of one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, sorry for the misunderstanding! In principle it is OK to have 2 tables instead of one, however it is not very user friendly for local processing (since the tree creator is meant to produce a flat tree for analysis). If you use O2 or python (e.g. pandas) is easy to join two "tables", but otherwise not much, so I would still keep the lite and full so that it's easier for less expert users (but honestly speaking I also don't know how many users use the full version..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not suggesting to do the factorisation in this PR, so I'm fine with the idea of a dedicated PR after the central features are merged.
It's the number of daughters in the resonant decay channel. constexpr std::size_t NDaughtersResonant{2u}; |
Done |
|
Error while checking build/O2Physics/o2 for 1df1a8e at 2025-04-23 11:55: Full log here. |
In this PR usage of KF Particle for 3 prong decay (in particular
Lc->PKPi) reconstruction was developed as well as some changes needed forLclifetime measurement were implemented:candidateSelectorLctask.treeCreatorLcToPKPitask.treeCreatorLcToPKPitask reduced to what is really needed according to the order of prongs in the candidate -PKPiorPiKP.