ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonMonitorAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGMUONMONITORING_TRIGMUONMONITORALGORITHM_H
6#define TRIGMUONMONITORING_TRIGMUONMONITORALGORITHM_H
7
12#include "MuonMatchingTool.h"
13
14
23
24 public:
25 TrigMuonMonitorAlgorithm(const std::string& name, ISvcLocator* pSvcLocator );
26
27
28 virtual StatusCode initialize() override;
29
37 virtual StatusCode fillHistograms(const EventContext &ctx) const override;
38
39 protected:
40
46 virtual bool selectEvents() const;
47
54 virtual StatusCode selectMuons(SG::ReadHandle<xAOD::MuonContainer> &muons, std::vector<const xAOD::Muon*> &probes) const;
55
62 virtual StatusCode fillVariables(const EventContext &ctx) const;
63
72 virtual StatusCode fillVariablesPerOfflineMuon(const EventContext &ctx, const xAOD::Muon* mu) const;
73
82 virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const;
83
93 virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext &ctx, const xAOD::Muon* mu, const std::string &chain) const;
94
95
105 template <class T, class FUNCT>
106 StatusCode fillVariablesRatioPlots(const EventContext &ctx, const xAOD::Muon* mu,
107 std::string &&trigstep,
108 xAOD::Muon::TrackParticleType type,
109 FUNCT matchFunc) const;
110
119 template<class T>
120 StatusCode fillVariableEtaPhi(const EventContext &ctx,
121 SG::ReadHandleKey<DataVector<T> > ReadHandleKey,
122 std::string &&trigstep,
123 std::tuple<bool,double,double> (*PosFunc)(const T*) = &TrigMuonMonitorAlgorithm::defaultPosFunc<T>) const;
124
125 template<class T> static inline std::tuple<bool, double, double> defaultPosFunc(const T* trig);
126
127
128 // ToolHandle
129 ToolHandle<MuonMatchingTool> m_matchTool {this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"};
130 ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool{this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"};
131
132 // ReadHandles
133 SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerKey {this, "MuonContainerName", "Muons", "Offline muon container"};
134
135 // Properties
137 Gaudi::Property<std::vector<std::string> > m_monitored_chains {this, "MonitoredChains", {}, "Trigger chains that are monitored"};
139 Gaudi::Property<int> m_muontype {this, "MuonType", xAOD::Muon::MuonType::Combined, "MuonType used for monitoring"};
141 Gaudi::Property<std::string> m_group {this, "Group", "", "Histogram group"};
142
145
146};
147
149
150#endif //TRIGMUONMONITORING_TRIGMUONMONITORALGORITHM_H
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Derived DataVector<T>.
Definition DataVector.h:795
Property holding a SG store/key/clid from which a ReadHandle is made.
StatusCode fillVariablesRatioPlots(const EventContext &ctx, const xAOD::Muon *mu, std::string &&trigstep, xAOD::Muon::TrackParticleType type, FUNCT matchFunc) const
Function that fills variables of ratio plots.
virtual StatusCode selectMuons(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...
virtual StatusCode fillHistograms(const EventContext &ctx) const override
Function that steers anlayses.
Gaudi::Property< std::string > m_group
Name of monitored group.
TrigMuonMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
static std::tuple< bool, double, double > defaultPosFunc(const T *trig)
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...
Gaudi::Property< std::vector< std::string > > m_monitored_chains
List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPer...
virtual StatusCode fillVariables(const EventContext &ctx) const
Function that fills variables by just retrieving containers of trigger objects.
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...
const float m_ratio_measurement_threshold
Threshold for ratio measurement.
Gaudi::Property< int > m_muontype
Requirement for the offline muon type considered in analyses.
StatusCode fillVariableEtaPhi(const EventContext &ctx, SG::ReadHandleKey< DataVector< T > > ReadHandleKey, std::string &&trigstep, std::tuple< bool, double, double >(*PosFunc)(const T *)=&TrigMuonMonitorAlgorithm::defaultPosFunc< T >) const
Function that fills variables of etaphi2D plots.
virtual StatusCode initialize() override
initialize
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
virtual bool selectEvents() const
Function that defines the event selection for anlayses User should reimlement in a subclass if needed...
ToolHandle< MuonMatchingTool > m_matchTool
virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains.
Muon_v1 Muon
Reference the current persistent version: