ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloMonitoring
src
L1CaloLegacyEDMMonitorAlgorithm.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
L1CaloLegacyEDMMonitorAlgorithm.h
"
6
7
L1CaloLegacyEDMMonitorAlgorithm::L1CaloLegacyEDMMonitorAlgorithm
(
const
std::string& name, ISvcLocator* pSvcLocator )
8
:
AthMonitorAlgorithm
(name,pSvcLocator)
9
{
10
}
11
12
StatusCode
L1CaloLegacyEDMMonitorAlgorithm::initialize
() {
13
14
ATH_MSG_DEBUG
(
"L1CaloLegacyEDMMonitorAlgorith::initialize"
);
15
ATH_MSG_DEBUG
(
"Package Name "
<<
m_packageName
);
16
ATH_MSG_DEBUG
(
"EmTauRoIContainer"
<<
m_l1TauRoIKey
);
17
ATH_MSG_DEBUG
(
"JetRoIContainer"
<<
m_l1JetRoIKey
);
18
ATH_MSG_DEBUG
(
"EnergySumRoI"
<<
m_l1EnergySumRoIKey
);
19
20
// we initialise all the containers that we need
21
ATH_CHECK
(
m_l1TauRoIKey
.initialize());
22
ATH_CHECK
(
m_l1JetRoIKey
.initialize());
23
ATH_CHECK
(
m_l1EnergySumRoIKey
.initialize());
24
25
return
AthMonitorAlgorithm::initialize
();
26
}
27
28
StatusCode
L1CaloLegacyEDMMonitorAlgorithm::fillHistograms
(
const
EventContext& ctx )
const
{
29
30
ATH_MSG_DEBUG
(
"L1CaloLegacyEDMMonitorAlgorithm::fillHistograms"
);
31
32
std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> variables;
33
34
SG::ReadHandle<xAOD::EmTauRoIContainer>
EmTauRoIs{
m_l1TauRoIKey
, ctx};
35
if
(!EmTauRoIs.
isValid
()){
36
ATH_MSG_ERROR
(
"No EM Tau container found in storegate "
<<
m_l1TauRoIKey
);
37
return
StatusCode::SUCCESS;
38
}
39
40
SG::ReadHandle<xAOD::JetRoIContainer>
JetRoIs{
m_l1JetRoIKey
, ctx};
41
if
(!JetRoIs.
isValid
()){
42
ATH_MSG_ERROR
(
"No Jet container found in storegate "
<<
m_l1JetRoIKey
);
43
return
StatusCode::SUCCESS;
44
}
45
46
SG::ReadHandle<xAOD::EnergySumRoI>
EnergyRoIs{
m_l1EnergySumRoIKey
, ctx};
47
if
(!EnergyRoIs.
isValid
()){
48
ATH_MSG_ERROR
(
"No EnergySum container found in storegate "
<<
m_l1EnergySumRoIKey
);
49
return
StatusCode::SUCCESS;
50
}
51
52
auto
LVL1EmTauRoIs_eta =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_eta"
,0.);
53
auto
LVL1EmTauRoIs_phi =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_phi"
,0.);
54
auto
LVL1EmTauRoIs_core =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_core"
,0.);
55
auto
LVL1EmTauRoIs_emClus =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_emClus"
,0.);
56
auto
LVL1EmTauRoIs_tauClus =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_tauClus"
,0.);
57
auto
LVL1EmTauRoIs_hadIsol =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_hadIsol"
,0.);
58
auto
LVL1EmTauRoIs_emIsol =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_emIsol"
,0.);
59
auto
LVL1EmTauRoIs_hadCore =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_hadCore"
,0.);
60
auto
LVL1EmTauRoIs_thrPattern =
Monitored::Scalar<float>
(
"LVL1EmTauRoIs_thrPattern"
,0.);
61
62
auto
LVL1JetRoIs_eta =
Monitored::Scalar<float>
(
"LVL1JetRoIs_eta"
,0.);
63
auto
LVL1JetRoIs_phi =
Monitored::Scalar<float>
(
"LVL1JetRoIs_phi"
,0.);
64
auto
LVL1JetRoIs_et4x4 =
Monitored::Scalar<float>
(
"LVL1JetRoIs_et4x4"
,0.);
65
auto
LVL1JetRoIs_et8x8 =
Monitored::Scalar<float>
(
"LVL1JetRoIs_et8x8"
,0.);
66
67
auto
LVL1EnergySumRoI_energyT =
Monitored::Scalar<float>
(
"LVL1EnergySumRoI_energyT"
,0.);
68
auto
LVL1EnergySumRoI_energyX =
Monitored::Scalar<float>
(
"LVL1EnergySumRoI_energyX"
,0.);
69
auto
LVL1EnergySumRoI_energyY =
Monitored::Scalar<float>
(
"LVL1EnergySumRoI_energyY"
,0.);
70
71
for
(
auto
roi : *EmTauRoIs) {
72
73
ATH_MSG_DEBUG
(
"isTauRoI:"
<<
" eta: "
<< roi->eta() <<
" phi: "
<< roi->phi() );
74
75
LVL1EmTauRoIs_eta = roi->eta();
76
fill
(
m_packageName
,LVL1EmTauRoIs_eta);
77
78
LVL1EmTauRoIs_phi = roi->phi();
79
fill
(
m_packageName
, LVL1EmTauRoIs_phi);
80
81
LVL1EmTauRoIs_core = roi->core()/1000.;
82
fill
(
m_packageName
,LVL1EmTauRoIs_core);
83
LVL1EmTauRoIs_emClus = roi->emClus()/1000.;
84
fill
(
m_packageName
,LVL1EmTauRoIs_emClus);
85
LVL1EmTauRoIs_tauClus= roi->tauClus()/1000.;
86
fill
(
m_packageName
,LVL1EmTauRoIs_tauClus);
87
LVL1EmTauRoIs_hadIsol= roi->hadIsol()/1000.;
88
fill
(
m_packageName
,LVL1EmTauRoIs_hadIsol);
89
LVL1EmTauRoIs_emIsol= roi->emIsol()/1000.;
90
fill
(
m_packageName
,LVL1EmTauRoIs_emIsol);
91
LVL1EmTauRoIs_hadCore=roi->hadCore()/1000.;
92
fill
(
m_packageName
,LVL1EmTauRoIs_hadCore);
93
LVL1EmTauRoIs_thrPattern=roi->thrPattern();
94
fill
(
m_packageName
,LVL1EmTauRoIs_thrPattern);
95
}
96
97
for
(
auto
roi : *JetRoIs) {
98
99
ATH_MSG_DEBUG
(
"isTauRoI:"
<<
" eta: "
<< roi->eta() <<
" phi: "
<< roi->phi() );
100
101
LVL1JetRoIs_eta = roi->eta();
102
fill
(
m_packageName
,LVL1JetRoIs_eta);
103
LVL1JetRoIs_phi = roi->phi();
104
fill
(
m_packageName
,LVL1JetRoIs_phi);
105
LVL1JetRoIs_et4x4 = roi->et4x4()/1000.;
106
fill
(
m_packageName
,LVL1JetRoIs_et4x4);
107
LVL1JetRoIs_et8x8 = roi->et8x8()/1000.;
108
fill
(
m_packageName
,LVL1JetRoIs_et8x8);
109
}
110
111
const
xAOD::EnergySumRoI
* Energyroi = EnergyRoIs.
cptr
();
112
LVL1EnergySumRoI_energyT = Energyroi->
energyT
()/1000.;
113
fill
(
m_packageName
,LVL1EnergySumRoI_energyT);
114
LVL1EnergySumRoI_energyX = Energyroi->
energyX
()/1000.;
115
fill
(
m_packageName
,LVL1EnergySumRoI_energyX);
116
LVL1EnergySumRoI_energyY = Energyroi->
energyY
()/1000.;
117
fill
(
m_packageName
,LVL1EnergySumRoI_energyY);
118
119
auto
run
=
Monitored::Scalar<int>
(
"run"
,
GetEventInfo
(ctx)->runNumber());
120
variables.push_back(
run
);
121
122
123
fill
(
m_packageName
,variables);
124
variables.clear();
125
return
StatusCode::SUCCESS;
126
}
127
128
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
L1CaloLegacyEDMMonitorAlgorithm.h
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
AthMonitorAlgorithm.cxx:22
AthMonitorAlgorithm::GetEventInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.).
Definition
AthMonitorAlgorithm.cxx:111
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthMonitorAlgorithm.cxx:8
L1CaloLegacyEDMMonitorAlgorithm::m_l1TauRoIKey
SG::ReadHandleKey< xAOD::EmTauRoIContainer > m_l1TauRoIKey
Definition
L1CaloLegacyEDMMonitorAlgorithm.h:25
L1CaloLegacyEDMMonitorAlgorithm::L1CaloLegacyEDMMonitorAlgorithm
L1CaloLegacyEDMMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition
L1CaloLegacyEDMMonitorAlgorithm.cxx:7
L1CaloLegacyEDMMonitorAlgorithm::m_packageName
StringProperty m_packageName
Definition
L1CaloLegacyEDMMonitorAlgorithm.h:24
L1CaloLegacyEDMMonitorAlgorithm::m_l1JetRoIKey
SG::ReadHandleKey< xAOD::JetRoIContainer > m_l1JetRoIKey
Definition
L1CaloLegacyEDMMonitorAlgorithm.h:26
L1CaloLegacyEDMMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition
L1CaloLegacyEDMMonitorAlgorithm.cxx:28
L1CaloLegacyEDMMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
L1CaloLegacyEDMMonitorAlgorithm.cxx:12
L1CaloLegacyEDMMonitorAlgorithm::m_l1EnergySumRoIKey
SG::ReadHandleKey< xAOD::EnergySumRoI > m_l1EnergySumRoIKey
Definition
L1CaloLegacyEDMMonitorAlgorithm.h:27
Monitored::Scalar
Declare a monitored scalar variable.
Definition
MonitoredScalar.h:34
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::EnergySumRoI_v2::energyT
float energyT() const
The deposited total transverse energy.
xAOD::EnergySumRoI_v2::energyX
float energyX() const
The total energy deposited in the X direction.
xAOD::EnergySumRoI_v2::energyY
float energyY() const
The total energy deposited in the Y direction.
xAOD::EnergySumRoI
EnergySumRoI_v2 EnergySumRoI
Definition
EnergySumRoI.h:16
fill
void fill(H5::Group &out_file, size_t iterations)
Definition
test-half-precision.cxx:64
run
int run(int argc, char *argv[])
Definition
ttree2hdf5.cxx:28
Generated on
for ATLAS Offline Software by
1.17.0