diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc index 0f406b32c47bf..313edab08c9e2 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc @@ -589,7 +589,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, sl3 = 0; for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end(); ++SL3metaPrimitive, sl3++) { - if (useFitSL3[sl3]) + [[clang::suppress]] if (useFitSL3[sl3]) continue; if ((at_least_one_correlation == false || clean_chi2_correlation_) && allow_confirmation_) { //no correlation was found, trying with pairs of two digis in the other SL @@ -841,7 +841,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, sl1 = 0; for (auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end(); ++SL1metaPrimitive, sl1++) { - if (useFitSL1[sl1]) + [[clang::suppress]] if (useFitSL1[sl1]) continue; DTSuperLayerId SLId(SL1metaPrimitive->rawId); @@ -902,7 +902,7 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, sl3 = 0; for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end(); ++SL3metaPrimitive, sl3++) { - if (useFitSL3[sl3]) + [[clang::suppress]] if (useFitSL3[sl3]) continue; DTSuperLayerId SLId(SL3metaPrimitive->rawId); DTChamberId(SLId.wheel(), SLId.station(), SLId.sector()); @@ -1008,12 +1008,12 @@ void MuonPathAssociator::removeSharingFits(vector &chamberMPaths, for (unsigned int i = 0; i < chamberMPaths.size(); i++) { if (debug_) LogDebug("MuonPathAssociator") << "Looking at prim" << i; - if (!useFit[i]) + [[clang:suppress]] if (!useFit[i]) continue; for (unsigned int j = i + 1; j < chamberMPaths.size(); j++) { if (debug_) LogDebug("MuonPathAssociator") << "Comparing with prim " << j; - if (!useFit[j]) + [[clang::suppress]] if (!useFit[j]) continue; metaPrimitive first = chamberMPaths[i]; metaPrimitive second = chamberMPaths[j]; diff --git a/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc b/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc index d27ff1363b7ec..ee56c6504c87f 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc @@ -374,9 +374,9 @@ void DTTSPhi::runTSPhi() { ntsm[is - 1 - DTConfigTSPhi::NSTEPF][i_tsmd] > 0) { // it means that the last BX with sort 2 was not the // previous one - existSecondPrevBx = - ((is - 1 - DTConfigTSPhi::NSTEPF >= 0) && (ntsm[is - 1 - DTConfigTSPhi::NSTEPF][i_tsmd] > 1) && - (secondPrevBx->tracoTr()->code() > 0)); + existSecondPrevBx = secondPrevBx && ((is - 1 - DTConfigTSPhi::NSTEPF >= 0) && + (ntsm[is - 1 - DTConfigTSPhi::NSTEPF][i_tsmd] > 1) && + (secondPrevBx->tracoTr()->code() > 0)); if (existSecondPrevBx) { _cache.push_back(DTChambPhSegm(ChamberId(), is - 1, secondPrevBx->tracoTr(), 2)); diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.cc b/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.cc index bda11701a2c98..15d29f941ef73 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.cc @@ -12,6 +12,7 @@ #include "DataFormats/L1TCalorimeter/interface/CaloRegion.h" #include "FWCore/Framework/interface/ESHandle.h" +#include #include namespace { @@ -54,7 +55,7 @@ namespace { 3.750, 4.250, 4.750}; - if (etaIndex < 11) { + if (0 <= etaIndex && etaIndex < 11) { return -rgnEtaValues[-(etaIndex - 10)]; // 0-10 are negative eta values } else if (etaIndex < 22) { return rgnEtaValues[etaIndex - 11]; // 11-21 are positive eta values diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpPP.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpPP.cc index e3658a365aeb6..62ede41e91675 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpPP.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpPP.cc @@ -168,6 +168,7 @@ int l1t::Stage1Layer2EtSumAlgorithmImpPP::DiJetPhi(const std::vector* uint16_t l1t::Stage1Layer2EtSumAlgorithmImpPP::MHToverHT(uint16_t num, uint16_t den) const { uint16_t result; uint32_t numerator(num), denominator(den); + assert(den != 0); if (numerator == denominator) result = 0x7f; diff --git a/L1Trigger/L1THGCal/src/HGCalVFECompressionImpl.cc b/L1Trigger/L1THGCal/src/HGCalVFECompressionImpl.cc index fa82e2f6cec7f..f055c8d8a99a3 100644 --- a/L1Trigger/L1THGCal/src/HGCalVFECompressionImpl.cc +++ b/L1Trigger/L1THGCal/src/HGCalVFECompressionImpl.cc @@ -40,6 +40,7 @@ void HGCalVFECompressionImpl::compressSingle(const uint64_t value, // build exponent and mantissa const uint32_t exponent = bitlen - mantissaBits_; + assert(exponent - 1 < 64); const uint64_t mantissa = (shifted_value >> (exponent - 1)) & ~(1ULL << mantissaBits_); // assemble floating-point diff --git a/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc b/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc index af5f9c58be072..c3679b1b25fb7 100644 --- a/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc +++ b/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc @@ -84,7 +84,7 @@ void HGCalClusteringImpl::clusterizeDR(const std::vector= 0) clustersTmp.at(targetClu).addConstituent(*tc); @@ -298,7 +298,7 @@ void HGCalClusteringImpl::clusterizeDRNN(const std::vectormipPt() < threshold) continue; - if (isSeed[itc]) + [[clang::suppress]] if (isSeed[itc]) continue; //No sharing of seeds between clusters (TBC) /* searching for TC near the centre of the cluster */ diff --git a/L1Trigger/L1TMuonOverlap/interface/AlgoMuon.h b/L1Trigger/L1TMuonOverlap/interface/AlgoMuon.h index 3a3ada24e0b50..92c91f43cbd42 100644 --- a/L1Trigger/L1TMuonOverlap/interface/AlgoMuon.h +++ b/L1Trigger/L1TMuonOverlap/interface/AlgoMuon.h @@ -35,6 +35,7 @@ class AlgoMuon { m_bx(bx), m_pt(pt), m_charge(charge), + m_phiRHit(9999), m_patNumb(999), m_rhitNumb(999) {}