Skip to content

[PWGUD] MC analysis for flow#15626

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

[PWGUD] MC analysis for flow#15626
miedema-11 wants to merge 6 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 2, 2026

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

@github-actions github-actions bot changed the title MC analysis for flow [PWGUD] MC analysis for flow Apr 2, 2026
@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Apr 2, 2026

Error while checking build/O2Physics/o2 for fc7b1e9 at 2026-04-02 15:31:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowMcUpc.cxx:131:16: error: unused variable 'phi' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowMcUpc.cxx:171:14: error: unused variable 'phi' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowMcUpc.cxx:95:33: error: unused parameter 'collision' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@miedema-11 miedema-11 marked this pull request as ready for review April 2, 2026 14:37
@miedema-11 miedema-11 marked this pull request as draft April 2, 2026 15:36
Comment out the calculation of phi for mcParticles and tracks.
@miedema-11 miedema-11 marked this pull request as ready for review April 2, 2026 16:41
@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Apr 2, 2026

Error while checking build/O2Physics/o2 for aad8ae2 at 2026-04-02 21:12:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowMcUpc.cxx:129:16: error: unused variable 'phi' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGUD/Tasks/flowMcUpc.cxx:169:14: error: unused variable 'phi' [-Werror=unused-variable]
ninja: build stopped: subcommand failed.

Full log here.

@miedema-11
Copy link
Copy Markdown
Contributor Author

sorry for this error, but I am not sure what to do about the CMakeList.cxx

@miedema-11
Copy link
Copy Markdown
Contributor Author

If it is caused by my code, please let me know. Thank you so much

@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Apr 3, 2026

Error while checking build/O2Physics/o2 for f179a75 at 2026-04-03 19:36:

No log files found

Full log here.

@rolavick
Copy link
Copy Markdown
Collaborator

rolavick commented Apr 6, 2026

Dear @miedema-11,
you can ignore the CMAKELIST errors, they are not related to your changes. I have another question. In your new file, do you follow the same convention for your headers as in the other files? (usage of <> and "")
Roman

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 don't you fix the error instead of disabling it?

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.

Magic bit numbers.

#include "ReconstructionDataFormats/Track.h"
#include <CCDB/BasicCCDBManager.h>

#include <TF1.h>
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.

I don't see any mention of TF1. How did you verify that you included what you used?

#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/ASoAHelpers.h"
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.

Wrong format.

// }

template <typename TTrack>
bool trackSelected(TTrack track)
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 copy tracks.

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

Use track.pt().


for (auto const& mcParticle : mcParticles) {
auto momentum = std::array<double, 3>{mcParticle.px(), mcParticle.py(), mcParticle.pz()};
double pt = RecoDecay::pt(momentum);
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.

Use mcParticle.pt().

auto momentum = std::array<double, 3>{mcParticle.px(), mcParticle.py(), mcParticle.pz()};
double pt = RecoDecay::pt(momentum);
// double phi = RecoDecay::phi(momentum);
double eta = RecoDecay::eta(momentum);
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.

Use mcParticle.eta().

double eta = RecoDecay::eta(momentum);
// focus on bulk: e, mu, pi, k, p
int pdgCode = std::abs(mcParticle.pdgCode());
if (pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
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.

Suggested change
if (pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
if (pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != PDG_t::kKPlus && pdgCode != PDG_t::kProton)

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