Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PWGJE/Tasks/gammaJetTreeProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@
trackSourceIndex.push_back(originalIndex);
if (phi <= (maxMatchingDistance + additionalMargin)) {
trackEta.push_back(track.eta());
trackPhi.push_back(phi + o2::constants::math::TwoPI);

Check failure on line 291 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
trackPt.push_back(track.pt());
trackSourceIndex.push_back(originalIndex);
}
if (phi >= (o2::constants::math::TwoPI - (maxMatchingDistance + additionalMargin))) {
trackEta.push_back(track.eta());
trackPhi.push_back(phi - o2::constants::math::TwoPI);

Check failure on line 297 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
trackPt.push_back(track.pt());
trackSourceIndex.push_back(originalIndex);
}
Expand Down Expand Up @@ -337,13 +337,13 @@
mcParticleSourceIndex.push_back(originalIndex);
if (phi <= (maxMatchingDistance + additionalMargin)) {
mcParticleEta.push_back(particle.eta());
mcParticlePhi.push_back(phi + o2::constants::math::TwoPI);

Check failure on line 340 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
mcParticlePt.push_back(particle.pt());
mcParticleSourceIndex.push_back(originalIndex);
}
if (phi >= (o2::constants::math::TwoPI - (maxMatchingDistance + additionalMargin))) {
mcParticleEta.push_back(particle.eta());
mcParticlePhi.push_back(phi - o2::constants::math::TwoPI);

Check failure on line 346 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
mcParticlePt.push_back(particle.pt());
mcParticleSourceIndex.push_back(originalIndex);
}
Expand Down Expand Up @@ -583,7 +583,7 @@
int selectedMother = -1;
if (mothers.size() == 1) {
selectedMother = 0;
} else if (mothers.size() == 2 &&

Check failure on line 586 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mothers[0].globalIndex() == mothers[1].globalIndex() &&
mothers[0].pdgCode() == mothers[1].pdgCode() &&
mothers[0].getGenStatusCode() == mothers[1].getGenStatusCode()) {
Expand Down Expand Up @@ -614,7 +614,7 @@
int selectedMother = -1;
if (mothers.size() == 1) {
selectedMother = 0;
} else if (mothers.size() == 2) {

Check failure on line 617 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
twoMothersIdentical = (mothers[0].globalIndex() == mothers[1].globalIndex() &&
mothers[0].pdgCode() == mothers[1].pdgCode() &&
mothers[0].getGenStatusCode() == mothers[1].getGenStatusCode());
Expand All @@ -630,7 +630,7 @@
twoMothersIdentical = false;
if (mothers.size() == 1) {
selectedMother = 0;
} else if (mothers.size() == 2) {

Check failure on line 633 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
twoMothersIdentical = (mothers[0].globalIndex() == mothers[1].globalIndex() &&
mothers[0].pdgCode() == mothers[1].pdgCode() &&
mothers[0].getGenStatusCode() == mothers[1].getGenStatusCode());
Expand All @@ -647,7 +647,7 @@
/// \return true if particle is a prompt photon, false otherwise
bool isPromptPhoton(const auto& particle)
{
if (particle.pdgCode() == PDG_t::kGamma && particle.isPhysicalPrimary() && std::abs(particle.getGenStatusCode()) < 90) {

Check failure on line 650 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
return false;
Expand Down Expand Up @@ -718,7 +718,7 @@
// check if it has mothers that are etas
const auto& mothers = particle.template mothers_as<aod::JMcParticles>();
for (const auto& mother : mothers) {
if (mother.pdgCode() == 221) {

Check failure on line 721 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
return true;
}
}
Expand All @@ -735,7 +735,7 @@
// check if you find a pi0 mother or a eta mother
const auto& mothers = particle.template mothers_as<aod::JMcParticles>();
for (const auto& mother : mothers) {
if (mother.pdgCode() == PDG_t::kPi0 || mother.pdgCode() == 221) {

Check failure on line 738 in PWGJE/Tasks/gammaJetTreeProducer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
return false;
}
}
Expand Down Expand Up @@ -1442,7 +1442,7 @@
mcParticlesTable(storedColIndex, particle.energy(), particle.eta(), particle.phi(), particle.pt(), particle.pdgCode(), mcIsolation, origin);

// DEBUGGING for photons. If it is a photon, print the origin and then print the chain
// leaving this in here
// leaving this in here
// if (particle.pdgCode() == PDG_t::kGamma) {
// LOG(info) << "Particle PDG: " << particle.pdgCode() << " isPhysicalPrimary: " << particle.isPhysicalPrimary() << " getGenStatusCode: " << particle.getGenStatusCode();
// LOG(info) << "Origin: " << "kPromptPhoton (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kPromptPhoton))) << "), kDirectPromptPhoton (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kDirectPromptPhoton))) << "), kFragmentationPhoton (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kFragmentationPhoton))) << "), kDecayPhoton (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kDecayPhoton))) << "), kDecayPhotonPi0 (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kDecayPhotonPi0))) << "), kDecayPhotonEta (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kDecayPhotonEta))) << "), kDecayPhotonOther (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kDecayPhotonOther))) << "), kPi0 (" << (origin & (1 << static_cast<uint16_t>(gjanalysis::ParticleOrigin::kPi0))) << ")";
Expand Down
Loading