ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigJetMonitoring
src
TrigL1FexJetMonitorAlgorithm.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 "
./DataStructs.h
"
6
#include "
TrigL1FexJetMonitorAlgorithm.h
"
7
#include "
AsgDataHandles/ReadDecorHandle.h
"
8
9
#include <vector>
10
11
TrigL1FexJetMonitorAlgorithm::TrigL1FexJetMonitorAlgorithm
(
const
std::string& name, ISvcLocator* pSvcLocator )
12
:
AthMonitorAlgorithm
(name,pSvcLocator){
13
}
14
15
TrigL1FexJetMonitorAlgorithm::~TrigL1FexJetMonitorAlgorithm
() {}
16
17
StatusCode
TrigL1FexJetMonitorAlgorithm::initialize
() {
18
19
// verify that the tool handle is pointing to an accessible tool
20
if
(
m_filler
.retrieve().isFailure() ) {
21
ATH_MSG_FATAL
(
"Failed to retrieve "
<<
m_filler
);
22
return
StatusCode::FAILURE;
23
}
24
25
return
AthMonitorAlgorithm::initialize
();
26
}
27
28
29
StatusCode
TrigL1FexJetMonitorAlgorithm::fillHistograms
(
const
EventContext& ctx)
const
{
30
31
std::vector<JetData> jetData;
32
33
auto
sc
=
m_filler
->getData(ctx, jetData);
34
if
(
sc
.isFailure()) {
35
return
sc
;
36
}
37
38
const
auto
&groupTool =
getGroup
(
m_groupName
);
39
40
for
(
const
auto
& jd : jetData) {
41
Monitored::Scalar<float>
et
{jd.m_et_label, jd.m_et};
42
Monitored::Scalar<float>
eta
{
"eta"
, jd.m_eta};
43
Monitored::Scalar<float>
phi
{
"phi"
, jd.m_phi};
44
45
// fill does not return a StatusCode object
46
fill
(groupTool,
et
,
eta
,
phi
);
47
}
48
49
std::vector<JetMatchData> jetMatchData;
50
sc
=
m_filler
->getMatchData(ctx,
51
MatchToEnum::hlt
,
52
jetMatchData);
53
if
(
sc
.isFailure()) {
54
return
sc
;
55
}
56
57
for
(
const
auto
& jd : jetMatchData) {
58
auto
dPt =
Monitored::Scalar
(
"hltptdiff"
, jd.m_dPt);
59
auto
dEnergy =
Monitored::Scalar
(
"hltenergydiff"
, jd.m_dEnergy);
60
auto
dMass =
Monitored::Scalar
(
"hltmassdiff"
, jd.m_dMass);
61
auto
rPt =
Monitored::Scalar
(
"hltptresp"
, jd.m_rPt);
62
auto
rEnergy =
Monitored::Scalar
(
"hltenergyresp"
, jd.m_rEnergy);
63
auto
rMass =
Monitored::Scalar
(
"hltmassresp"
, jd.m_rMass);
64
auto
ptRef =
Monitored::Scalar
(
"hltptref"
, jd.m_ptRef);
65
auto
etaRef =
Monitored::Scalar
(
"hltetaref"
, jd.m_etaRef);
66
67
// fill does not return a StatusCode object
68
fill
(groupTool, dPt, dEnergy, dMass, rPt, rEnergy, rMass, ptRef, etaRef);
69
}
70
71
72
73
jetMatchData.clear();
74
sc
=
m_filler
->getMatchData(ctx,
75
MatchToEnum::offline
,
76
jetMatchData);
77
if
(
sc
.isFailure()) {
78
return
sc
;
79
}
80
81
for
(
const
auto
& jd : jetMatchData) {
82
auto
dPt =
Monitored::Scalar
(
"offptdiff"
, jd.m_dPt);
83
auto
dEnergy =
Monitored::Scalar
(
"offenergydiff"
, jd.m_dEnergy);
84
auto
dMass =
Monitored::Scalar
(
"offmassdiff"
, jd.m_dMass);
85
auto
rPt =
Monitored::Scalar
(
"offptresp"
, jd.m_rPt);
86
auto
rEnergy =
Monitored::Scalar
(
"offenergyresp"
, jd.m_rEnergy);
87
auto
rMass =
Monitored::Scalar
(
"offmassresp"
, jd.m_rMass);
88
auto
ptRef =
Monitored::Scalar
(
"offptref"
, jd.m_ptRef);
89
auto
etaRef =
Monitored::Scalar
(
"offetaref"
, jd.m_etaRef);
90
91
// fill does not return a StatusCode object
92
fill
(groupTool, dPt, dEnergy, dMass, rPt, rEnergy, rMass, ptRef, etaRef);
93
}
94
95
return
StatusCode::SUCCESS;
96
}
97
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ReadDecorHandle.h
Handle class for reading a decoration on an object.
DataStructs.h
MatchToEnum::offline
@ offline
Definition
ITrigJetMonitorTool.h:17
MatchToEnum::hlt
@ hlt
Definition
ITrigJetMonitorTool.h:17
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
TrigL1FexJetMonitorAlgorithm.h
AthMonitorAlgorithm::getGroup
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.
Definition
AthMonitorAlgorithm.cxx:168
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
AthMonitorAlgorithm.cxx:22
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthMonitorAlgorithm.cxx:8
Monitored::Scalar
Declare a monitored scalar variable.
Definition
MonitoredScalar.h:34
TrigL1FexJetMonitorAlgorithm::m_groupName
Gaudi::Property< std::string > m_groupName
Definition
TrigL1FexJetMonitorAlgorithm.h:37
TrigL1FexJetMonitorAlgorithm::TrigL1FexJetMonitorAlgorithm
TrigL1FexJetMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition
TrigL1FexJetMonitorAlgorithm.cxx:11
TrigL1FexJetMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
TrigL1FexJetMonitorAlgorithm.cxx:17
TrigL1FexJetMonitorAlgorithm::m_filler
ToolHandle< ITrigJetMonitorTool > m_filler
Definition
TrigL1FexJetMonitorAlgorithm.h:34
TrigL1FexJetMonitorAlgorithm::~TrigL1FexJetMonitorAlgorithm
virtual ~TrigL1FexJetMonitorAlgorithm()
Definition
TrigL1FexJetMonitorAlgorithm.cxx:15
TrigL1FexJetMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition
TrigL1FexJetMonitorAlgorithm.cxx:29
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
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0