ATLAS Offline Software
Loading...
Searching...
No Matches
ZmumuEvent.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_ZMUMUEVENT_H
6#define IDPERFMON_ZMUMUEVENT_H
7
8//==============================================================================
9// Include files...
10//==============================================================================
11#include "CLHEP/Vector/LorentzVector.h"
13
16
17#include "AsgTools/ToolHandle.h"
19//==============================================================================
20// Forward class declarations...
21//==============================================================================
22class TrackParticle;
23
24//==============================================================================
25// Class declaration...
26//==============================================================================
28{
29 public:
30 ZmumuEvent();
31 virtual ~ZmumuEvent();
32
33 enum
34 {
40 };
41
42 enum
43 {
48 };
49
50 enum ZTYPE
51 {
52 MS, // Just the muon system ( uncorrected )
53 ME, // The adjusted muon system properties ( corr. for cal. )
54 ID, // Using the ID system.
55 CB, // Using both the muon & ID system.
57 };
58
59 virtual void Init();
60 // virtual bool Reco ATLAS_NOT_REENTRANT ();
61 virtual bool Reco (int theLumiBlock = 0);
62
63 // Public access methods
64 inline void doIsoSelection (bool doIso) { m_xMuonID.doIsoSelection(doIso); }
65 inline void doIPSelection (bool doIPsel) { m_xMuonID.doIPSelection(doIPsel); }
66 inline void doMCPSelection (bool doMCP) { m_xMuonID.doMCPSelection(doMCP); }
67 inline bool AcceptEvent() { return m_passedSelectionCuts; }
68 void finalize();
69 inline unsigned int getAcceptedEvents () { return m_acceptedEventCount; }
70 const xAOD::Muon* getCombMuon( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxRecMuon[uPart] : NULL; }
71 const xAOD::TrackParticle* getIDTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxIDTrack[uPart] : NULL; }
72 inline double GetInvMass () {return m_DiMuonPairInvMass;}
73 const float& getLeptonOpeningAngle( ZTYPE eType ) { return m_fMuonDispersion[eType]; }
74 const xAOD::TrackParticle* getLooseIDTk ATLAS_NOT_REENTRANT ( unsigned int uPart );
75 const xAOD::TrackParticle* getMSTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxMSTrack[uPart] : NULL; }
76 unsigned int getNegMuon( ZTYPE eType );
77 inline unsigned int getNumberOfTaggedMuons() { return m_numberOfFullPassMuons; }
78 unsigned int getPosMuon( ZTYPE eType );
79 float getPtImbalance( ZTYPE eType );
80 const std::string getRegion() const ;
81 inline unsigned int getTestedMuonCount() { return m_testedMuonCount; }
82 int getZCharge( ZTYPE eType );
83 const float& getZEta( ZTYPE eType ) { return m_fZEtaDir[eType]; }
84 const float& getZMass( ZTYPE eType ) { return m_fInvariantMass[eType]; }
85 const float& getZPhi( ZTYPE eType ) { return m_fZPhiDir[eType]; }
86 const float& getZPt( ZTYPE eType ) { return m_fZPt[eType]; }
87 void OrderMuonList ();
88 inline void setDebugMode (bool debug) { m_doDebug=debug; }
89 inline void SetMaxLumiBlock (int newlumiblock) { m_maxGoodLumiBlock = newlumiblock; }
90 inline void SetMinLumiBlock (int newlumiblock) { m_minGoodLumiBlock = newlumiblock; }
91 inline void SetMuonPtCut (double newvalue) { m_xMuonID.SetPtCut(newvalue); }
92 inline void SetMuonQuality (const std::string& newname) { m_xMuonID.SetMuonQualityRequirement(newname); }
93
94 inline void SetMassWindowLow (double newvalue) { m_MassWindowLow = newvalue; }
95 inline void SetMassWindowHigh (double newvalue) { m_MassWindowHigh = newvalue; }
96 void SetLeadingMuonPtCut (double newvalue);
97 void SetSecondMuonPtCut (double newvalue);
98 inline void SetOpeningAngleCut (double newvalue) {m_OpeningAngleCut = newvalue;}
99 inline void SetZ0GapCut (double newvalue) {m_Z0GapCut = newvalue;}
100 inline void SetSkipMSCheck (bool value) {m_skipMScheck = value;}
101
103 inline void SetMuonSelectionTool ( ToolHandle<CP::IMuonSelectionTool> mst ) { m_muonSelectionTool = mst; m_xMuonID.SetCustomMuonSelectionTool (mst); };
104
105 protected:
106 virtual void BookHistograms();
107
108 private:
110
111 // Private methods
112 void Clear();
113 bool EventSelection (ZTYPE eType);
115 bool RecordMuon( const xAOD::Muon* pxMuon );
116
117 // Active mu-cuts for the analysis
120 ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
121
122 // Tag Setup variables
123 unsigned int m_uMuonTags;
124 unsigned int m_uTrackMatch;
126 double m_etaCut;
128
138
140 // Member variables : Mostly to store relevant muon data for quick access.
146 unsigned int m_acceptedEventCount{};
147 unsigned int m_testedMuonCount{};
148 unsigned int m_acceptedMuonCount{};
158
159
161 const xAOD::TrackParticle* m_pxMETrack[NUM_MUONS]{}; // Pointer to muon spectro ( corr. )
162 const xAOD::TrackParticle* m_pxMSTrack[NUM_MUONS]{}; // Pointer to muon spectro
163 const xAOD::TrackParticle* m_pxIDTrack[NUM_MUONS]{}; // Pointer to ID track
164
165 // Keep kinematic information on the Z
171
172 // Graphs
178
179 // muon selector configuration
182
183 // selected muon identifiers
184 int m_muon1 = 0;
185 int m_muon2 = 0;
186
187};
188//==============================================================================
189#endif
const bool debug
EventAnalysis PARENT
Definition ZmumuEvent.h:109
void SetOpeningAngleCut(double newvalue)
Definition ZmumuEvent.h:98
double m_LeadingMuonPtCut
Definition ZmumuEvent.h:129
bool m_doDebug
Definition ZmumuEvent.h:139
void OrderMuonList()
int m_analyzedEventCount
Definition ZmumuEvent.h:143
float getPtImbalance(ZTYPE eType)
double m_Z0GapCut
Definition ZmumuEvent.h:134
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition ZmumuEvent.h:120
unsigned int m_testedMuonCount
Definition ZmumuEvent.h:147
unsigned int m_eventselectioncount_masswindow
Definition ZmumuEvent.h:154
bool m_skipMScheck
Definition ZmumuEvent.h:135
int getZCharge(ZTYPE eType)
virtual void Init()
const float & getZPt(ZTYPE eType)
Definition ZmumuEvent.h:86
unsigned int m_acceptedEventCount
Definition ZmumuEvent.h:146
bool m_SelectMuonByIP
Definition ZmumuEvent.h:181
float m_fZEtaDir[NUM_TYPES]
Definition ZmumuEvent.h:167
double m_etaCut
Definition ZmumuEvent.h:126
const xAOD::Muon * getCombMuon(unsigned int uPart)
Definition ZmumuEvent.h:70
void setDebugMode(bool debug)
Definition ZmumuEvent.h:88
void SetMinLumiBlock(int newlumiblock)
Definition ZmumuEvent.h:90
void doMCPSelection(bool doMCP)
Definition ZmumuEvent.h:66
const xAOD::TrackParticle * m_pxMSTrack[NUM_MUONS]
Definition ZmumuEvent.h:162
bool m_SelectMuonByIso
Definition ZmumuEvent.h:180
void SetMuonQuality(const std::string &newname)
Definition ZmumuEvent.h:92
unsigned int m_eventsWithEnoughMuonsCount
Definition ZmumuEvent.h:145
const float & getZMass(ZTYPE eType)
Definition ZmumuEvent.h:84
void ReconstructKinematics()
unsigned int m_eventselectioncount_toofewmuons
Definition ZmumuEvent.h:149
unsigned int m_eventselectioncount_goodlumiblock
Definition ZmumuEvent.h:157
int m_maxGoodLumiBlock
Definition ZmumuEvent.h:137
const xAOD::TrackParticle *getLooseIDTk ATLAS_NOT_REENTRANT(unsigned int uPart)
unsigned int m_eventselectioncount_ptofsecondmuon
Definition ZmumuEvent.h:153
float m_fZPhiDir[NUM_TYPES]
Definition ZmumuEvent.h:168
int m_minGoodLumiBlock
Definition ZmumuEvent.h:136
bool EventSelection(ZTYPE eType)
double m_MassWindowHigh
Definition ZmumuEvent.h:132
MuonSelector m_xMuonID
Definition ZmumuEvent.h:118
unsigned int m_eventsWithoutEnoughMuonsCount
Definition ZmumuEvent.h:144
bool AcceptEvent()
Definition ZmumuEvent.h:67
double GetInvMass()
Definition ZmumuEvent.h:72
unsigned int m_uTrackMatch
Definition ZmumuEvent.h:124
unsigned int m_eventselectioncount_notallmuonsfilled
Definition ZmumuEvent.h:150
unsigned int m_uMuonTags
Definition ZmumuEvent.h:123
float m_fZPt[NUM_TYPES]
Definition ZmumuEvent.h:166
unsigned int m_eventselectioncount_openingangle
Definition ZmumuEvent.h:155
const xAOD::TrackParticle * m_pxIDTrack[NUM_MUONS]
Definition ZmumuEvent.h:163
const xAOD::Muon * m_pxRecMuon[NUM_MUONS]
Definition ZmumuEvent.h:160
unsigned int getNumberOfTaggedMuons()
Definition ZmumuEvent.h:77
void SetMassWindowHigh(double newvalue)
Definition ZmumuEvent.h:95
unsigned int getPosMuon(ZTYPE eType)
double m_SecondMuonPtCut
Definition ZmumuEvent.h:130
float m_fInvariantMass[NUM_TYPES]
Definition ZmumuEvent.h:169
float m_fMuonDispersion[NUM_TYPES]
Definition ZmumuEvent.h:170
unsigned int m_numberOfFullPassMuons
Definition ZmumuEvent.h:141
void doIPSelection(bool doIPsel)
Definition ZmumuEvent.h:65
void SetSkipMSCheck(bool value)
Definition ZmumuEvent.h:100
unsigned int m_acceptedMuonCount
Definition ZmumuEvent.h:148
double m_MassWindowLow
Definition ZmumuEvent.h:131
bool m_bLooseMatch
Definition ZmumuEvent.h:125
const xAOD::TrackParticle * getIDTrack(unsigned int uPart)
Definition ZmumuEvent.h:71
bool m_passedSelectionCuts
Definition ZmumuEvent.h:142
const float & getZPhi(ZTYPE eType)
Definition ZmumuEvent.h:85
unsigned int getTestedMuonCount()
Definition ZmumuEvent.h:81
void setContainer(PerfMonServices::CONTAINERS container)
Definition ZmumuEvent.h:102
unsigned int m_eventselectioncount_morethantwomuons
Definition ZmumuEvent.h:151
void SetSecondMuonPtCut(double newvalue)
const std::string getRegion() const
double m_OpeningAngleCut
Definition ZmumuEvent.h:133
void finalize()
void SetLeadingMuonPtCut(double newvalue)
void SetMuonPtCut(double newvalue)
Definition ZmumuEvent.h:91
unsigned int getAcceptedEvents()
Definition ZmumuEvent.h:69
const float & getZEta(ZTYPE eType)
Definition ZmumuEvent.h:83
const xAOD::TrackParticle * m_pxMETrack[NUM_MUONS]
Definition ZmumuEvent.h:161
virtual ~ZmumuEvent()
unsigned int m_eventselectioncount_dimuoncharge
Definition ZmumuEvent.h:156
void SetMuonSelectionTool(ToolHandle< CP::IMuonSelectionTool > mst)
Definition ZmumuEvent.h:103
unsigned int m_eventselectioncount_ptofleadingmuon
Definition ZmumuEvent.h:152
void SetMassWindowLow(double newvalue)
Definition ZmumuEvent.h:94
void SetZ0GapCut(double newvalue)
Definition ZmumuEvent.h:99
const float & getLeptonOpeningAngle(ZTYPE eType)
Definition ZmumuEvent.h:73
void SetMaxLumiBlock(int newlumiblock)
Definition ZmumuEvent.h:89
PerfMonServices::CONTAINERS m_container
Definition ZmumuEvent.h:119
bool RecordMuon(const xAOD::Muon *pxMuon)
const xAOD::TrackParticle * getMSTrack(unsigned int uPart)
Definition ZmumuEvent.h:75
unsigned int getNegMuon(ZTYPE eType)
double m_DiMuonPairInvMass
Definition ZmumuEvent.h:127
virtual void BookHistograms()
void doIsoSelection(bool doIso)
Definition ZmumuEvent.h:64
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version: