diff --git a/SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h b/SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h index ed92014effd48..7b4f5d21bf394 100644 --- a/SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h +++ b/SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h @@ -34,7 +34,7 @@ class CaloHitResponse { public: typedef std::map AnalogSignalMap; // get this from somewhere external - enum { BUNCHSPACE = 25 }; + static constexpr int BUNCHSPACE = 25; static constexpr double dt = 0.5; static constexpr int invdt = 2; diff --git a/SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h b/SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h index 7488b39460973..744c9bcc054fe 100644 --- a/SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h +++ b/SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h @@ -10,7 +10,7 @@ class CaloShapeIntegrator : public CaloVShape { public: - enum { BUNCHSPACE = 25 }; + static constexpr int BUNCHSPACE = 25; CaloShapeIntegrator(const CaloVShape *aShape); diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h b/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h index ec60ac2f2af2a..a4f442a402967 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h @@ -30,12 +30,11 @@ class EcalCoder { typedef CorrelatedNoisifier Noisifier; - enum { - NBITS = 12, // number of available bits - MAXADC = 4095, // 2^12 -1, adc max range - ADCGAINSWITCH = 4079, // adc gain switch - NGAINS = 3 // number of electronic gains - }; + static constexpr int NBITS = 12, // number of available bits + MAXADC = 4095, // 2^12 -1, adc max range + ADCGAINSWITCH = 4079, // adc gain switch + NGAINS = 3 // number of electronic gains + ; /// ctor EcalCoder(bool addNoise, diff --git a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h index 4ee72404d7be8..6b4293331cef0 100644 --- a/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h +++ b/SimCalorimetry/EcalSimAlgos/interface/EcalSignalGenerator.h @@ -246,12 +246,10 @@ class EcalSignalGenerator : public EcalBaseSignalGenerator { // much of this stolen from EcalSimAlgos/EcalCoder - enum { - NBITS = 12, // number of available bits - MAXADC = 4095, // 2^12 -1, adc max range - ADCGAINSWITCH = 4079, // adc gain switch - NGAINS = 3 - }; // number of electronic gains + static constexpr int NBITS = 12, // number of available bits + MAXADC = 4095, // 2^12 -1, adc max range + ADCGAINSWITCH = 4079, // adc gain switch + NGAINS = 3; // number of electronic gains CaloSamples samplesInPE(const DIGI& digi); // have to define this separately for ES