ATLAS Offline Software
Loading...
Searching...
No Matches
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
7
8// Athena includes
11
12//
13//____________________________________________________________________
14static const InterfaceID IID_TileCondToolNoiseRawChn("TileCondToolNoiseRawChn", 1, 0);
18
19//
20//____________________________________________________________________
21TileCondToolNoiseRawChn::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//____________________________________________________________________
32
33//
34//____________________________________________________________________
36
37 ATH_MSG_DEBUG( "In initialize()" );
38
40 ATH_CHECK( m_emScaleKey.initialize() );
41
42 return StatusCode::SUCCESS;
43}
44
45//
46//____________________________________________________________________
48
49 ATH_MSG_DEBUG( "finalize called" );
50
51 return StatusCode::SUCCESS;
52}
53
54//
55//____________________________________________________________________
56float TileCondToolNoiseRawChn::getElectronicNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc,
57 TileRawChannelUnit::UNIT unit, const EventContext &ctx) const {
58
60 float val = calibRawChannelNoise->getCalibDrawer(drawerIdx)->getData(channel, adc, 0);
61
64 val = emScale->calibrateChannel(drawerIdx, channel, adc, val, TileRawChannelUnit::ADCcounts, unit);
65 }
66
67 return val;
68
69}
70
71//
72//____________________________________________________________________
73float TileCondToolNoiseRawChn::getPileUpNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc,
74 const EventContext &ctx) const {
75
77 return calibRawChannelNoise->getCalibDrawer(drawerIdx)->getData(channel, adc, 1);
78
79}
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
#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_TileCondToolNoiseRawChn("TileCondToolNoiseRawChn", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
static const InterfaceID & interfaceID()
float getPileUpNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc, const EventContext &ctx) const
virtual StatusCode initialize() override
float getElectronicNoise(unsigned int drawerIdx, unsigned int channel, unsigned int adc, TileRawChannelUnit::UNIT unit, const EventContext &ctx) const
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
virtual StatusCode finalize() override
TileCondToolNoiseRawChn(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibRawChannelNoiseKey