Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGJE] Please consider the following formatting changes to #9084 #15

Merged
merged 1 commit into from
Jan 21, 2025
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
4 changes: 1 addition & 3 deletions PWGJE/Tasks/fullJetSpectraPP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/// \author Archita Rani Dash <[email protected]>
#include <vector>
#include <iostream>

Check warning on line 19 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Including iostream is discouraged. Use O2 logging instead.
#include <utility>

#include "CommonConstants/PhysicsConstants.h"
Expand Down Expand Up @@ -158,7 +158,7 @@
}
auto jetRadiiBins = (std::vector<double>)jetRadii;
if (jetRadiiBins.size() > 1) {
jetRadiiBins.push_back(jetRadiiBins[jetRadiiBins.size() - 1] + (TMath::Abs(jetRadiiBins[jetRadiiBins.size() - 1] - jetRadiiBins[jetRadiiBins.size() - 2])));

Check warning on line 161 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
} else {
jetRadiiBins.push_back(jetRadiiBins[jetRadiiBins.size() - 1] + 0.1);
}
Expand Down Expand Up @@ -340,13 +340,13 @@
{

if (jetAreaFractionMin > -98.0) {
if (jet.area() < jetAreaFractionMin * M_PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {

Check warning on line 343 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.
return false;
}
}
if (leadingConstituentPtMin > -98.0) {
bool isMinleadingConstituent = false;
for (auto& constituent : jet.template tracks_as<T>()) {

Check warning on line 349 in PWGJE/Tasks/fullJetSpectraPP.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 (constituent.pt() >= leadingConstituentPtMin) {
isMinleadingConstituent = true;
break;
Expand All @@ -373,7 +373,7 @@
// }
registry.fill(HIST("h2_jet_etaphi"), jet.eta(), jet.phi(), weight);

for (auto& cluster : jet.template clusters_as<aod::JetClusters>()) {

Check warning on line 376 in PWGJE/Tasks/fullJetSpectraPP.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.
registry.fill(HIST("h2_full_jet_neutralconstituents"), jet.pt(), jet.clustersIds().size(), weight);

neutralEnergy += cluster.energy();
Expand All @@ -383,12 +383,11 @@
registry.fill(HIST("h_full_jet_neutralconstituents_phi"), cluster.phi(), weight);
registry.fill(HIST("h_full_jet_neutralconstituents_energy"), cluster.energy(), weight);
registry.fill(HIST("h_full_jet_neutralconstituents_energysum"), neutralEnergy, weight);

}
auto NEF = neutralEnergy / jet.energy();
registry.fill(HIST("h2_full_jet_NEF"), jet.pt(), NEF, weight);

for (auto& jettrack : jet.template tracks_as<aod::JetTracks>()) {

Check warning on line 390 in PWGJE/Tasks/fullJetSpectraPP.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.
sumtrackE += jettrack.energy();

registry.fill(HIST("h_Detjet_ntracks"), jettrack.pt(), weight);
Expand All @@ -413,7 +412,7 @@
{
float neutralEnergy = 0.0;
if (jet.r() == round(selectedJetsRadius * 100.0f)) {
for (auto& cluster : jet.template clusters_as<aod::JetClusters>()) {

Check warning on line 415 in PWGJE/Tasks/fullJetSpectraPP.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.
neutralEnergy += cluster.energy();
}
auto NEF = neutralEnergy / jet.energy();
Expand All @@ -437,7 +436,7 @@
// }
registry.fill(HIST("h2_jet_etaphi_part"), jet.eta(), jet.phi(), weight);

for (auto& constituent : jet.template tracks_as<aod::JetParticles>()) {

Check warning on line 439 in PWGJE/Tasks/fullJetSpectraPP.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.
auto pdgParticle = pdgDatabase->GetParticle(constituent.pdgCode());
if (pdgParticle->Charge() == 0) {
neutralconsts++;
Expand All @@ -450,7 +449,6 @@
registry.fill(HIST("h_full_jet_neutralconstituents_energy_part"), constituent.e(), weight);
registry.fill(HIST("h_full_jet_neutralconstituents_energysum_part"), neutralEnergy, weight);


} else {
chargedconsts++;
registry.fill(HIST("h2_full_jet_chargedconstituents_part"), jet.pt(), chargedconsts, weight); // charged jet constituents at particle level
Expand Down Expand Up @@ -502,7 +500,7 @@
registry.fill(HIST("h_full_matchedmcdjet_ntracks"), jetBase.tracksIds().size(), weight);
registry.fill(HIST("h2_matchedjet_etaphiDet"), jetBase.eta(), jetBase.phi(), weight);

for (auto& jetTag : jetBase.template matchedJetGeo_as<std::decay_t<U>>()) {

Check warning on line 503 in PWGJE/Tasks/fullJetSpectraPP.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.

auto deltaEta = jetBase.eta() - jetTag.eta();
auto deltaPhi = jetBase.phi() - jetTag.phi();
Expand Down Expand Up @@ -717,7 +715,7 @@
return;
}
// std::cout << jet.eventWeight() << std::endl;
if (doMBGapTrigger && jet.eventWeight()== 1) {
if (doMBGapTrigger && jet.eventWeight() == 1) {
return;
// std::cout << jet.eventWeight() << std::endl;
}
Expand Down Expand Up @@ -773,7 +771,7 @@
int fakemcdjet = 0;
int fakemcpjet = 0;

if (fabs(collision.posZ()) > VertexZCut) { // making double sure this condition is satisfied

Check warning on line 774 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
if (!collision.has_mcCollision()) {
Expand Down
Loading