ATLAS Offline Software
SiLorentzAngleCondData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 
12 #include <limits>
13 
14 const double SiLorentzAngleCondData::s_invalidValue{std::numeric_limits<double>::quiet_NaN()};
15 
17  m_lorentzShift{},
18  m_lorentzShiftEta{},
19  m_tanLorentzAngle{},
20  m_tanLorentzAngleEta{},
21  m_monitorBiasVoltage{},
22  m_monitorTemperature{},
23  m_monitorDepletionVoltage{},
24  m_correctionFactor{1.}
25 {
26 }
27 
28 void SiLorentzAngleCondData::resize(const unsigned int size)
29 {
37 }
38 
40 {
41  if (m_lorentzShift.size()<=elementHash) return s_invalidValue;
42  return m_lorentzShift[elementHash];
43 }
44 
46 {
47  if (m_lorentzShiftEta.size()<=elementHash) return s_invalidValue;
48  return m_lorentzShiftEta[elementHash];
49 }
50 
52 {
53  if (m_tanLorentzAngle.size()<=elementHash) return s_invalidValue;
54  return m_tanLorentzAngle[elementHash];
55 }
56 
58 {
59  if (m_tanLorentzAngleEta.size()<=elementHash) return s_invalidValue;
60  return m_tanLorentzAngleEta[elementHash];
61 }
62 
64 {
65  if (m_monitorBiasVoltage.size()<=elementHash) return s_invalidValue;
66  return m_monitorBiasVoltage[elementHash];
67 }
68 
70 {
71  if (m_monitorTemperature.size()<=elementHash) return s_invalidValue;
72  return m_monitorTemperature[elementHash];
73 }
74 
76 {
77  if (m_monitorDepletionVoltage.size()<=elementHash) return s_invalidValue;
78  return m_monitorDepletionVoltage[elementHash];
79 }
80 
82 {
83  return m_correctionFactor;
84 }
85 
86 void SiLorentzAngleCondData::setLorentzShift(const IdentifierHash& elementHash, const double lorentzShift)
87 {
88  if (m_lorentzShift.size()<=elementHash) m_lorentzShift.resize(elementHash+1, s_invalidValue);
89  m_lorentzShift[elementHash] = lorentzShift;
90 }
91 
92 void SiLorentzAngleCondData::setLorentzShiftEta(const IdentifierHash& elementHash, const double lorentzShiftEta)
93 {
94  if (m_lorentzShiftEta.size()<=elementHash) m_lorentzShiftEta.resize(elementHash+1, s_invalidValue);
95  m_lorentzShiftEta[elementHash] = lorentzShiftEta;
96 }
97 
98 void SiLorentzAngleCondData::setTanLorentzAngle(const IdentifierHash& elementHash, const double tanLorentzAngle)
99 {
100  if (m_tanLorentzAngle.size()<=elementHash) m_tanLorentzAngle.resize(elementHash+1, s_invalidValue);
101  m_tanLorentzAngle[elementHash] = tanLorentzAngle;
102 }
103 
104 void SiLorentzAngleCondData::setTanLorentzAngleEta(const IdentifierHash& elementHash, const double tanLorentzAngleEta)
105 {
106  if (m_tanLorentzAngleEta.size()<=elementHash) m_tanLorentzAngleEta.resize(elementHash+1, s_invalidValue);
107  m_tanLorentzAngleEta[elementHash] = tanLorentzAngleEta;
108 }
109 
110 void SiLorentzAngleCondData::setBiasVoltage(const IdentifierHash& elementHash, const double biasVoltage)
111 {
112  if (m_monitorBiasVoltage.size()<=elementHash) m_monitorBiasVoltage.resize(elementHash+1, s_invalidValue);
113  m_monitorBiasVoltage[elementHash] = biasVoltage;
114 }
115 
116 void SiLorentzAngleCondData::setTemperature(const IdentifierHash& elementHash, const double temperature)
117 {
118  if (m_monitorTemperature.size()<=elementHash) m_monitorTemperature.resize(elementHash+1, s_invalidValue);
119  m_monitorTemperature[elementHash] = temperature;
120 }
121 
122 void SiLorentzAngleCondData::setDepletionVoltage(const IdentifierHash& elementHash, const double depletionVoltage)
123 {
124  if (m_monitorDepletionVoltage.size()<=elementHash) m_monitorDepletionVoltage.resize(elementHash+1, s_invalidValue);
125  m_monitorDepletionVoltage[elementHash] = depletionVoltage;
126 }
127 
128 void SiLorentzAngleCondData::setCorrectionFactor(const double correctionFactor)
129 {
130  m_correctionFactor = correctionFactor;
131 }
SiLorentzAngleCondData::m_correctionFactor
double m_correctionFactor
Definition: SiLorentzAngleCondData.h:96
SiLorentzAngleCondData::m_monitorTemperature
std::vector< double > m_monitorTemperature
Definition: SiLorentzAngleCondData.h:94
SiLorentzAngleCondData::setBiasVoltage
void setBiasVoltage(const IdentifierHash &elementHash, const double biasVoltage)
Set bias voltage.
Definition: SiLorentzAngleCondData.cxx:110
SiLorentzAngleCondData::getCorrectionFactor
double getCorrectionFactor() const
Get correction factor.
Definition: SiLorentzAngleCondData.cxx:81
SiLorentzAngleCondData::getLorentzShiftEta
double getLorentzShiftEta(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...
Definition: SiLorentzAngleCondData.cxx:45
SiLorentzAngleCondData::getTanLorentzAngleEta
double getTanLorentzAngleEta(const IdentifierHash &elementHash) const
Get tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector an...
Definition: SiLorentzAngleCondData.cxx:57
SiLorentzAngleCondData::setDepletionVoltage
void setDepletionVoltage(const IdentifierHash &elementHash, const double depletionVoltage)
Set depletion voltage.
Definition: SiLorentzAngleCondData.cxx:122
SiLorentzAngleCondData::setLorentzShift
void setLorentzShift(const IdentifierHash &elementHash, const double lorentzShift)
Set the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
Definition: SiLorentzAngleCondData.cxx:86
SiLorentzAngleCondData::getTanLorentzAngle
double getTanLorentzAngle(const IdentifierHash &elementHash) const
Get tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector an...
Definition: SiLorentzAngleCondData.cxx:51
SiLorentzAngleCondData::setCorrectionFactor
void setCorrectionFactor(const double correctionFactor)
Set correction factor.
Definition: SiLorentzAngleCondData.cxx:128
SiLorentzAngleCondData::m_lorentzShift
std::vector< double > m_lorentzShift
Definition: SiLorentzAngleCondData.h:89
SiLorentzAngleCondData::getBiasVoltage
double getBiasVoltage(const IdentifierHash &elementHash) const
Get bias voltage.
Definition: SiLorentzAngleCondData.cxx:63
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SiLorentzAngleCondData::setLorentzShiftEta
void setLorentzShiftEta(const IdentifierHash &elementHash, const double lorentzShiftEta)
Set the Lorentz shift correction in the local y (etaDist) direction Assumes the center of the detecto...
Definition: SiLorentzAngleCondData.cxx:92
SiLorentzAngleCondData::getDepletionVoltage
double getDepletionVoltage(const IdentifierHash &elementHash) const
Get depletion voltage.
Definition: SiLorentzAngleCondData.cxx:75
SiLorentzAngleCondData::setTemperature
void setTemperature(const IdentifierHash &elementHash, const double temperature)
Set temperature.
Definition: SiLorentzAngleCondData.cxx:116
SiLorentzAngleCondData::SiLorentzAngleCondData
SiLorentzAngleCondData()
Definition: SiLorentzAngleCondData.cxx:16
SiLorentzAngleCondData::s_invalidValue
static const double s_invalidValue
Definition: SiLorentzAngleCondData.h:98
SiLorentzAngleCondData.h
SiLorentzAngleCondData::m_lorentzShiftEta
std::vector< double > m_lorentzShiftEta
Definition: SiLorentzAngleCondData.h:90
SiLorentzAngleCondData::m_tanLorentzAngleEta
std::vector< double > m_tanLorentzAngleEta
Definition: SiLorentzAngleCondData.h:92
SiLorentzAngleCondData::m_monitorBiasVoltage
std::vector< double > m_monitorBiasVoltage
Definition: SiLorentzAngleCondData.h:93
SiLorentzAngleCondData::m_monitorDepletionVoltage
std::vector< double > m_monitorDepletionVoltage
Definition: SiLorentzAngleCondData.h:95
SiLorentzAngleCondData::getLorentzShift
double getLorentzShift(const IdentifierHash &elementHash) const
Get the Lorentz shift correction in the local x (phiDist) direction Assumes the center of the detecto...
Definition: SiLorentzAngleCondData.cxx:39
SiLorentzAngleCondData::setTanLorentzAngleEta
void setTanLorentzAngleEta(const IdentifierHash &elementHash, const double tanLorentzAngleEta)
Set tan af the Lorentz angle in the local y (etaDist) direction Assumes the center of the detector an...
Definition: SiLorentzAngleCondData.cxx:104
SiLorentzAngleCondData::m_tanLorentzAngle
std::vector< double > m_tanLorentzAngle
Definition: SiLorentzAngleCondData.h:91
IdentifierHash
Definition: IdentifierHash.h:38
SiLorentzAngleCondData::resize
void resize(const unsigned int size)
Reszie the data members.
Definition: SiLorentzAngleCondData.cxx:28
SiLorentzAngleCondData::setTanLorentzAngle
void setTanLorentzAngle(const IdentifierHash &elementHash, const double tanLorentzAngle)
Set tan af the Lorentz angle in the local x (phiDist) direction Assumes the center of the detector an...
Definition: SiLorentzAngleCondData.cxx:98
SiLorentzAngleCondData::getTemperature
double getTemperature(const IdentifierHash &elementHash) const
Get temperature.
Definition: SiLorentzAngleCondData.cxx:69