diff --git a/DetDescr/include/DetDescr/HcalID.h b/DetDescr/include/DetDescr/HcalID.h index 88cdb0596..12aa89ce2 100644 --- a/DetDescr/include/DetDescr/HcalID.h +++ b/DetDescr/include/DetDescr/HcalID.h @@ -73,37 +73,37 @@ class HcalID : public HcalAbstractID { * Get the value of the 'section' field from the ID. * @return The value of the 'strip' field. */ - int getSection() const { return (id_ >> SECTION_SHIFT) & SECTION_MASK; } + unsigned int getSection() const { return (id_ >> SECTION_SHIFT) & SECTION_MASK; } /* * Get the value of the 'section' field from the ID. * @return The value of the 'strip' field. */ - int section() const { return (id_ >> SECTION_SHIFT) & SECTION_MASK; } + unsigned int section() const { return (id_ >> SECTION_SHIFT) & SECTION_MASK; } /** * Get the value of the layer field from the ID. * @return The value of the layer field. */ - int layer() const { return (id_ >> LAYER_SHIFT) & LAYER_MASK; } + unsigned int layer() const { return (id_ >> LAYER_SHIFT) & LAYER_MASK; } /** * Get the value of the layer field from the ID. * @return The value of the layer field. */ - int getLayerID() const { return (id_ >> LAYER_SHIFT) & LAYER_MASK; } + unsigned int getLayerID() const { return (id_ >> LAYER_SHIFT) & LAYER_MASK; } /** * Get the value of the 'strip' field from the ID. * @return The value of 'strip' field. */ - int getStrip() const { return (id_ >> STRIP_SHIFT) & STRIP_MASK; } + unsigned int getStrip() const { return (id_ >> STRIP_SHIFT) & STRIP_MASK; } /** * Get the value of the 'strip' field from the ID. * @return The value of 'strip' field. */ - int strip() const { return (id_ >> STRIP_SHIFT) & STRIP_MASK; } + unsigned int strip() const { return (id_ >> STRIP_SHIFT) & STRIP_MASK; } static void createInterpreters(); }; diff --git a/DetDescr/src/DetDescr/HcalGeometry.cxx b/DetDescr/src/DetDescr/HcalGeometry.cxx index b25c261b4..ae6ddc390 100644 --- a/DetDescr/src/DetDescr/HcalGeometry.cxx +++ b/DetDescr/src/DetDescr/HcalGeometry.cxx @@ -143,9 +143,9 @@ void HcalGeometry::printPositionMap(int section) const { void HcalGeometry::buildStripPositionMap() { // We hard-code the number of sections as seen in HcalID - for (int section = 0; section < num_sections_; section++) { - for (int layer = 1; layer <= num_layers_[section]; layer++) { - for (int strip = 0; strip < getNumStrips(section, layer); strip++) { + for (unsigned int section = 0; section < num_sections_; section++) { + for (unsigned int layer = 1; layer <= num_layers_[section]; layer++) { + for (unsigned int strip = 0; strip < getNumStrips(section, layer); strip++) { // initialize values double x{-99999}, y{-99999}, z{-99999}; diff --git a/Tools/src/Tools/HgcrocEmulator.cxx b/Tools/src/Tools/HgcrocEmulator.cxx index d711e25a4..625a3e671 100644 --- a/Tools/src/Tools/HgcrocEmulator.cxx +++ b/Tools/src/Tools/HgcrocEmulator.cxx @@ -232,12 +232,12 @@ std::vector HgcrocEmulator::noiseDigi( std::vector noise_digi; for (int iADC{0}; iADC(pedestal)}; if (iADC > 0) adc_tm1 = noise_digi.at(iADC-1).adc_t(); else adc_tm1 += noise(channel)/gain; - int adc_t{pedestal + noise(channel)/gain}; + int adc_t{static_cast(pedestal + noise(channel)/gain)}; if (iADC == iSOI_) adc_t += soi_amplitude/gain;