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
1 change: 0 additions & 1 deletion PWGJE/Tasks/gammaJetTreeProducer.cxx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// \file gammaJetTreeProducer.cxx
/// \brief Task to produce a tree for gamma-jet analysis, including photons (and information of isolation) and charged jets
/// \author Florian Jonas <florian.jonas@cern.ch>, UC Berkeley/LBNL
/// \since 02.08.2024
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".

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

View workflow job for this annotation

GitHub Actions / PR formatting / copyright headers

Missing or malformed copyright notice

This source file is missing the correct copyright notice.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
Expand Down Expand Up @@ -233,7 +233,7 @@

// if the track type is aod::JetTracks, we need to build the kd tree for the tracks
if constexpr (std::is_same_v<typename std::decay_t<T>, aod::JetTracks>) {
for (auto track : objects) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!isTrackSelected(track)) {
continue;
}
Expand All @@ -251,7 +251,7 @@
}
// if the track type is aod::JetParticles, we need to build the kd tree for the mc particles
if constexpr (std::is_same_v<typename std::decay_t<T>, aod::JetParticles>) {
for (auto particle : objects) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!particle.isPhysicalPrimary()) {
continue;
}
Expand Down Expand Up @@ -394,8 +394,8 @@
double cPhi = TVector2::Phi_0_2pi(object.phi());

// rotate cone left by 90 degrees
float cPhiLeft = cPhi - o2::constants::math::PI / 2;

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.
float cPhiRight = cPhi + o2::constants::math::PI / 2;

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

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

float pointLeft[2] = {object.eta(), cPhiLeft};
float pointRight[2] = {object.eta(), cPhiRight};
Expand Down Expand Up @@ -529,7 +529,7 @@
if (particle.pdgCode() == PDG_t::kGamma && particle.isPhysicalPrimary() && std::abs(particle.getGenStatusCode()) >= 90) {
// check if it has mothers that are pi0s
const auto& mothers = particle.template mothers_as<aod::JMcParticles>();
for (auto mother : mothers) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (mother.pdgCode() == PDG_t::kPi0) {
return true;
}
Expand All @@ -546,8 +546,8 @@
if (particle.pdgCode() == PDG_t::kGamma && particle.isPhysicalPrimary() && std::abs(particle.getGenStatusCode()) >= 90) {
// check if it has mothers that are etas
const auto& mothers = particle.template mothers_as<aod::JMcParticles>();
for (auto mother : mothers) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (mother.pdgCode() == 221) {

Check failure on line 550 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 @@ -563,8 +563,8 @@
if (particle.pdgCode() == PDG_t::kGamma && particle.isPhysicalPrimary() && std::abs(particle.getGenStatusCode()) >= 90) {
// check if you find a pi0 mother or a eta mother
const auto& mothers = particle.template mothers_as<aod::JMcParticles>();
for (auto mother : mothers) {

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

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (mother.pdgCode() == PDG_t::kPi0 || mother.pdgCode() == 221) {

Check failure on line 567 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 @@ -924,7 +924,7 @@
if (!particle.isPhysicalPrimary()) {
continue;
}
if (particle.pdgCode() != 22) {

Check failure on line 927 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.
continue;
}
mHistograms.fill(HIST("numberRecCollisionsVsPhotonPt"), nRecCollisions, particle.pt());
Expand Down Expand Up @@ -1313,4 +1313,3 @@
adaptAnalysisTask<GammaJetTreeProducer>(cfgc, TaskName{"gamma-jet-tree-producer"})};
return workflow;
}

Loading