ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloCondPhysAlgs
src
CaloCellNoiseAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// TheCaloCellNoiseAlg.h
6
//
7
8
#ifndef CALOCONDPHYSALGS_CALOCELLNOISEALG_H
9
#define CALOCONDPHYSALGS_CALOCELLNOISEALG_H
10
11
#include <string>
12
13
// Gaudi includes
14
15
#include "
AthenaBaseComps/AthAlgorithm.h
"
16
#include "GaudiKernel/ToolHandle.h"
17
#include "
CaloIdentifier/CaloCell_ID.h
"
18
#include "
CaloIdentifier/CaloIdManager.h
"
19
#include "
CaloDetDescr/CaloDetDescrManager.h
"
20
#include "CaloGeoHelpers/CaloSampling.h"
21
#include "
LArElecCalib/ILArPedestal.h
"
22
#include "
LArElecCalib/ILArNoise.h
"
23
#include "
LArRawConditions/LArADC2MeV.h
"
24
#include "
CaloConditions/CaloNoise.h
"
25
#include "
TrigDecisionTool/TrigDecisionTool.h
"
26
27
#include "GaudiKernel/ITHistSvc.h"
28
#include "TTree.h"
29
30
#include "
StoreGate/ReadCondHandleKey.h
"
31
#include "
LArCabling/LArOnOffIdMapping.h
"
32
33
34
class
CaloCellNoiseAlg
:
public
AthAlgorithm
{
35
public
:
36
//Gaudi style constructor and execution methods
38
CaloCellNoiseAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
40
virtual
~CaloCellNoiseAlg
();
41
43
virtual
StatusCode
initialize
()
override
;
45
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
47
virtual
StatusCode
stop
()
override
;
48
49
private
:
50
51
StatusCode
fillNtuple
();
52
StatusCode
fitNoise
();
53
static
StatusCode
readNtuple
();
54
float
getLuminosity
();
55
56
//---------------------------------------------------
57
// Member variables
58
//---------------------------------------------------
59
ServiceHandle<ITHistSvc>
m_thistSvc
{
this
,
"THistSvc"
,
"THistSvc"
};
60
61
SG::ReadCondHandleKey<CaloDetDescrManager>
m_caloMgrKey
{ this
62
,
"CaloDetDescrManager"
63
,
"CaloDetDescrManager"
64
,
"SG Key for CaloDetDescrManager in the Condition Store"
};
65
66
const
CaloCell_ID
*
m_calo_id
{
nullptr
};
67
SG::ReadCondHandleKey<ILArNoise>
m_noiseKey
{
this
,
"NoiseKey"
,
"LArNoiseSym"
,
"SG Key of ILArNoise object"
};
68
SG::ReadCondHandleKey<ILArPedestal>
m_pedestalKey
{
this
,
"PedestalKey"
,
"LArPedestal"
,
"SG Key of LArPedestal object"
};
69
SG::ReadCondHandleKey<LArADC2MeV>
m_adc2mevKey
70
{
this
,
"ADC2MeVKey"
,
"LArADC2MeV"
,
"SG Key of the LArADC2MeV CDO"
};
71
SG::ReadCondHandleKey<CaloNoise>
m_totalNoiseKey
72
{
this
,
"TotalNoiseKey"
,
"totalNoise"
,
"SG conditions key for total noise"
};
73
SG::ReadCondHandleKey<CaloNoise>
m_elecNoiseKey
74
{
this
,
"ElecNoiseKey"
,
"electronicNoise"
,
"SG conditions key for electronic noise"
};
75
76
// list of cell energies
77
struct
CellInfo
{
78
int
nevt
;
79
int
nevt_good
;
80
double
average
;
81
double
rms
;
82
int
identifier
;
83
int
sampling
;
84
float
eta
;
85
float
phi
;
86
float
reference
;
87
};
88
std::vector<CellInfo>
m_CellList
;
89
int
m_ncell
{0};
90
91
unsigned
int
m_lumiblock
{0};
92
unsigned
int
m_lumiblockOld
{0};
93
bool
m_first
{
false
};
94
95
// Split this out into a separate, dynamically-allocated block.
96
// Otherwise, the CaloCellNoiseAlg is so large that it violates
97
// the ubsan sanity checks.
98
struct
TreeData
{
99
float
m_luminosity
{0};
100
int
m_ncell
{0};
101
int
m_nevt
[200000] {0};
102
int
m_nevt_good
[200000] {0};
103
int
m_layer
[200000] {0};
104
int
m_identifier
[200000] {0};
105
float
m_eta
[200000] {0};
106
float
m_phi
[200000] {0};
107
float
m_average
[200000] {0};
108
float
m_rms
[200000] {0};
109
float
m_reference
[200000] {0};
110
};
111
std::unique_ptr<TreeData>
m_treeData
;
112
TTree*
m_tree
{};
113
114
Gaudi::Property<bool>
m_doMC
{
this
,
"doMC"
,
false
};
115
Gaudi::Property<bool>
m_readNtuple
{
this
,
"readNtuple"
,
false
};
116
Gaudi::Property<bool>
m_doFit
{
this
,
"doFit"
,
true
};
117
Gaudi::Property<bool>
m_doLumiFit
{
this
,
"doLumiFit"
,
true
};
118
Gaudi::Property<int>
m_nmin
{
this
,
"nevtMin"
, 10};
119
ToolHandle<Trig::TrigDecisionTool>
m_trigDecTool
{
this
,
"TrigDecisionTool"
,
""
};
120
Gaudi::Property<std::string>
m_triggerChainProp
{
this
,
"TriggerChain"
,
""
};
121
FloatArrayProperty
m_cuts
{
this
,
"EnergyCuts"
, {}};
122
SG::ReadCondHandleKey<LArOnOffIdMapping>
m_cablingKey
{
this
,
"CablingKey"
,
"LArOnOffIdMap"
,
"SG Key of LArOnOffIdMapping object"
};
123
Gaudi::Property<std::string>
m_lumiFolderName
{
this
,
"LumiFolderName"
,
"/TRIGGER/LUMI/LBLESTONL"
};
124
Gaudi::Property<int>
m_addlumiblock
{
this
,
"NAddLumiBlock"
, 5,
"Number of consecutive lumiblocks to add together"
};
125
Gaudi::Property<float>
m_deltaLumi
{
this
,
"DeltaLumi"
, 0.05};
126
};
127
#endif
AthAlgorithm.h
CaloCell_ID.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloIdManager.h
CaloNoise.h
ILArNoise.h
ILArPedestal.h
LArADC2MeV.h
LArOnOffIdMapping.h
ReadCondHandleKey.h
TrigDecisionTool.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
CaloCellNoiseAlg::m_noiseKey
SG::ReadCondHandleKey< ILArNoise > m_noiseKey
Definition
CaloCellNoiseAlg.h:67
CaloCellNoiseAlg::m_elecNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
Definition
CaloCellNoiseAlg.h:74
CaloCellNoiseAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
standard Athena-Algorithm method
Definition
CaloCellNoiseAlg.cxx:126
CaloCellNoiseAlg::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition
CaloCellNoiseAlg.h:61
CaloCellNoiseAlg::fillNtuple
StatusCode fillNtuple()
Definition
CaloCellNoiseAlg.cxx:327
CaloCellNoiseAlg::m_CellList
std::vector< CellInfo > m_CellList
Definition
CaloCellNoiseAlg.h:88
CaloCellNoiseAlg::m_pedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Definition
CaloCellNoiseAlg.h:68
CaloCellNoiseAlg::CaloCellNoiseAlg
CaloCellNoiseAlg(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Definition
CaloCellNoiseAlg.cxx:24
CaloCellNoiseAlg::m_cuts
FloatArrayProperty m_cuts
Definition
CaloCellNoiseAlg.h:121
CaloCellNoiseAlg::m_addlumiblock
Gaudi::Property< int > m_addlumiblock
Definition
CaloCellNoiseAlg.h:124
CaloCellNoiseAlg::m_ncell
int m_ncell
Definition
CaloCellNoiseAlg.h:89
CaloCellNoiseAlg::m_lumiblock
unsigned int m_lumiblock
Definition
CaloCellNoiseAlg.h:91
CaloCellNoiseAlg::m_lumiFolderName
Gaudi::Property< std::string > m_lumiFolderName
Definition
CaloCellNoiseAlg.h:123
CaloCellNoiseAlg::m_doMC
Gaudi::Property< bool > m_doMC
Definition
CaloCellNoiseAlg.h:114
CaloCellNoiseAlg::stop
virtual StatusCode stop() override
standard Athena-Algorithm method
Definition
CaloCellNoiseAlg.cxx:98
CaloCellNoiseAlg::~CaloCellNoiseAlg
virtual ~CaloCellNoiseAlg()
Default Destructor.
CaloCellNoiseAlg::m_first
bool m_first
Definition
CaloCellNoiseAlg.h:93
CaloCellNoiseAlg::m_calo_id
const CaloCell_ID * m_calo_id
Definition
CaloCellNoiseAlg.h:66
CaloCellNoiseAlg::m_totalNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_totalNoiseKey
Definition
CaloCellNoiseAlg.h:72
CaloCellNoiseAlg::m_doFit
Gaudi::Property< bool > m_doFit
Definition
CaloCellNoiseAlg.h:116
CaloCellNoiseAlg::m_readNtuple
Gaudi::Property< bool > m_readNtuple
Definition
CaloCellNoiseAlg.h:115
CaloCellNoiseAlg::m_doLumiFit
Gaudi::Property< bool > m_doLumiFit
Definition
CaloCellNoiseAlg.h:117
CaloCellNoiseAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition
CaloCellNoiseAlg.h:122
CaloCellNoiseAlg::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition
CaloCellNoiseAlg.cxx:61
CaloCellNoiseAlg::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition
CaloCellNoiseAlg.h:70
CaloCellNoiseAlg::m_trigDecTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
TDT handle.
Definition
CaloCellNoiseAlg.h:119
CaloCellNoiseAlg::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition
CaloCellNoiseAlg.h:59
CaloCellNoiseAlg::m_triggerChainProp
Gaudi::Property< std::string > m_triggerChainProp
Definition
CaloCellNoiseAlg.h:120
CaloCellNoiseAlg::m_lumiblockOld
unsigned int m_lumiblockOld
Definition
CaloCellNoiseAlg.h:92
CaloCellNoiseAlg::fitNoise
StatusCode fitNoise()
Definition
CaloCellNoiseAlg.cxx:364
CaloCellNoiseAlg::readNtuple
static StatusCode readNtuple()
Definition
CaloCellNoiseAlg.cxx:358
CaloCellNoiseAlg::m_nmin
Gaudi::Property< int > m_nmin
Definition
CaloCellNoiseAlg.h:118
CaloCellNoiseAlg::getLuminosity
float getLuminosity()
Definition
CaloCellNoiseAlg.cxx:296
CaloCellNoiseAlg::m_tree
TTree * m_tree
Definition
CaloCellNoiseAlg.h:112
CaloCellNoiseAlg::m_treeData
std::unique_ptr< TreeData > m_treeData
Definition
CaloCellNoiseAlg.h:111
CaloCellNoiseAlg::m_deltaLumi
Gaudi::Property< float > m_deltaLumi
Definition
CaloCellNoiseAlg.h:125
CaloCell_ID
Helper class for offline cell identifiers.
Definition
CaloCell_ID.h:34
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
ServiceHandle
Definition
ClusterMakerTool.h:36
CaloCellNoiseAlg::CellInfo
Definition
CaloCellNoiseAlg.h:77
CaloCellNoiseAlg::CellInfo::identifier
int identifier
Definition
CaloCellNoiseAlg.h:82
CaloCellNoiseAlg::CellInfo::eta
float eta
Definition
CaloCellNoiseAlg.h:84
CaloCellNoiseAlg::CellInfo::nevt_good
int nevt_good
Definition
CaloCellNoiseAlg.h:79
CaloCellNoiseAlg::CellInfo::sampling
int sampling
Definition
CaloCellNoiseAlg.h:83
CaloCellNoiseAlg::CellInfo::average
double average
Definition
CaloCellNoiseAlg.h:80
CaloCellNoiseAlg::CellInfo::phi
float phi
Definition
CaloCellNoiseAlg.h:85
CaloCellNoiseAlg::CellInfo::nevt
int nevt
Definition
CaloCellNoiseAlg.h:78
CaloCellNoiseAlg::CellInfo::reference
float reference
Definition
CaloCellNoiseAlg.h:86
CaloCellNoiseAlg::CellInfo::rms
double rms
Definition
CaloCellNoiseAlg.h:81
CaloCellNoiseAlg::TreeData
Definition
CaloCellNoiseAlg.h:98
CaloCellNoiseAlg::TreeData::m_eta
float m_eta[200000]
Definition
CaloCellNoiseAlg.h:105
CaloCellNoiseAlg::TreeData::m_rms
float m_rms[200000]
Definition
CaloCellNoiseAlg.h:108
CaloCellNoiseAlg::TreeData::m_nevt
int m_nevt[200000]
Definition
CaloCellNoiseAlg.h:101
CaloCellNoiseAlg::TreeData::m_ncell
int m_ncell
Definition
CaloCellNoiseAlg.h:100
CaloCellNoiseAlg::TreeData::m_reference
float m_reference[200000]
Definition
CaloCellNoiseAlg.h:109
CaloCellNoiseAlg::TreeData::m_nevt_good
int m_nevt_good[200000]
Definition
CaloCellNoiseAlg.h:102
CaloCellNoiseAlg::TreeData::m_identifier
int m_identifier[200000]
Definition
CaloCellNoiseAlg.h:104
CaloCellNoiseAlg::TreeData::m_layer
int m_layer[200000]
Definition
CaloCellNoiseAlg.h:103
CaloCellNoiseAlg::TreeData::m_phi
float m_phi[200000]
Definition
CaloCellNoiseAlg.h:106
CaloCellNoiseAlg::TreeData::m_luminosity
float m_luminosity
Definition
CaloCellNoiseAlg.h:99
CaloCellNoiseAlg::TreeData::m_average
float m_average[200000]
Definition
CaloCellNoiseAlg.h:107
Generated on
for ATLAS Offline Software by
1.17.0