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