ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigMinBiasMonitoring
src
HLTHeavyIonMonAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
HLTHeavyIonMonAlg.h
"
6
7
#include "
AthenaBaseComps/AthCheckMacros.h
"
8
#include "
AthenaBaseComps/AthMsgStreamMacros.h
"
9
#include "
TrigDecisionTool/TrigDecisionTool.h
"
10
11
HLTHeavyIonMonAlg::HLTHeavyIonMonAlg
(
const
std::string& name, ISvcLocator* pSvcLocator)
12
:
AthMonitorAlgorithm
(name, pSvcLocator) {}
13
14
StatusCode
HLTHeavyIonMonAlg::initialize
() {
15
// for monitorSumEt:
16
ATH_CHECK
(
m_lvl1EnergySumROIKey
.initialize());
17
ATH_CHECK
(
m_jFexSumETRoIKey
.initialize());
18
ATH_CHECK
(
m_HIEventShapeKey
.initialize());
19
20
return
AthMonitorAlgorithm::initialize
();
21
}
22
23
StatusCode
HLTHeavyIonMonAlg::fillHistograms
(
const
EventContext& context)
const
{
24
ATH_CHECK
(
monitorSumEt
(context));
25
26
return
StatusCode::SUCCESS;
27
}
28
29
StatusCode
HLTHeavyIonMonAlg::monitorSumEt
(
const
EventContext& context)
const
{
30
// Legacy L1 stuff – left for HLT developer reprocessings
31
float
lvl1_sumET = 0.f;
32
auto
lvl1EnergySumHandle =
SG::makeHandle
(
m_lvl1EnergySumROIKey
, context);
33
ATH_MSG_DEBUG
(
"LVL1 EnergySum handle: "
<< lvl1EnergySumHandle.isValid());
34
if
(lvl1EnergySumHandle.isValid()) { lvl1_sumET = 1e-3 * lvl1EnergySumHandle->energyT();
/* MeV -> GeV */
}
35
36
auto
jFexSumETHandle =
SG::makeHandle
(
m_jFexSumETRoIKey
, context);
37
ATH_MSG_DEBUG
(
"jFeX EnergySum handle: "
<< jFexSumETHandle.isValid());
38
if
(not jFexSumETHandle.isValid()) {
39
ATH_MSG_DEBUG
(
"Could not retrieve jFexSumETHandle"
);
40
return
StatusCode::SUCCESS;
41
}
42
43
auto
HIEventShapeHandle =
SG::makeHandle
(
m_HIEventShapeKey
, context);
44
ATH_MSG_DEBUG
(
"HI event shape handle: "
<< HIEventShapeHandle.isValid());
45
if
(not HIEventShapeHandle.isValid()) {
46
ATH_MSG_DEBUG
(
"Could not retrieve HIEventShapeHandle"
);
47
return
StatusCode::SUCCESS;
48
}
49
50
// Calculate total and forward TE from jFEX
51
float
sum_jTE = 0.f;
52
float
sum_fwdA_jTE = 0.f;
53
float
sum_fwdC_jTE = 0.f;
54
55
for
(
const
xAOD::jFexSumETRoI
* jFexRoI : *jFexSumETHandle) {
56
sum_jTE += jFexRoI->Et_lower() + jFexRoI->Et_upper();
57
if
(jFexRoI->jFexNumber() == 0) { sum_fwdC_jTE += jFexRoI->Et_upper(); }
58
if
(jFexRoI->jFexNumber() == 5) { sum_fwdA_jTE += jFexRoI->Et_upper(); }
59
}
60
sum_jTE *= 0.001;
// MeV -> GeV
61
sum_fwdA_jTE *= 0.001;
62
sum_fwdC_jTE *= 0.001;
63
64
// Calculate FCal ET from HIEventShape
65
float
totalFCalEtSideA = 0.;
66
float
totalFCalEtSideC = 0.;
67
for
(
const
xAOD::HIEventShape
* es : *HIEventShapeHandle) {
68
const
int
layer = es->layer();
69
if
(layer < 21 or layer > 23) {
continue
; }
70
71
const
float
et
= es->et();
72
if
(std::abs(
et
) < 0.1) {
continue
; }
73
74
const
float
eta
= 0.5 * (es->etaMin() + es->etaMax());
75
if
(
eta
> 0.) {
76
totalFCalEtSideA +=
et
;
77
}
else
{
78
totalFCalEtSideC +=
et
;
79
}
80
}
81
totalFCalEtSideA *= 0.001;
// MeV -> GeV
82
totalFCalEtSideC *= 0.001;
83
84
auto
sum_L1TE =
Monitored::Scalar
(
"sum_L1TE"
, lvl1_sumET);
85
auto
sum_L1jTE =
Monitored::Scalar
(
"sum_L1jTE"
, sum_jTE);
86
auto
sum_L1FWDAjTE =
Monitored::Scalar
(
"sum_L1FWDAjTE"
, sum_fwdA_jTE);
87
auto
sum_L1FWDCjTE =
Monitored::Scalar
(
"sum_L1FWDCjTE"
, sum_fwdC_jTE);
88
auto
sum_FCalAEt =
Monitored::Scalar
(
"sum_FCalAEt"
, totalFCalEtSideA);
89
auto
sum_FCalCEt =
Monitored::Scalar
(
"sum_FCalCEt"
, totalFCalEtSideC);
90
91
const
auto
& trigDecTool =
getTrigDecisionTool
();
92
for
(
const
auto
& chain :
m_triggerListMon
) {
93
if
(not trigDecTool->isPassed(chain,
TrigDefs::requireDecision
)) {
continue
; }
94
95
fill
(chain +
"_sumEt"
, sum_L1TE, sum_L1jTE, sum_L1FWDAjTE, sum_L1FWDCjTE, sum_FCalAEt, sum_FCalCEt);
96
}
97
98
return
StatusCode::SUCCESS;
99
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
AthCheckMacros.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
AthMsgStreamMacros.h
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HLTHeavyIonMonAlg.h
TrigDecisionTool.h
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
AthMonitorAlgorithm.cxx:22
AthMonitorAlgorithm::getTrigDecisionTool
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Definition
AthMonitorAlgorithm.cxx:203
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthMonitorAlgorithm.cxx:8
HLTHeavyIonMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
Definition
HLTHeavyIonMonAlg.cxx:23
HLTHeavyIonMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition
HLTHeavyIonMonAlg.cxx:14
HLTHeavyIonMonAlg::m_triggerListMon
Gaudi::Property< std::vector< std::string > > m_triggerListMon
Definition
HLTHeavyIonMonAlg.h:37
HLTHeavyIonMonAlg::monitorSumEt
StatusCode monitorSumEt(const EventContext &context) const
Definition
HLTHeavyIonMonAlg.cxx:29
HLTHeavyIonMonAlg::m_lvl1EnergySumROIKey
SG::ReadHandleKey< xAOD::EnergySumRoI > m_lvl1EnergySumROIKey
Definition
HLTHeavyIonMonAlg.h:28
HLTHeavyIonMonAlg::m_jFexSumETRoIKey
SG::ReadHandleKey< xAOD::jFexSumETRoIContainer > m_jFexSumETRoIKey
Definition
HLTHeavyIonMonAlg.h:31
HLTHeavyIonMonAlg::m_HIEventShapeKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_HIEventShapeKey
Definition
HLTHeavyIonMonAlg.h:34
HLTHeavyIonMonAlg::HLTHeavyIonMonAlg
HLTHeavyIonMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
HLTHeavyIonMonAlg.cxx:11
Monitored::Scalar
Declare a monitored scalar variable.
Definition
MonitoredScalar.h:34
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
Fills a vector of variables to a group by reference.
Definition
AthMonitorAlgorithm.cxx:99
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
TrigDefs::requireDecision
static const unsigned int requireDecision
Definition
TrigEvent/TrigDecisionInterface/TrigDecisionInterface/Conditions.h:25
xAOD::jFexSumETRoI
jFexSumETRoI_v1 jFexSumETRoI
Define the latest version of the jFexSumETJetRoI class.
Definition
jFexSumETRoI.h:13
xAOD::HIEventShape
HIEventShape_v2 HIEventShape
Definition of the latest event info version.
Definition
HIEventShape.h:16
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0