From 31e12ffd61fbd0d36678ab482cdd7949d3c2a3f7 Mon Sep 17 00:00:00 2001 From: Johannes Josef Junggeburth <johannes.josef.junggeburth@CERN.CH> Date: Wed, 21 Jul 2021 09:01:17 +0200 Subject: [PATCH] Fix clang 10 compilation avoid unneccary double -> int conversion --- .../MdtCalib/MdtCalibData/src/MdtSlewCorFuncHardcoded.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtSlewCorFuncHardcoded.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtSlewCorFuncHardcoded.cxx index 0ffb632c40f9..bc87c347ef6e 100644 --- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtSlewCorFuncHardcoded.cxx +++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtSlewCorFuncHardcoded.cxx @@ -16,6 +16,7 @@ #include "MdtCalibData/MdtSlewCorFuncHardcoded.h" #include <cmath> + namespace MuonCalib { @@ -25,12 +26,11 @@ double MdtSlewCorFuncHardcoded::correction(double /*t*/, double adc) const { // Constant 109 is from an optimization of the timeslew correction // calibrated_p(i) is the integrated charge as a function of ADC if( adc> 400. || adc<0. ) return 0.; - constexpr double A = 109. * std::exp(-1.11925e+00 ); + static const double A = 109. * std::exp(-1.11925e+00 ); constexpr double adc_chan_conversion = 25./32.; constexpr double Lambda = -2.08708e-02*adc_chan_conversion; //ADC to ns - const int adc_int = adc; // Convert ADC to integrated charge for AMT chip, see ATL-MUON-2002-003 - return A * std::exp( adc_int * Lambda); + return A * std::exp( adc * Lambda); } } //namespace MuonCalib -- GitLab