Skip to content

Commit bf21e2c

Browse files
committed
[PWGJE] Fix: make doRhoAreaSub take const reference to avoid unnecessary copy
1 parent d00c74d commit bf21e2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PWGJE/Core/JetBkgSubUtils.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ std::tuple<double, double> JetBkgSubUtils::estimateRhoPerpCone(const std::vector
147147
return std::make_tuple(perpPtDensity, perpMdDensity);
148148
}
149149

150-
fastjet::PseudoJet JetBkgSubUtils::doRhoAreaSub(fastjet::PseudoJet& jet, double rhoParam, double rhoMParam)
150+
fastjet::PseudoJet JetBkgSubUtils::doRhoAreaSub(const fastjet::PseudoJet& jet, double rhoParam, double rhoMParam)
151151
{
152152

153153
fastjet::Subtractor sub = fastjet::Subtractor(rhoParam, rhoMParam);

PWGJE/Core/JetBkgSubUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class JetBkgSubUtils
8686
/// @param rhoParam the underlying evvent density vs pT (to be set)
8787
/// @param rhoParam the underlying evvent density vs jet mass (to be set)
8888
/// @return jet, background subtracted jet
89-
fastjet::PseudoJet doRhoAreaSub(fastjet::PseudoJet& jet, double rhoParam, double rhoMParam);
89+
fastjet::PseudoJet doRhoAreaSub(const fastjet::PseudoJet& jet, double rhoParam, double rhoMParam);
9090

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

0 commit comments

Comments
 (0)