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, ⚠️ 2 warnings, 🔕 4 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.

amatyja
amatyja previously approved these changes Apr 8, 2026
@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will it be fine if I use auto type here?

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.

Yes

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi, you suggested to use the mcparticle.eta(), but it seems that it is not included the table. So I used these codes taking reference from other ud task.
has no member named 'eta'; did you mean 'beta'?
191 | double eta = track.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.

Indeed. I got confused by your subscription to McParticles which is not referring to the table in the central data model. My point about mass still holds though.
For the eta calculation, you can just use a RecoDecay method.
A more general improvement would be to add dynamic columns in the UD tables for the missing variables.

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

@miedema-11
Copy link
Copy Markdown
Contributor Author

@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.

Not exactly, I also modify the flowcorrelationupc.cxx, so I open a new one to avoid conflict. And I already corrected the code according to your comment. Maybe I haven't done it correctly?


double epsilon = 1e-6;

using McParticles = soa::Join<aod::UDMcParticles, aod::UDMcTrackLabels>;
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.

This is very misleading. McParticles is a table in the central data model.

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