ATLAS Offline Software
Loading...
Searching...
No Matches
TileCondToolEmscale.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Tile includes
8
9// Athena includes
12
13
14//
15//____________________________________________________________________
16static const InterfaceID IID_TileCondToolEmscale("TileCondToolEmscale", 1, 0);
17
20}
21
22//
23//____________________________________________________________________
24TileCondToolEmscale::TileCondToolEmscale(const std::string& type, const std::string& name,
25 const IInterface* parent)
26 : AthAlgTool(type, name, parent)
27{
28 declareInterface<TileCondToolEmscale>(this);
29
30}
31
32//
33//____________________________________________________________________
36
37//
38//____________________________________________________________________
40
41 ATH_MSG_DEBUG( "In initialize()" );
42 ATH_CHECK( m_emScaleKey.initialize() );
43 return StatusCode::SUCCESS;
44}
45
46//
47//____________________________________________________________________
49
50 ATH_MSG_DEBUG( "finalize called" );
51 return StatusCode::SUCCESS;
52
53}
54
55
56//
57//____________________________________________________________________
58float TileCondToolEmscale::undoOnlCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc
59 , float amplitude, TileRawChannelUnit::UNIT onlUnit) const {
60
62 return emScale->undoOnlineChannelCalibration(drawerIdx, channel, adc, amplitude, onlUnit);
63
64}
65
66//
67//____________________________________________________________________
68float TileCondToolEmscale::channelCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc
69 , float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn
70 , TileRawChannelUnit::UNIT rawDataUnitOut) const {
71
73 return emScale->calibrateChannel(drawerIdx, channel, adc, amplitude, rawDataUnitIn, rawDataUnitOut);
74
75}
76
77//
78//____________________________________________________________________
79float TileCondToolEmscale::doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const {
80
82 return emScale->applyEMScaleCalibration(drawerIdx, channel, amplitude);
83
84}
85
86//
87//____________________________________________________________________
88float TileCondToolEmscale::doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr) const {
89
91 return emScale->applyCesiumCalibration(drawerIdx, channel, amplitude, applyLasCorr);
92
93}
94
95//
96//____________________________________________________________________
97float TileCondToolEmscale::doCalibLas(unsigned int drawerIdx, unsigned int channel, float amplitude) const {
98
100 return emScale->applyLaserCalibration(drawerIdx, channel, amplitude);
101
102}
103
104//
105//____________________________________________________________________
106float TileCondToolEmscale::doCalibCis(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const {
107
109 return emScale->applyChargeCalibration(drawerIdx, channel, adc, amplitude);
110
111}
112
113//
114//____________________________________________________________________
115float TileCondToolEmscale::channelCalibOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc
116 , float amplitude, TileRawChannelUnit::UNIT onlUnit) const {
117
119 return emScale->calibrateOnlineChannel(drawerIdx, channel, adc, amplitude, onlUnit);
120
121}
122
123//
124//____________________________________________________________________
125float TileCondToolEmscale::doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const {
126
128 return emScale->applyOnlineEMScaleCalibration(drawerIdx, channel, amplitude);
129
130}
131
132//
133//____________________________________________________________________
134float TileCondToolEmscale::doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr) const {
135
137 return emScale->applyOnlineCesiumCalibration(drawerIdx, channel, amplitude, applyLasCorr);
138
139}
140
141//
142//____________________________________________________________________
143float TileCondToolEmscale::doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const {
144
146 return emScale->applyOnlineLaserCalibration(drawerIdx, channel, amplitude);
147
148}
149
150//
151//____________________________________________________________________
152float TileCondToolEmscale::doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const {
153
155 return emScale->applyOnlineChargeCalibration(drawerIdx, channel, adc, amplitude);
156
157}
158
159//
160//____________________________________________________________________
161float TileCondToolEmscale::getCesRefLas(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const {
162
164 return emScale->getCesiumReferenceLaserGain(drawerIdx, channel, adc);
165
166}
167
168//
169//____________________________________________________________________
170float TileCondToolEmscale::getCesRefHv(unsigned int drawerIdx, unsigned int channel) const {
171
173 return emScale->getCesiumReferenceHV(drawerIdx, channel);
174
175}
176
177//
178//____________________________________________________________________
179float TileCondToolEmscale::getCesRefTemp(unsigned int drawerIdx, unsigned int channel) const {
180
182 return emScale->getCesiumReferenceTemperature(drawerIdx, channel);
183
184}
185
186//
187//____________________________________________________________________
188float TileCondToolEmscale::getLasFiber(unsigned int drawerIdx, unsigned int channel) const {
189
191 return emScale->getLaserFiberVariation(drawerIdx, channel);
192
193}
194
195//
196//____________________________________________________________________
197float TileCondToolEmscale::getLasPartition(unsigned int drawerIdx) const {
198
200 return emScale->getLaserPartitionVariation(drawerIdx);
201
202}
203
204//
205//____________________________________________________________________
206float TileCondToolEmscale::getLasRefHv(unsigned int drawerIdx, unsigned int channel) const {
207
209 return emScale->getLaserReferenceHV(drawerIdx, channel);
210
211}
212
213
214//
215//____________________________________________________________________
217
219 return emScale->getOnlineCacheUnit();
220
221}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
static const InterfaceID IID_TileCondToolEmscale("TileCondToolEmscale", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual StatusCode initialize() override
float getCesRefHv(unsigned int drawerIdx, unsigned int channel) const
Returns the reference PMT HV set in last cesium calibration.
float doCalibCesOnl(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Online application of cesium calibration constant.
float doCalibLas(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Application of laser (PMT linearity) correction.
float channelCalibOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
Calibrates an online Tile channel from OnlineADCcounts to an arbitrary Online unit,...
float doCalibCes(unsigned int drawerIdx, unsigned int channel, float amplitude, bool applyLasCorr=true) const
Application of cesium calibration constant.
TileCondToolEmscale(const std::string &type, const std::string &name, const IInterface *parent)
float doCalibCis(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Application of CIS calibration: ADC counts -> pC.
float getLasFiber(unsigned int drawerIdx, unsigned int channel) const
Returns laser fiber relative variation.
TileRawChannelUnit::UNIT getOnlCacheUnit() const
Returns the unit of cached online calibration constants.
float undoOnlCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
Undoes the calibration applied in ROD signal reconstruction.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
float doCalibEms(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Calibration to EM scale: Equalized pC -> MeV.
float doCalibEmsOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online calibration to EM scale: Equalized pC -> MeV.
float doCalibLasOnl(unsigned int drawerIdx, unsigned int channel, float amplitude) const
Online application of laser (PMT linearity) correction.
float doCalibCisOnl(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude) const
Online Application of CIS calibration: ADC counts -> pC.
float getLasRefHv(unsigned int drawerIdx, unsigned int channel) const
Returns the reference PMT HV from appropriate laser calibration.
virtual StatusCode finalize() override
static const InterfaceID & interfaceID()
float channelCalib(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
Calibrates a Tile channel.
float getLasPartition(unsigned int drawerIdx) const
Returns laser partition relative variation.
float getCesRefLas(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Returns the PMT gain reference as measured by the laser system.
float getCesRefTemp(unsigned int drawerIdx, unsigned int channel) const
Returns the drawer temperature as measured during last cesium equalization.