diff --git a/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalPerEvtLaserAnalyzer.cc b/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalPerEvtLaserAnalyzer.cc index 62435ff7bd54c..004fa2c3e4624 100644 --- a/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalPerEvtLaserAnalyzer.cc +++ b/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalPerEvtLaserAnalyzer.cc @@ -401,7 +401,7 @@ void EcalPerEvtLaserAnalyzer::analyze(const edm::Event& e, const edm::EventSetup if (i == 0) adcGain = adcG[i]; if (i > 0) - adcGain = TMath::Max(adcG[i], adcGain); + adcGain = std::max(adcG[i], adcGain); if (adc[i] > adcmax) { adcmax = adc[i]; @@ -485,7 +485,7 @@ void EcalPerEvtLaserAnalyzer::analyze(const edm::Event& e, const edm::EventSetup if (i == 0) adcGain = adcG[i]; if (i > 0) - adcGain = TMath::Max(adcG[i], adcGain); + adcGain = std::max(adcG[i], adcGain); if (adc[i] > adcmax) { adcmax = adc[i]; diff --git a/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalTestPulseAnalyzer.cc b/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalTestPulseAnalyzer.cc index 01859d807c5d9..8356e04218af0 100644 --- a/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalTestPulseAnalyzer.cc +++ b/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalTestPulseAnalyzer.cc @@ -12,6 +12,7 @@ #include #include +#include #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -323,7 +324,7 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& if (samId == 0) pngain = pnG[samId]; if (samId > 0) - pngain = TMath::Max(pnG[samId], pngain); + pngain = std::max(pnG[samId], pngain); } for (dsum = 0., k = 0; k < _presamplePN; k++) { @@ -430,7 +431,7 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& if (i == 0) adcgain = adcG[i]; if (i > 0) - adcgain = TMath::Max(adcG[i], adcgain); + adcgain = std::max(adcG[i], adcgain); } // Remove pedestal //==================== @@ -555,7 +556,7 @@ void EcalTestPulseAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& if (i == 0) adcgain = adcG[i]; if (i > 0) - adcgain = TMath::Max(adcG[i], adcgain); + adcgain = std::max(adcG[i], adcgain); } // Remove pedestal diff --git a/DQM/SiStripMonitorClient/bin/moduleOccupancyPlots.cc b/DQM/SiStripMonitorClient/bin/moduleOccupancyPlots.cc index 9eb9090b280a1..5e5d70ceeffe0 100644 --- a/DQM/SiStripMonitorClient/bin/moduleOccupancyPlots.cc +++ b/DQM/SiStripMonitorClient/bin/moduleOccupancyPlots.cc @@ -2,6 +2,7 @@ #include #include #include +#include #include "TFile.h" #include "TH1D.h" @@ -185,7 +186,8 @@ void printPlot(TH1D* hist, char* prefix, char* postfix) { delete cc; } int getChannelNumber(int ival) { - int chan = int(32 * fmod(int(fmod(ival, 256.) / 2.), 4.) + 8 * int(int(fmod(ival, 256.) / 2.) / 4.) - - 31 * int(int(fmod(ival, 256.) / 2.) / 16.) + fmod(fmod(ival, 256.), 2.) * 128 + int(ival / 256) * 256); + int chan = int(32 * std::fmod(int(std::fmod(ival, 256.) / 2.), 4.) + 8 * int(int(std::fmod(ival, 256.) / 2.) / 4.) - + 31 * int(int(std::fmod(ival, 256.) / 2.) / 16.) + std::fmod(std::fmod(ival, 256.), 2.) * 128 + + int(ival / 256) * 256); return chan; } diff --git a/Fireworks/Core/interface/FWGeometryTableViewBase.h b/Fireworks/Core/interface/FWGeometryTableViewBase.h index 94a23f6f258de..b09defa76af2a 100644 --- a/Fireworks/Core/interface/FWGeometryTableViewBase.h +++ b/Fireworks/Core/interface/FWGeometryTableViewBase.h @@ -94,7 +94,7 @@ class FWGeometryTableViewBase void checkExpandLevel(); - int getTopNodeIdx() const { return TMath::Max((int)m_topNodeIdx.value(), 0); } + int getTopNodeIdx() const { return std::max((int)m_topNodeIdx.value(), 0); } FWEveDigitSetScalableMarker* getMarker() { return m_marker; } void transparencyChanged(); diff --git a/Fireworks/Core/src/CmsAnnotation.cc b/Fireworks/Core/src/CmsAnnotation.cc index 7480b8b48d5e6..a7cbd114a0731 100644 --- a/Fireworks/Core/src/CmsAnnotation.cc +++ b/Fireworks/Core/src/CmsAnnotation.cc @@ -1,4 +1,5 @@ #include +#include #include "TGLIncludes.h" #include "TGLCamera.h" @@ -261,16 +262,15 @@ Bool_t CmsAnnotation::Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Even else if (fPosY > 1.0f) fPosY = 1.0f; } else { - using namespace TMath; Float_t oovpw = 1.0f / vp.Width(), oovph = 1.0f / vp.Height(); - Float_t xw = oovpw * Min(Max(0, event->fX), vp.Width()); - Float_t yw = oovph * Min(Max(0, vp.Height() - event->fY), vp.Height()); + Float_t xw = oovpw * std::min(std::max(0, event->fX), vp.Width()); + Float_t yw = oovph * std::min(std::max(0, vp.Height() - event->fY), vp.Height()); - Float_t rx = Max((xw - fPosX) / (oovpw * fMouseX - fPosX), 0.0f); - Float_t ry = Max((yw - fPosY) / (oovph * (vp.Height() - fMouseY) - fPosY), 0.0f); + Float_t rx = std::max((xw - fPosX) / (oovpw * fMouseX - fPosX), 0.0f); + Float_t ry = std::max((yw - fPosY) / (oovph * (vp.Height() - fMouseY) - fPosY), 0.0f); - fSize = Max(fSizeDrag * Min(rx, ry), 0.01f); + fSize = std::max(fSizeDrag * std::min(rx, ry), 0.01f); } } return kTRUE; diff --git a/Fireworks/Core/src/FWCompactVerticalLayout.cc b/Fireworks/Core/src/FWCompactVerticalLayout.cc index 3a5228e7eed6c..efe663913f714 100644 --- a/Fireworks/Core/src/FWCompactVerticalLayout.cc +++ b/Fireworks/Core/src/FWCompactVerticalLayout.cc @@ -97,7 +97,7 @@ void FWCompactVerticalLayout::Layout() { exp_max = 0; expandSizes.push_back(size.fHeight); } else - exp_max = TMath::Max(exp_max, (Int_t)size.fHeight); + exp_max = std::max(exp_max, (Int_t)size.fHeight); } else { remain -= size.fHeight; if (remain < 0) @@ -222,7 +222,7 @@ TGDimension FWCompactVerticalLayout::GetDefaultSize() const { while ((ptr = (TGFrameElement *)next())) { if (ptr->fState & kIsVisible) { csize = ptr->fFrame->GetDefaultSize(); - size.fWidth = TMath::Max(size.fWidth, csize.fWidth + ptr->fLayout->GetPadLeft() + ptr->fLayout->GetPadRight()); + size.fWidth = std::max(size.fWidth, csize.fWidth + ptr->fLayout->GetPadLeft() + ptr->fLayout->GetPadRight()); size.fHeight += csize.fHeight + ptr->fLayout->GetPadTop() + ptr->fLayout->GetPadBottom(); } } diff --git a/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc b/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc index 553019db1117b..5d31059221cba 100644 --- a/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc +++ b/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc @@ -1273,7 +1273,7 @@ void DTTrigPhase2Prod::processDigi(std::queue>& inQ for (auto& sC : vec) { // Conditions for entering a super cell. if ((sC->front().second.time() + superCelltimewidth_) > inQ.front().second.time()) { // Time requirement - if (TMath::Abs(sC->front().second.wire() - inQ.front().second.wire()) <= superCellhalfspacewidth_) { + if (std::abs(sC->front().second.wire() - inQ.front().second.wire()) <= superCellhalfspacewidth_) { // Spatial requirement sC->push(std::move(inQ.front())); classified = true; diff --git a/L1Trigger/Phase2L1GMT/interface/KMTFLUTs.h b/L1Trigger/Phase2L1GMT/interface/KMTFLUTs.h index 06bad605d4ea4..42027a4c38e43 100644 --- a/L1Trigger/Phase2L1GMT/interface/KMTFLUTs.h +++ b/L1Trigger/Phase2L1GMT/interface/KMTFLUTs.h @@ -1,6 +1,7 @@ #ifndef L1Trigger_Phase2L1GMT_KMTFLUTS_h #define L1Trigger_Phase2L1GMT_KMTFLUTS_h #include +#include #include "TH1.h" #include "TFile.h" #include diff --git a/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc b/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc index 801b11fceb24c..4b38730dca677 100644 --- a/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc +++ b/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc @@ -11,6 +11,7 @@ #include "Geometry/CommonTopologies/interface/PixelTopology.h" #include "Geometry/MTDGeometryBuilder/interface/ProxyMTDTopology.h" #include "Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h" +#include ETLDeviceSim::ETLDeviceSim(const edm::ParameterSet& pset, edm::ConsumesCollector iC) : geomToken_(iC.esConsumes()), @@ -111,7 +112,7 @@ void ETLDeviceSim::getHitsResponse(const std::vectorGetRMS(); float h2RMS = H2->GetRMS(); - float rms = TMath::Max(h1RMS, h2RMS); + float rms = std::max(h1RMS, h2RMS); float h1Mean = H1->GetMean(); float h2Mean = H2->GetMean(); float mean = 0.5 * (h1Mean + h2Mean);