Skip to content
Snippets Groups Projects
Commit 6b4fc781 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'FPE_July_data16' into 'master'

MDTCalibData - Do not calculate timeslew via vector look-up

Closes ATLASRECTS-6507

See merge request !45302
parents 118a8e1a cf4d46c2
No related branches found
No related tags found
5 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45302MDTCalibData - Do not calculate timeslew via vector look-up
......@@ -14,17 +14,11 @@ namespace MuonCalib {
class MdtSlewCorFuncHardcoded : public IMdtSlewCorFunc {
public:
explicit MdtSlewCorFuncHardcoded( const CalibFunc::ParVec& vec ) : IMdtSlewCorFunc(vec){}
inline virtual std::string name() const { return "MdtSlewCorFuncHardCoded"; }
inline virtual std::string name() const override { return "MdtSlewCorFuncHardCoded"; }
static unsigned int nUsedPar() { return 0; }
virtual double correction(double t, double adc) const;
static double calibrated_p(const double &adc);
static const std::vector<double> initialize_LUT();
virtual double correction(double t, double adc) const override;
private:
// s_LUT is vector of timeslew correction values [ns] using ADC ticks as index
// It is static since all calibration regions use the same correction function.
static const std::vector<double> s_LUT;
};
} //namespace MuonCalib
......
......@@ -19,32 +19,18 @@
namespace MuonCalib {
const std::vector<double> MdtSlewCorFuncHardcoded::s_LUT = MdtSlewCorFuncHardcoded::initialize_LUT();
const std::vector<double> MdtSlewCorFuncHardcoded::initialize_LUT() {
double MdtSlewCorFuncHardcoded::correction(double /*t*/, double adc) const {
// Timeslew correction is negligible (<0.05 ns) for ADC>400 so do not bother computing it.
// In addition there are very few hits with ADC>400
// Constant 109 is from an optimization of the timeslew correction
// calibrated_p(i) is the integrated charge as a function of ADC
std::vector<double> LUT;
LUT.reserve(400);
for( int i=0; i<400; i++ ) {
LUT.push_back(109./calibrated_p(i));
}
return LUT;
}
double MdtSlewCorFuncHardcoded::correction(double /*t*/, double adc) const {
if( adc>400. || adc<0. ) return 0.;
return s_LUT[static_cast<int>(adc)];
}
// Convert ADC to integrated charge for AMT chip, see ATL-MUON-2002-003
double MdtSlewCorFuncHardcoded::calibrated_p(const double &adc) {
if( adc> 400. || adc<0. ) return 0.;
constexpr double A = 109. * std::exp(-1.11925e+00 );
constexpr double adc_chan_conversion = 25./32.;
double w = adc*adc_chan_conversion; //ADC to ns
return std::exp(1.11925e+00 + 2.08708e-02*w);
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);
}
} //namespace MuonCalib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment