[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577
[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577alicja-pp wants to merge 2 commits into
Conversation
|
O2 linter results: ❌ 14 errors, |
|
Error while checking build/O2Physics/o2 for c7d9f65 at 2026-06-08 23:08: Full log here. |
|
Error while checking build/O2Physics/staging for c7d9f65 at 2026-06-08 23:09: Full log here. |
| mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); | ||
| mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); |
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.
| p1 = part2; | ||
| p2 = part1; | ||
| mass1 = mMassTwo; | ||
| mass2 = mMassOne; |
There was a problem hiding this comment.
There is std::swap for this.
| auto mass1 = mMassOne; | ||
| auto mass2 = mMassTwo; | ||
| if (randomizePair) { | ||
| TRandom2* randgen = new TRandom2(0); |
There was a problem hiding this comment.
Why do you need to create a new object in every call?
vkucera
left a comment
There was a problem hiding this comment.
Why is the same code duplicated across three files?
|
Closed in favor of: #16593 with less changes (no randomization in Core files, as it can be added in tasks easier, when needed). |
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