[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577
Open
alicja-pp wants to merge 2 commits into
Open
[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577alicja-pp wants to merge 2 commits into
alicja-pp wants to merge 2 commits into
Conversation
|
O2 linter results: ❌ 14 errors, |
Collaborator
|
Error while checking build/O2Physics/o2 for c7d9f65 at 2026-06-08 23:08: Full log here. |
Collaborator
|
Error while checking build/O2Physics/staging for c7d9f65 at 2026-06-08 23:09: Full log here. |
vkucera
reviewed
Jun 8, 2026
Comment on lines
161
to
162
| mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); | ||
| mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); |
Collaborator
There was a problem hiding this comment.
@prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
These have been sitting here for three years. Please take action to fix them.
vkucera
reviewed
Jun 8, 2026
Comment on lines
+246
to
+249
| p1 = part2; | ||
| p2 = part1; | ||
| mass1 = mMassTwo; | ||
| mass2 = mMassOne; |
Collaborator
There was a problem hiding this comment.
There is std::swap for this.
vkucera
reviewed
Jun 8, 2026
| auto mass1 = mMassOne; | ||
| auto mass2 = mMassTwo; | ||
| if (randomizePair) { | ||
| TRandom2* randgen = new TRandom2(0); |
Collaborator
There was a problem hiding this comment.
Why do you need to create a new object in every call?
vkucera
reviewed
Jun 8, 2026
vkucera
left a comment
Collaborator
There was a problem hiding this comment.
Why is the same code duplicated across three files?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h,FemtoUniverseFemtoContainer.handFemtoUniversePairSHCentMultKt.h:add optional randomization of part1 and part2 before filling pair histograms
PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:add option to fill only primary MC pairs in MC histograms
PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h:fix harcoded
setPionPairMass()intosetPDGCodesthat sets masses according to configurablePWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxxandfemtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx:apply changes from the core files