ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSelector.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef IDPERFMON_MUONSELECTOR_H
6#define IDPERFMON_MUONSELECTOR_H
7
8//==============================================================================
9// Include files...
10//==============================================================================
12
13#include <map>
14#include "TH1.h"
15
16#include "xAODMuon/Muon.h"
17#include "xAODTracking/Vertex.h"
19#include <atomic>
20#include "GaudiKernel/ServiceHandle.h"
21#include "AsgTools/ToolHandle.h"
24
25
26#include "CLHEP/Units/SystemOfUnits.h"
27#include "CLHEP/Units/PhysicalConstants.h"
28
30//==============================================================================
31// Forward class declarations...
32//==============================================================================
34{
35 public:
38
39 MuonSelector (const MuonSelector&) = delete;
41
42 // for some cases one may need ATLAS_NOT_REENTRANT
43 bool passSelection ( const xAOD::Muon* pxMuon );
45 ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
46
47
48 // Override functions from EventAnalysis
49 virtual void Init();
50 inline void doIsoSelection (bool doIso) {m_doIsoSelection = doIso;}
51 inline void doIPSelection (bool doIPsel) {m_doIPSelection = doIPsel;}
52 inline void doMCPSelection (bool domcp) {m_doMCPSelection = domcp;}
53 virtual void finalize();
54 inline void SetPtCut (double newvalue) {m_combPtCut = newvalue;}
55 inline double GetPtCut () {return m_combPtCut;}
56 virtual bool Reco();
57 void SetMuonQualityRequirement (std::string newname);
58 void SetCustomMuonSelectionTool (ToolHandle<CP::IMuonSelectionTool> mst) { m_muonSelectionTool = mst; };
59
60 protected:
61 virtual void BookHistograms();
62
63 private:
65
66 //static unsigned int s_uNumInstances;
67 unsigned int m_uNumInstances = 0U;
68
69 bool passQualCuts ();
70 bool passPtCuts ();
71 bool passIsolCuts ();
72 bool passIPCuts ();
73
74 // message stream
75 MsgStream * m_msgStream;
76
77 // Class variables
79
80 // requested muon tag (tight, medium, loose..)
82
83 // TrackIsolationTool* m_isolationTool;
84 double m_coneSize{};
85
86
87 // Cut variables. To go into a struct.
88 unsigned char m_ucJMuon_Cut;
89 double m_IsoCut;
90
92 float m_fEtaCut;
93
95 float m_ptMSCut;
96 float m_diffZCut; // mm
98 float m_pVZCut; // mm
99
100
104 unsigned char m_ucID_PIXCut;
105 unsigned char m_ucID_SCTCut;
106 unsigned char m_ucID_TRTCut;
107
114
115 // Lock cut selection after first muon.
117
118 // stats
119 unsigned int m_testedmuons{};
120 unsigned int m_passqual{};
121 unsigned int m_passiso{};
122 unsigned int m_passpt{};
123 unsigned int m_passip{};
124 unsigned int m_passmcp{};
125 unsigned int m_passall{};
126
127 // Graphs
133
134};
135
136#endif
const bool debug
double m_coneSize
unsigned int m_testedmuons
unsigned int m_passiso
const xAOD::Muon * m_pxMuon
virtual void Init()
float m_diffPtCut
virtual void BookHistograms()
void doMCPSelection(bool domcp)
void SetCustomMuonSelectionTool(ToolHandle< CP::IMuonSelectionTool > mst)
EventAnalysis PARENT
bool m_bCutOnCombKine
bool m_doIsoSelection
int m_requestedMuonQuality
void doIPSelection(bool doIPsel)
unsigned char m_ucID_TRTCut
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
MuonSelector & operator=(const MuonSelector &)=delete
unsigned char m_ucID_PIXCut
unsigned int m_passip
MuonSelector(const MuonSelector &)=delete
float m_fIDChiPerDofCut
void SetPtCut(double newvalue)
double m_IsoCut
unsigned int m_uNumInstances
unsigned int m_passpt
bool m_doQualSelection
void setDebug(bool debug)
unsigned char m_ucJMuon_Cut
unsigned char m_ucID_SCTCut
bool m_doMCPSelection
virtual void finalize()
double m_combPtCut
MsgStream * m_msgStream
unsigned int m_passqual
void SetMuonQualityRequirement(std::string newname)
unsigned int m_passmcp
virtual bool Reco()
double GetPtCut()
void doIsoSelection(bool doIso)
unsigned int m_passall
bool passSelection(const xAOD::Muon *pxMuon)
Muon_v1 Muon
Reference the current persistent version: