ATLAS Offline Software
WireSagCorFunc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 
15 
16 #include <cmath>
17 
19 #include "GaudiKernel/IMessageSvc.h"
20 #include "GaudiKernel/MsgStream.h"
21 
23 
24 using namespace MuonCalib;
25 
28  MsgStream log(Athena::getMessageSvc(), "WireSagCorFunc");
29  m_params = params;
30  if (!m_params.empty()) { log << MSG::ERROR << "Wrong number of parameters: " << m_params.size() << endmsg; }
31 }
32 
34 std::string WireSagCorFunc::name() const { return std::string("WireSagCorFunc"); }
35 
37 double WireSagCorFunc::correction(double signedDriftRadius, double effectiveSag) const {
39 
40  double coeff[6] = {-4.47741E-3, 1.75541E-2, -1.32913E-2, 2.57938E-3, -4.55015E-5, -1.70821E-7};
41 
43  double scaleFactor = effectiveSag / 100.;
44 
46  double dT = 0;
47  for (int i = 0; i < 5; i++) { dT = dT + coeff[i] * std::pow(signedDriftRadius, i); }
48 
49  return scaleFactor * dT;
50 }
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
MuonCalib::WireSagCorFunc::correction
double correction(double signedDriftRadius, double effectiveSag) const
correction function
Definition: WireSagCorFunc.cxx:37
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
TRT::Hit::signedDriftRadius
@ signedDriftRadius
Definition: HitInfo.h:40
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
WireSagCorFunc.h
MuonCalib::WireSagCorFunc::name
std::string name() const
class name
Definition: WireSagCorFunc.cxx:34
MuonCalib::CalibFunc::ParVec
std::vector< double > ParVec
Definition: CalibFunc.h:36
MuonCalib::WireSagCorFunc::init
void init(const CalibFunc::ParVec &params)
initialization method
Definition: WireSagCorFunc.cxx:27
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::WireSagCorFunc::m_params
std::vector< double > m_params
data members
Definition: WireSagCorFunc.h:76
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226