ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileConditions
src
TileCondToolNoiseRawChn.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TileConditions/TileCondToolNoiseRawChn.h
"
6
#include "
TileCalibBlobObjs/TileCalibDrawerFlt.h
"
7
8
// Athena includes
9
#include "
AthenaKernel/errorcheck.h
"
10
#include "
StoreGate/ReadCondHandle.h
"
11
12
//
13
//____________________________________________________________________
14
static
const
InterfaceID
IID_TileCondToolNoiseRawChn
(
"TileCondToolNoiseRawChn"
, 1, 0);
15
const
InterfaceID&
TileCondToolNoiseRawChn::interfaceID
() {
16
return
IID_TileCondToolNoiseRawChn
;
17
}
18
19
//
20
//____________________________________________________________________
21
TileCondToolNoiseRawChn::TileCondToolNoiseRawChn
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
22
:
AthAlgTool
(
type
, name, parent)
23
{
24
declareInterface<ITileCondToolNoise>(
this
);
25
declareInterface<TileCondToolNoiseRawChn>(
this
);
26
}
27
28
//
29
//____________________________________________________________________
30
TileCondToolNoiseRawChn::~TileCondToolNoiseRawChn
() {
31
}
32
33
//
34
//____________________________________________________________________
35
StatusCode
TileCondToolNoiseRawChn::initialize
() {
36
37
ATH_MSG_DEBUG
(
"In initialize()"
);
38
39
ATH_CHECK
(
m_calibRawChannelNoiseKey
.initialize() );
40
ATH_CHECK
(
m_emScaleKey
.initialize() );
41
42
return
StatusCode::SUCCESS;
43
}
44
45
//
46
//____________________________________________________________________
47
StatusCode
TileCondToolNoiseRawChn::finalize
() {
48
49
ATH_MSG_DEBUG
(
"finalize called"
);
50
51
return
StatusCode::SUCCESS;
52
}
53
54
//
55
//____________________________________________________________________
56
float
TileCondToolNoiseRawChn::getElectronicNoise
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc,
57
TileRawChannelUnit::UNIT
unit
,
const
EventContext &ctx)
const
{
58
59
SG::ReadCondHandle<TileCalibDataFlt>
calibRawChannelNoise(
m_calibRawChannelNoiseKey
, ctx);
60
float
val = calibRawChannelNoise->getCalibDrawer(drawerIdx)->getData(channel, adc, 0);
61
62
if
(
unit
>
TileRawChannelUnit::ADCcounts
) {
63
SG::ReadCondHandle<TileEMScale>
emScale (
m_emScaleKey
, ctx);
64
val = emScale->calibrateChannel(drawerIdx, channel, adc, val,
TileRawChannelUnit::ADCcounts
,
unit
);
65
}
66
67
return
val;
68
69
}
70
71
//
72
//____________________________________________________________________
73
float
TileCondToolNoiseRawChn::getPileUpNoise
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc,
74
const
EventContext &ctx)
const
{
75
76
SG::ReadCondHandle<TileCalibDataFlt>
calibRawChannelNoise(
m_calibRawChannelNoiseKey
, ctx);
77
return
calibRawChannelNoise->getCalibDrawer(drawerIdx)->getData(channel, adc, 1);
78
79
}
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition
AmgMatrixBasePlugin.h:21
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
errorcheck.h
Helpers for checking error return status codes and reporting errors.
ReadCondHandle.h
TileCalibDrawerFlt.h
IID_TileCondToolNoiseRawChn
static const InterfaceID IID_TileCondToolNoiseRawChn("TileCondToolNoiseRawChn", 1, 0)
TileCondToolNoiseRawChn.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
TileCondToolNoiseRawChn::interfaceID
static const InterfaceID & interfaceID()
Definition
TileCondToolNoiseRawChn.cxx:15
TileCondToolNoiseRawChn::getPileUpNoise
float getPileUpNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc, const EventContext &ctx) const
Definition
TileCondToolNoiseRawChn.cxx:73
TileCondToolNoiseRawChn::initialize
virtual StatusCode initialize() override
Definition
TileCondToolNoiseRawChn.cxx:35
TileCondToolNoiseRawChn::getElectronicNoise
float getElectronicNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc, TileRawChannelUnit::UNIT unit, const EventContext &ctx) const
Definition
TileCondToolNoiseRawChn.cxx:56
TileCondToolNoiseRawChn::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Definition
TileCondToolNoiseRawChn.h:49
TileCondToolNoiseRawChn::finalize
virtual StatusCode finalize() override
Definition
TileCondToolNoiseRawChn.cxx:47
TileCondToolNoiseRawChn::TileCondToolNoiseRawChn
TileCondToolNoiseRawChn(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TileCondToolNoiseRawChn.cxx:21
TileCondToolNoiseRawChn::~TileCondToolNoiseRawChn
virtual ~TileCondToolNoiseRawChn()
Definition
TileCondToolNoiseRawChn.cxx:30
TileCondToolNoiseRawChn::m_calibRawChannelNoiseKey
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibRawChannelNoiseKey
Definition
TileCondToolNoiseRawChn.h:46
TileRawChannelUnit::UNIT
UNIT
Definition
TileRawChannelUnit.h:16
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition
TileRawChannelUnit.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0