Skip to content

[PWGUD] use get track size and add flowMC#15679

Open
miedema-11 wants to merge 5 commits intoAliceO2Group:masterfrom
miedema-11:master
Open

[PWGUD] use get track size and add flowMC#15679
miedema-11 wants to merge 5 commits intoAliceO2Group:masterfrom
miedema-11:master

Conversation

@miedema-11
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

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

@github-actions github-actions bot changed the title use get track size and add flowMC [PWGUD] use get track size and add flowMC Apr 8, 2026
@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Apr 8, 2026

Error while checking build/O2Physics/o2 for 4eeefde at 2026-04-08 08:43:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowCorrelationsUpc.cxx:385:10: error: variable 'getTracksSize' set but not used [-Werror=unused-but-set-variable]
ninja: build stopped: subcommand failed.

Full log here.

@vkucera
Copy link
Copy Markdown
Collaborator

vkucera commented Apr 8, 2026

@miedema-11 This is a duplicate of #15626. Please do not do that. I made several suggestions on your previous PR which are now completely disconnected from this version and I have to visually compare both versions to see your implementation of my comments.

bool trackSelected(TTrack const& track)
{
// auto momentum = std::array<double, 3>{track.px(), track.py(), track.pz()};
double pt = track.pt();
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.

Don't change the type.

Comment on lines +130 to +146
LorentzVectorM pMC(mcParticle.px(), mcParticle.py(), mcParticle.pz(), 0); // double phi = RecoDecay::phi(momentum); // focus on bulk: e, mu, pi, k, p
int pdgCode = std::abs(mcParticle.pdgCode());
if (pdgCode == PDG_t::kElectron)
pMC.SetM(o2::constants::physics::MassElectron);
else if (pdgCode == PDG_t::kMuonMinus)
pMC.SetM(o2::constants::physics::MassMuon);
else if (pdgCode == PDG_t::kPiPlus)
pMC.SetM(o2::constants::physics::MassPionCharged);
else if (pdgCode == PDG_t::kKPlus)
pMC.SetM(o2::constants::physics::MassKaonCharged);
else if (pdgCode == PDG_t::kProton)
pMC.SetM(o2::constants::physics::MassProton);
else
continue;

double pt = pMC.Pt();
double eta = pMC.Eta();
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.

All this is completely useless. Transverse momentum and pseudorapidity do not depend on the mass.

Comment on lines +191 to +207
auto mcParticle = track.udMcParticle();
int pdgCode = std::abs(mcParticle.pdgCode());
if (pdgCode == PDG_t::kElectron)
recoMC.SetM(o2::constants::physics::MassElectron);
else if (pdgCode == PDG_t::kMuonMinus)
recoMC.SetM(o2::constants::physics::MassMuon);
else if (pdgCode == PDG_t::kPiPlus)
recoMC.SetM(o2::constants::physics::MassPionCharged);
else if (pdgCode == PDG_t::kKPlus)
recoMC.SetM(o2::constants::physics::MassKaonCharged);
else if (pdgCode == PDG_t::kProton)
recoMC.SetM(o2::constants::physics::MassProton);
else
continue;

double pt = recoMC.Pt();
double eta = recoMC.Eta();
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.

Same

@amatyja
Copy link
Copy Markdown
Collaborator

amatyja commented Apr 8, 2026

Hi @miedema-11,
Incorporate the corrections suggested by Vit, please.
Best regards
Adam

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.

4 participants