ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigMuonMonitoring
src
TrigMuonMonitorAlgorithm.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigMuonMonitorAlgorithm.h
"
6
7
8
TrigMuonMonitorAlgorithm :: TrigMuonMonitorAlgorithm(
const
std::string& name, ISvcLocator* pSvcLocator)
9
:
AthMonitorAlgorithm
(name, pSvcLocator)
10
{}
11
12
13
StatusCode TrigMuonMonitorAlgorithm :: initialize(){
14
StatusCode
sc
=
AthMonitorAlgorithm::initialize
();
15
ATH_CHECK
(
m_matchTool
.retrieve() );
16
ATH_CHECK
(
m_muonSelectionTool
.retrieve() );
17
ATH_CHECK
(
m_MuonContainerKey
.initialize() );
18
return
sc
;
19
}
20
21
22
StatusCode TrigMuonMonitorAlgorithm :: fillHistograms(
const
EventContext& ctx)
const
{
23
24
25
bool
passToMonitor =
selectEvents
();
26
27
if
(passToMonitor){
28
30
ATH_CHECK
(
fillVariables
(ctx));
31
33
for
(
const
std::string& chain :
m_monitored_chains
){
34
ATH_CHECK
(
fillVariablesPerChain
(ctx, chain) );
35
}
36
37
39
SG::ReadHandle<xAOD::MuonContainer>
muons(
m_MuonContainerKey
, ctx);
40
if
(! muons.
isValid
() ) {
41
ATH_MSG_ERROR
(
"evtStore() does not contain muon Collection with name "
<<
m_MuonContainerKey
);
42
return
StatusCode::FAILURE;
43
}
44
std::vector<const xAOD::Muon*> probes;
45
ATH_CHECK
(
selectMuons
(ctx, muons, probes));
46
47
for
(
const
xAOD::Muon
* mu : probes){
48
ATH_CHECK
(
fillVariablesPerOfflineMuon
(ctx, mu) );
49
51
for
(
const
std::string& chain :
m_monitored_chains
){
52
ATH_CHECK
(
fillVariablesPerOfflineMuonPerChain
(ctx, mu, chain) );
53
}
54
}
55
56
}
57
58
59
60
return
StatusCode::SUCCESS;
61
}
62
63
64
65
bool
TrigMuonMonitorAlgorithm :: selectEvents()
const
{
66
return
true
;
67
}
68
69
70
StatusCode TrigMuonMonitorAlgorithm :: selectMuons(
const
EventContext&
/*ctx*/
,
SG::ReadHandle<xAOD::MuonContainer>
&muons, std::vector<const xAOD::Muon*> &probes)
const
{
71
for
(
const
xAOD::Muon
* mu : *muons) {
72
if
(mu->author()==xAOD::Muon::Author::MuidCo &&
73
m_muonSelectionTool
->getQuality(*mu)<=xAOD::Muon::Quality::Medium ){
74
probes.push_back(mu);
75
}
76
}
77
return
StatusCode::SUCCESS;
78
}
79
80
81
StatusCode TrigMuonMonitorAlgorithm :: fillVariables(
const
EventContext& )
const
{
82
return
StatusCode::SUCCESS;
83
}
84
85
86
StatusCode TrigMuonMonitorAlgorithm :: fillVariablesPerOfflineMuon(
const
EventContext&,
const
xAOD::Muon
* )
const
{
87
return
StatusCode::SUCCESS;
88
}
89
90
StatusCode TrigMuonMonitorAlgorithm :: fillVariablesPerChain(
const
EventContext&,
const
std::string&)
const
{
91
return
StatusCode::SUCCESS;
92
}
93
94
StatusCode TrigMuonMonitorAlgorithm :: fillVariablesPerOfflineMuonPerChain(
const
EventContext&,
const
xAOD::Muon
* ,
const
std::string&)
const
{
95
return
StatusCode::SUCCESS;
96
}
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
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
TrigMuonMonitorAlgorithm.h
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
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrigMuonMonitorAlgorithm::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition
TrigMuonMonitorAlgorithm.h:134
TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuonPerChain
virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains comparing off...
Definition
TrigMuonMonitorAlgorithm.cxx:94
TrigMuonMonitorAlgorithm::m_monitored_chains
Gaudi::Property< std::vector< std::string > > m_monitored_chains
List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPer...
Definition
TrigMuonMonitorAlgorithm.h:138
TrigMuonMonitorAlgorithm::fillVariables
virtual StatusCode fillVariables(const EventContext &ctx) const
Function that fills variables by just retrieving containers of trigger objects.
Definition
TrigMuonMonitorAlgorithm.cxx:81
TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuon
virtual StatusCode fillVariablesPerOfflineMuon(const EventContext &ctx, const xAOD::Muon *mu) const
Function that fills variables that are compared to offline muons but the trigger chains are not speci...
Definition
TrigMuonMonitorAlgorithm.cxx:86
TrigMuonMonitorAlgorithm::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition
TrigMuonMonitorAlgorithm.h:131
TrigMuonMonitorAlgorithm::selectEvents
virtual bool selectEvents() const
Function that defines the event selection for anlayses User should reimlement in a subclass if needed...
Definition
TrigMuonMonitorAlgorithm.cxx:65
TrigMuonMonitorAlgorithm::m_matchTool
ToolHandle< MuonMatchingTool > m_matchTool
Definition
TrigMuonMonitorAlgorithm.h:130
TrigMuonMonitorAlgorithm::fillVariablesPerChain
virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains.
Definition
TrigMuonMonitorAlgorithm.cxx:90
TrigMuonMonitorAlgorithm::selectMuons
virtual StatusCode selectMuons(const EventContext &ctx, SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
Function that defines the event selection for anlayses Users should reimlement in a subclass if neede...
Definition
TrigMuonMonitorAlgorithm.cxx:70
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
Generated on
for ATLAS Offline Software by
1.17.0