Skip to content

[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577

Open
alicja-pp wants to merge 2 commits into
AliceO2Group:masterfrom
alicja-pp:femtouniverse_pair
Open

[PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass#16577
alicja-pp wants to merge 2 commits into
AliceO2Group:masterfrom
alicja-pp:femtouniverse_pair

Conversation

@alicja-pp

Copy link
Copy Markdown
Contributor

PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h, FemtoUniverseFemtoContainer.h and FemtoUniversePairSHCentMultKt.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() into setPDGCodes that sets masses according to configurable

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx and femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx:
apply changes from the core files

@github-actions github-actions Bot added the pwgcf label Jun 8, 2026
@github-actions github-actions Bot changed the title FemtoUniverse: Add pair randomization, fix hardcoded pion mass [PWGCF] FemtoUniverse: Add pair randomization, fix hardcoded pion mass Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

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

@alibuild

alibuild commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for c7d9f65 at 2026-06-08 23:08:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for c7d9f65 at 2026-06-08 23:09:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h:246:124: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
ninja: build stopped: subcommand failed.

Full log here.

Comment on lines 161 to 162
mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass();
mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@prchakra @lgraczykCern @majanik @lauraser @dimihayl @victor-gonzalez @shouqiye @wrzesaCERN
These have been sitting here for three years. Please take action to fix them.

Comment on lines +246 to +249
p1 = part2;
p2 = part1;
mass1 = mMassTwo;
mass2 = mMassOne;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is std::swap for this.

auto mass1 = mMassOne;
auto mass2 = mMassTwo;
if (randomizePair) {
TRandom2* randgen = new TRandom2(0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do you need to create a new object in every call?

@vkucera vkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is the same code duplicated across three files?

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.

3 participants