Skip to content

Commit b706c48

Browse files
authored
SoftMuonMvaRun3Estimator: use std::abs
1 parent 8e6dacc commit b706c48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PhysicsTools/PatAlgos/src/SoftMuonMvaRun3Estimator.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "DataFormats/PatCandidates/interface/Muon.h"
33
#include "PhysicsTools/XGBoost/interface/XGBooster.h"
44
#include "FWCore/Utilities/interface/isFinite.h"
5+
#include <cmath>
56

67
typedef std::pair<const reco::MuonChamberMatch*, const reco::MuonSegmentMatch*> MatchPair;
78

@@ -15,7 +16,7 @@ const MatchPair& getBetterMatch(const MatchPair& match1, const MatchPair& match2
1516
// For the rest compare local x match. We expect that
1617
// segments belong to the muon, so the difference in
1718
// local x is a reflection on how well we can measure it
18-
if (abs(match1.first->x - match1.second->x) > abs(match2.first->x - match2.second->x))
19+
if (std::abs(match1.first->x - match1.second->x) > std::abs(match2.first->x - match2.second->x))
1920
return match2;
2021

2122
return match1;

0 commit comments

Comments
 (0)