From dcdf62c803c6e74bdebb31cfbae0021aeaaa5a57 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 28 Jan 2020 12:29:24 +0100 Subject: [PATCH] [LLVM 9] Fixed build errors --- .../MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h | 2 +- .../ElectronTools/interface/EnergyScaleCorrection_class.h | 2 +- HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc | 2 +- RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc | 2 +- RecoTauTag/RecoTau/plugins/DPFIsolation.cc | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h index cfa1b9e37bafb..4ebf978656a6c 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h +++ b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h @@ -169,7 +169,7 @@ class MillePedeFileReader { const std::array coord_str = {{"X", "Y", "Z", "theta_X", "theta_Y", "theta_Z", "extra_DOF", "none"}}; inline std::ostream& operator<<(std::ostream& os, const AlignPCLThresholds::coordType& c) { - if (c >= AlignPCLThresholds::endOfTypes || c < 0) + if (c >= AlignPCLThresholds::endOfTypes || c < AlignPCLThresholds::X) return os << "unrecongnized coordinate"; return os << coord_str[c]; } diff --git a/EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h b/EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h index 6f5db19db3c85..3798b6e4e73ed 100644 --- a/EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h +++ b/EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h @@ -192,7 +192,7 @@ class EnergyScaleCorrection_class { void ReadSmearingFromFile(TString filename); ///< File structure: category constTerm alpha; public: inline void SetSmearingType(fileFormat_t value) { - if (value >= 0 && value <= 1) { + if (value <= 1) { smearingType_ = value; } else { smearingType_ = UNKNOWN; diff --git a/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc b/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc index 95be4590c6f9c..a5d7823406307 100644 --- a/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc +++ b/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc @@ -162,7 +162,7 @@ bool HLTJetSortedVBFFilter::hltFilter(edm::Event& event, nJet++; // cout << "jetPt=" << jet->pt() << "\tjetEta=" << jet->eta() << "\tjetCSV=" << value << endl; } - if (b1_idx >= sorted.size() || b1_idx < 0) + if (b1_idx >= sorted.size()) edm::LogError("OutOfRange") << "b1 index out of range."; sorted.erase(sorted.begin() + b1_idx); //remove the most b-tagged jet from "sorted" sort(sorted.begin(), sorted.end(), comparator); //sort "sorted" by eta diff --git a/RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc b/RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc index f1833c112068e..a5c2955fb27ce 100644 --- a/RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc +++ b/RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc @@ -171,7 +171,7 @@ void EnergyScaleCorrection::addSmearing(const std::string& category, } void EnergyScaleCorrection::setSmearingType(FileFormat value) { - if (value >= 0 && value <= 1) { + if (value <= 1) { smearingType_ = value; } else { smearingType_ = UNKNOWN; diff --git a/RecoTauTag/RecoTau/plugins/DPFIsolation.cc b/RecoTauTag/RecoTau/plugins/DPFIsolation.cc index 609a0bcf1235d..45e1dadb181b9 100644 --- a/RecoTauTag/RecoTau/plugins/DPFIsolation.cc +++ b/RecoTauTag/RecoTau/plugins/DPFIsolation.cc @@ -168,8 +168,6 @@ class DPFIsolation : public deep_tau::DeepTauBase { if (p.pt() < 0.5) continue; - if (p.fromPV() < 0) - continue; if (deltaR_tau_p > 0.5) continue; if (p.fromPV() < 1 && p.charge() != 0)