ATLAS Offline Software
MuonTrackMonitorAlgorithm.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3  2020 Matthias Schott - Uni Mainz
4 */
5 
6 #ifndef MUON_TRACKALGORITHM_H
7 #define MUON_TRACKALGORITHM_H
8 
10 
11 #include "xAODMuon/MuonContainer.h"
14 #include <vector>
15 #include <string>
18 
19 
20 // AthMonitorAlgorithm
22 {
23 
24  public:
25 
26  MuonTrackMonitorAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
27 
29  virtual StatusCode initialize() override;
30  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
31 
32  private:
33 
34  SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerKey{this, "MuonContainerKey", "Muons", "Key for Muon Containers" };
35  SG::ReadDecorHandleKey<xAOD::MuonContainer> m_MuonIsoDecorKey{this, "MuonIsoDecorKey", "Muons.ptcone30" };
36  SG::ReadHandleKey<xAOD::VertexContainer> m_VertexContainerKey{this, "PrimaryVerticesKey", "PrimaryVertices", "Key for primary VertexContainers"};
37  SG::ReadHandleKey<xAOD::EventInfo> m_derEventInfoKey{this, "EventInfo", "EventInfo", ""};
38  SG::ReadDecorHandleKeyArray<xAOD::EventInfo> m_beamSpotKey{this, "BeamSpotKeys" ,{}, "Add the scheduler dependencies on the beamspot information"};
39 
40  Gaudi::Property<bool> m_useBeamSpot{this, "RequireBeamSpot", true, "Ensure that the dependency on the beamspot variables is established."};
41 
42  // Tools
47  StatusCode FillMuonInformation(const std::string& sIdentifier, std::vector<const xAOD::Muon*> &vecMuons, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const;
48 
50  StatusCode FillTrackInformation(const std::string& sIdentifier, const xAOD::Muon* muon, const xAOD::Vertex *pvtx, const std::string& sTrack, const xAOD::EventInfo &evt) const;
51 
53  //StatusCode analyseLowLevelMuonFeatures(const std::string& sIdentifier, const xAOD::MuonContainer& Muons, uint32_t lumiBlockID) const;
54  StatusCode analyseLowLevelMuonFeatures(const std::string& sIdentifier, std::vector<const xAOD::Muon*> &Muons, const xAOD::EventInfo &evt) const;
55 
58 
61 
64 
66  StatusCode plotResonanceCandidates(const std::string& resonanceName, std::vector<const xAOD::Muon*>& muonCandidates, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const;
67 
68  Gaudi::Property< std::vector<std::string> > m_hltchainList{ this, "HLTTriggerList", {"HLT_2mu14_L12MU8F", "HLT_mu24_ivarmedium_L1MU14FCH"}, "High-level triggers used" };
69 
70  Gaudi::Property< float > m_CBmuons_minPt{ this, "CBmuons_minPt", 20000., "Minimal muon pt used for CB muons" };
71 
72  Gaudi::Property< float > m_ZBosonSelection_minPt{ this, "ZBosonSelection_minPt", 20000., "Minimal muon pt used for Z analysis" };
73  Gaudi::Property< float > m_ZBosonSelection_maxEta{ this, "ZBosonSelection_maxEta", 2.5, "Maximal muon eta used for Z analysis" };
74  Gaudi::Property< float > m_ZBosonSelection_trkIsolation{ this, "ZBosonSelection_trkIsolation", 0.2, "Track DeltaR isolation criteria" };
75  Gaudi::Property< float > m_ZBosonSelection_D0Cut{ this, "ZBosonSelection_D0Cut", 100., "D0 cut applied for Z boson analysis" };
76  Gaudi::Property< float > m_ZBosonSelection_Z0Cut{ this, "ZBosonSelection_Z0Cut", 100., "Z0 cut applied for Z boson analysis" };
77  Gaudi::Property< float > m_ZBosonSelection_minMass{ this, "ZBosonSelection_minMass", 76000., "Minimal accepted Z boson mass" };
78  Gaudi::Property< float > m_ZBosonSelection_maxMass{ this, "ZBosonSelection_maxMass", 106000., "Maximal accepted Z boson mass" };
79 
80  Gaudi::Property< float > m_JpsiSelection_minPt{ this, "JpsiSelection_minPt", 4000., "Minimal muon pt used for Jpsi analysis" };
81  Gaudi::Property< float > m_JpsiSelection_maxEta{ this, "JpsiSelection_maxEta", 2.5, "Maximal muon eta used for Jpsi analysis" };
82  Gaudi::Property< float > m_JpsiSelection_trkIsolation{ this, "JpsiSelection_trkIsolation", 1.0, "Jpsi track DeltaR isolation criteria" };
83  Gaudi::Property< float > m_JpsiSelection_D0Cut{ this, "JpsiSelection_D0Cut", 100., "D0 cut applied for Jpsi analysis" };
84  Gaudi::Property< float > m_JpsiSelection_Z0Cut{ this, "JpsiSelection_Z0Cut", 100., "Z0 cut applied for Jpsi analysis" };
85  Gaudi::Property< float > m_JpsiSelection_minMass{ this, "JpsiSelection_minMass", 2600, "Minimal accepted Jpsi mass" };
86  Gaudi::Property< float > m_JpsiSelection_maxMass{ this, "JpsiSelection_maxMass", 3600, "Maximal accepted Jpsi mass" };
87 };
88 
89 
90 #endif
91 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonTrackMonitorAlgorithm::m_MuonIsoDecorKey
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_MuonIsoDecorKey
Definition: MuonTrackMonitorAlgorithm.h:35
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
MuonTrackMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: MuonTrackMonitorAlgorithm.cxx:657
MuonTrackMonitorAlgorithm::m_JpsiSelection_minMass
Gaudi::Property< float > m_JpsiSelection_minMass
Definition: MuonTrackMonitorAlgorithm.h:85
MuonTrackMonitorAlgorithm::analyseCombinedTracks
StatusCode analyseCombinedTracks(const xAOD::MuonContainer &Muons, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const
Function to create performance plots for all combined muons.
Definition: MuonTrackMonitorAlgorithm.cxx:346
MuonTrackMonitorAlgorithm::MuonTrackMonitorAlgorithm
MuonTrackMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonTrackMonitorAlgorithm.cxx:16
MuonTrackMonitorAlgorithm::m_ZBosonSelection_minPt
Gaudi::Property< float > m_ZBosonSelection_minPt
Definition: MuonTrackMonitorAlgorithm.h:72
MuonTrackMonitorAlgorithm::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition: MuonTrackMonitorAlgorithm.h:34
MuonTrackMonitorAlgorithm::m_JpsiSelection_trkIsolation
Gaudi::Property< float > m_JpsiSelection_trkIsolation
Definition: MuonTrackMonitorAlgorithm.h:82
MuonTrackMonitorAlgorithm::m_JpsiSelection_maxMass
Gaudi::Property< float > m_JpsiSelection_maxMass
Definition: MuonTrackMonitorAlgorithm.h:86
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
MuonTrackMonitorAlgorithm::analyseResonanceCandidates
StatusCode analyseResonanceCandidates(const xAOD::MuonContainer &Muons, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const
Function to create performance plots for all combined muons that lead to a Z Boson Candidate event.
Definition: MuonTrackMonitorAlgorithm.cxx:613
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
MuonTrackMonitorAlgorithm::m_VertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexContainerKey
Definition: MuonTrackMonitorAlgorithm.h:36
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
MuonTrackMonitorAlgorithm::m_ZBosonSelection_maxMass
Gaudi::Property< float > m_ZBosonSelection_maxMass
Definition: MuonTrackMonitorAlgorithm.h:78
MuonTrackMonitorAlgorithm::getPrimaryVertex
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer &Vertices) const
Function to get the primary vertex.
Definition: MuonTrackMonitorAlgorithm.cxx:695
MuonTrackMonitorAlgorithm::m_beamSpotKey
SG::ReadDecorHandleKeyArray< xAOD::EventInfo > m_beamSpotKey
Definition: MuonTrackMonitorAlgorithm.h:38
MuonTrackMonitorAlgorithm
Definition: MuonTrackMonitorAlgorithm.py:1
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
MuonTrackMonitorAlgorithm::m_JpsiSelection_minPt
Gaudi::Property< float > m_JpsiSelection_minPt
Definition: MuonTrackMonitorAlgorithm.h:80
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
MuonTrackMonitorAlgorithm::m_JpsiSelection_maxEta
Gaudi::Property< float > m_JpsiSelection_maxEta
Definition: MuonTrackMonitorAlgorithm.h:81
MuonTrackMonitorAlgorithm::m_JpsiSelection_D0Cut
Gaudi::Property< float > m_JpsiSelection_D0Cut
Definition: MuonTrackMonitorAlgorithm.h:83
MuonTrackMonitorAlgorithm::m_ZBosonSelection_maxEta
Gaudi::Property< float > m_ZBosonSelection_maxEta
Definition: MuonTrackMonitorAlgorithm.h:73
MuonTrackMonitorAlgorithm::m_ZBosonSelection_trkIsolation
Gaudi::Property< float > m_ZBosonSelection_trkIsolation
Definition: MuonTrackMonitorAlgorithm.h:74
MuonTrackMonitorAlgorithm::plotResonanceCandidates
StatusCode plotResonanceCandidates(const std::string &resonanceName, std::vector< const xAOD::Muon * > &muonCandidates, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const
Function to create performance plots for all combined muons that lead to a Jpsi Meson Candidate event...
Definition: MuonTrackMonitorAlgorithm.cxx:461
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonTrackMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: MuonTrackMonitorAlgorithm.cxx:20
MuonTrackMonitorAlgorithm::m_ZBosonSelection_Z0Cut
Gaudi::Property< float > m_ZBosonSelection_Z0Cut
Definition: MuonTrackMonitorAlgorithm.h:76
MuonTrackMonitorAlgorithm::FillMuonInformation
StatusCode FillMuonInformation(const std::string &sIdentifier, std::vector< const xAOD::Muon * > &vecMuons, const xAOD::Vertex *pvtx, const xAOD::EventInfo &evt) const
Fills data-quality information (e.g.
Definition: MuonTrackMonitorAlgorithm.cxx:94
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MuonContainer.h
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
MuonTrackMonitorAlgorithm::m_ZBosonSelection_D0Cut
Gaudi::Property< float > m_ZBosonSelection_D0Cut
Definition: MuonTrackMonitorAlgorithm.h:75
MuonTrackMonitorAlgorithm::m_JpsiSelection_Z0Cut
Gaudi::Property< float > m_JpsiSelection_Z0Cut
Definition: MuonTrackMonitorAlgorithm.h:84
MuonTrackMonitorAlgorithm::m_useBeamSpot
Gaudi::Property< bool > m_useBeamSpot
Definition: MuonTrackMonitorAlgorithm.h:40
MuonTrackMonitorAlgorithm::~MuonTrackMonitorAlgorithm
virtual ~MuonTrackMonitorAlgorithm()
Definition: MuonTrackMonitorAlgorithm.h:28
MuonTrackMonitorAlgorithm::m_derEventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_derEventInfoKey
Definition: MuonTrackMonitorAlgorithm.h:37
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
MuonTrackMonitorAlgorithm::analyseLowLevelMuonFeatures
StatusCode analyseLowLevelMuonFeatures(const std::string &sIdentifier, std::vector< const xAOD::Muon * > &Muons, const xAOD::EventInfo &evt) const
Function to create performance plots for muon standalone tracks with some detailed informatiom.
Definition: MuonTrackMonitorAlgorithm.cxx:255
NSWL1::Vertices
std::vector< Vertex > Vertices
Definition: GeoUtils.h:19
ReadDecorHandleKeyArray.h
MuonTrackMonitorAlgorithm::m_CBmuons_minPt
Gaudi::Property< float > m_CBmuons_minPt
Definition: MuonTrackMonitorAlgorithm.h:70
MuonTrackMonitorAlgorithm::m_hltchainList
Gaudi::Property< std::vector< std::string > > m_hltchainList
Definition: MuonTrackMonitorAlgorithm.h:68
MuonTrackMonitorAlgorithm::m_ZBosonSelection_minMass
Gaudi::Property< float > m_ZBosonSelection_minMass
Definition: MuonTrackMonitorAlgorithm.h:77
MuonTrackMonitorAlgorithm::FillTrackInformation
StatusCode FillTrackInformation(const std::string &sIdentifier, const xAOD::Muon *muon, const xAOD::Vertex *pvtx, const std::string &sTrack, const xAOD::EventInfo &evt) const
Function to fill low level Track information.
Definition: MuonTrackMonitorAlgorithm.cxx:38