Skip to content
Merged
Show file tree
Hide file tree
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/Core/JetBkgSubUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,35 +119,35 @@
double dEta = 999.;
double PerpendicularConeAxisPhi1 = 999., PerpendicularConeAxisPhi2 = 999.;
// build 2 perp cones in phi around the leading jet (right and left of the jet)
PerpendicularConeAxisPhi1 = RecoDecay::constrainAngle<double, double>(leadingJet.phi() + (M_PI / 2.)); // This will contrain the angel between 0-2Pi

Check failure on line 122 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
PerpendicularConeAxisPhi2 = RecoDecay::constrainAngle<double, double>(leadingJet.phi() - (M_PI / 2.)); // This will contrain the angel between 0-2Pi

Check failure on line 123 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.

for (auto& particle : inputParticles) {
// sum the momentum of all paricles that fill the two cones
dPhi1 = particle.phi() - PerpendicularConeAxisPhi1;
dPhi1 = RecoDecay::constrainAngle<double, double>(dPhi1, -M_PI); // This will contrain the angel between -pi & Pi

Check failure on line 128 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
dPhi2 = particle.phi() - PerpendicularConeAxisPhi2;
dPhi2 = RecoDecay::constrainAngle<double, double>(dPhi2, -M_PI); // This will contrain the angel between -pi & Pi

Check failure on line 130 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
dEta = leadingJet.eta() - particle.eta(); // The perp cone eta is the same as the leading jet since the cones are perpendicular only in phi
if (TMath::Sqrt(dPhi1 * dPhi1 + dEta * dEta) <= jetBkgR) {

Check failure on line 132 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
perpPtDensity1 += particle.perp();
perpMdDensity1 += TMath::Sqrt(particle.m() * particle.m() + particle.pt() * particle.pt()) - particle.pt();

Check failure on line 134 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}

if (TMath::Sqrt(dPhi2 * dPhi2 + dEta * dEta) <= jetBkgR) {

Check failure on line 137 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
perpPtDensity2 += particle.perp();
perpMdDensity2 += TMath::Sqrt(particle.m() * particle.m() + particle.pt() * particle.pt()) - particle.pt();

Check failure on line 139 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}
}

// Caculate rho as the ratio of average pT of the two cones / the cone area
double perpPtDensity = (perpPtDensity1 + perpPtDensity2) / (2 * M_PI * jetBkgR * jetBkgR);

Check failure on line 144 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
double perpMdDensity = (perpMdDensity1 + perpMdDensity2) / (2 * M_PI * jetBkgR * jetBkgR);

return std::make_tuple(perpPtDensity, perpMdDensity);
}

fastjet::PseudoJet JetBkgSubUtils::doRhoAreaSub(fastjet::PseudoJet& jet, double rhoParam, double rhoMParam)
fastjet::PseudoJet JetBkgSubUtils::doRhoAreaSub(const fastjet::PseudoJet& jet, double rhoParam, double rhoMParam)
{

fastjet::Subtractor sub = fastjet::Subtractor(rhoParam, rhoMParam);
Expand Down Expand Up @@ -207,7 +207,7 @@
// Refere to https://arxiv.org/abs/1211.2811 for the rhoM caclulation
double sum(0);
for (auto constituent : jet.constituents()) {
sum += TMath::Sqrt(constituent.m() * constituent.m() + constituent.pt() * constituent.pt()) - constituent.pt();

Check failure on line 210 in PWGJE/Core/JetBkgSubUtils.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}

return sum;
Expand Down
2 changes: 1 addition & 1 deletion PWGJE/Core/JetBkgSubUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class JetBkgSubUtils
/// @param rhoParam the underlying evvent density vs pT (to be set)
/// @param rhoParam the underlying evvent density vs jet mass (to be set)
/// @return jet, background subtracted jet
fastjet::PseudoJet doRhoAreaSub(fastjet::PseudoJet& jet, double rhoParam, double rhoMParam);
fastjet::PseudoJet doRhoAreaSub(const fastjet::PseudoJet& jet, double rhoParam, double rhoMParam);

/// @brief method that subtracts the background from the input particles using the event-wise cosntituent subtractor
/// @param inputParticles (all the tracks/clusters/particles in the event)
Expand Down
Loading