ATLAS Offline Software
Loading...
Searching...
No Matches
FourMuonEvent.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_FOURMUONEVENT_H
6#define IDPERFMON_FOURMUONEVENT_H
7
8//==============================================================================
9// Include files...
10//==============================================================================
11#include "CLHEP/Vector/LorentzVector.h"
14
17
18#include "xAODMuon/Muon.h"
20
21#include "xAODEgamma/Electron.h"
23
24//-
27// Forward class declarations...
28//==============================================================================
29class TrackParticle;
30
31//==============================================================================
32// Class declaration...
33//==============================================================================
35{
36 public:
38 virtual ~FourMuonEvent();
39
40 FourMuonEvent (const FourMuonEvent&) = delete;
42
43 enum
44 {
50 };
51
52 enum
53 {
58 };
59
60 enum ZTYPE
61 {
62 MS, // Just the muon system ( uncorrected )
63 ME, // The adjusted muon system properties ( corr. for cal. )
64 ID, // Using the ID system.
65 CB, // Using both the muon & ID system.
67 };
68
69 void Init();
70 bool Reco();
71
72 // Public access methods
73 inline void doIsoSelection (bool doIso) { m_xMuonID.doIsoSelection(doIso); }
74 inline void doIPSelection (bool doIPsel) { m_xMuonID.doIPSelection(doIPsel); }
75 inline void doMCPSelection (bool doMCP) { m_xMuonID.doMCPSelection(doMCP); }
76 inline bool EventPassed () { return m_passedSelectionCuts; }
77 inline const float& get4MuInvMass (ZTYPE eType) { return m_fInvariantMass[eType]; }
78 inline int getAcceptedEvents () { return m_acceptedEventCount; }
79 inline const xAOD::Muon* getCombMuon ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxRecMuon[uPart] : nullptr; }
80 inline const xAOD::TrackParticle* getELTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxELTrack[uPart] : nullptr; }
81 inline const xAOD::TrackParticle* getIDTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxIDTrack[uPart] : nullptr; }
82 inline double GetInvMass() { return m_FourMuonInvMass; }
83 inline const xAOD::TrackParticle* getMSTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxMSTrack[uPart] : nullptr; }
84 inline const xAOD::TrackParticle* getLooseIDTk( unsigned int uPart );
85 inline const float& getLeptonOpeningAngle( ZTYPE eType ) { return m_fMuonDispersion[eType]; }
86 unsigned int getNegMuon( int eType );
87 inline unsigned int getNumberOfTaggedMuons() { return m_numberOfFullPassMuons; }
88 inline int GetNVertex () { return m_nVertex; }
89 float getPtImbalance( ZTYPE eType );
90 const std::string getRegion() const ;
91 unsigned int getPosMuon( int eType );
92 inline int GetVertexElec ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_elec_vtx[uPart] : 0;}
93 inline int GetVertexElNeg1 () { return m_elec_vtx[0];}
94 inline int GetVertexElNeg2 () { return m_elec_vtx[1];}
95 inline int GetVertexElPos1 () { return m_elec_vtx[2];}
96 inline int GetVertexElPos2 () { return m_elec_vtx[3];}
97 inline int GetVertexMuNeg1 () { return m_muon_vtx[0];}
98 inline int GetVertexMuNeg2 () { return m_muon_vtx[1];}
99 inline int GetVertexMuPos1 () { return m_muon_vtx[2];}
100 inline int GetVertexMuPos2 () { return m_muon_vtx[3];}
101 int getZCharge( ZTYPE eType );
102 inline const float& getZEta ( ZTYPE eType ) { return m_fZEtaDir[eType]; }
103 inline const float& getZMass ( ZTYPE eType ) { return m_fInvariantMass[eType];}
104 inline const float& getZPhi ( ZTYPE eType ) { return m_fZPhiDir[eType]; }
105 inline const float& getZPt ( ZTYPE eType ) { return m_fZPt[eType]; }
106 void OrderMuonList ();
108 inline void setDebugMode (bool debug) { m_doDebug=debug; }
109 void SetLeadingMuonPtCut (double newvalue);
110 inline void SetMassWindowLow (double newvalue) { m_MassWindowLow = newvalue; }
111 inline void SetMassWindowHigh (double newvalue) { m_MassWindowHigh = newvalue; }
112 inline void SetMuonPtCut (double newvalue) { m_xMuonID.SetPtCut(newvalue); }
113 inline void SetMuonSelectionTool ( ToolHandle<CP::IMuonSelectionTool> mst ) { m_xMuonID.SetCustomMuonSelectionTool (mst); };
114 void SetSecondMuonPtCut (double newvalue);
115 inline void SetOpeningAngleCut (double newvalue) { m_OpeningAngleCut = newvalue; }
116 inline void SetZ0GapCut (double newvalue) { m_Z0GapCut = newvalue; }
117
118
119 protected:
120 void BookHistograms(); // virtual?
121
122 private:
124
125 // Private methods
126 bool CheckMuonVertices ();
127 void Clear ();
128 bool EventSelection (ZTYPE eType);
129 bool EventSelectionNew (ZTYPE eType);
133 void RecordMuon( const xAOD::Muon* pxMuon );
134
135 // message stream
136 MsgStream * m_msgStream;
137
138 // Active mu-cuts for the analysis
142
143 // Tag Setup variables
144 unsigned int m_uMuonTags{};
146
152 double m_deltaXYcut{};
153 double m_Z0GapCut{};
154
159
160 // Member variables : Mostly to store relevant muon data for quick access.
167
169 const xAOD::TrackParticle* m_pxMETrack[NUM_MUONS]{}; // Pointer to muon spectro ( corr. )
170 const xAOD::TrackParticle* m_pxMSTrack[NUM_MUONS]{}; // Pointer to muon spectro
171 const xAOD::TrackParticle* m_pxIDTrack[NUM_MUONS]{}; // Pointer to ID track
172
173 const xAOD::TrackParticle* m_pxELTrack[NUM_MUONS]{}; // pointer to Track particle of the electrons
174 const xAOD::TrackParticle* m_pxMUTrack[NUM_MUONS]{}; // pointer to Track particle of the muons
175
176 // Keep kinematic information on the Z
182
183 // Graphs
189
190 // muon selector configuration
193
194 // event count
197 // lepton count
200
201 // selected muon identifiers
202 // to be removed
203 int m_muon1 = 0;
204 int m_muon2 = 0;
205 // selected muon identifiers
206 int m_muonpos1 = 0;
207 int m_muonpos2 = 0;
208 int m_muonneg1 = 0;
209 int m_muonneg2 = 0;
210
211 //
212 int m_nVertex = 0; // number of vertex to which the muons are associated
213 int m_muonneg1_vtx = 0; // tell us wich of the vertex
214 int m_muonneg2_vtx = 0; // tell us wich of the vertex
215 int m_muonpos1_vtx = 0; // tell us wich of the vertex
216 int m_muonpos2_vtx = 0; // tell us wich of the vertex
217
220
221};
222//==============================================================================
223#endif
const bool debug
const xAOD::TrackParticle * m_pxMETrack[NUM_MUONS]
const float & getLeptonOpeningAngle(ZTYPE eType)
void SetSecondMuonPtCut(double newvalue)
int GetVertexElNeg2()
float m_fInvariantMass[NUM_TYPES]
int GetVertexMuNeg1()
double m_MassWindowLow
double m_FourMuonInvMass
void SetOpeningAngleCut(double newvalue)
bool m_passedFourLeptonSelection
FourMuonEvent & operator=(const FourMuonEvent &)=delete
const xAOD::Muon * getCombMuon(unsigned int uPart)
void SetLeadingMuonPtCut(double newvalue)
int getZCharge(ZTYPE eType)
const float & getZMass(ZTYPE eType)
MuonSelector m_xMuonID
PerfMonServices::CONTAINERS m_container
unsigned int getNumberOfTaggedMuons()
virtual ~FourMuonEvent()
const xAOD::TrackParticle * getELTrack(unsigned int uPart)
int m_muon_vtx[NUM_MUONS]
const std::string getRegion() const
void setDebugMode(bool debug)
void SetMassWindowHigh(double newvalue)
bool m_passedFourElectronSelection
bool ReconstructKinematics4Elec()
int m_elec_vtx[NUM_MUONS]
int GetVertexElNeg1()
void SetMuonSelectionTool(ToolHandle< CP::IMuonSelectionTool > mst)
bool ReconstructKinematics()
float m_fMuonDispersion[NUM_TYPES]
FourMuonEvent(const FourMuonEvent &)=delete
bool m_workAsFourElectrons
double m_SecondMuonPtCut
double m_MassWindowHigh
MsgStream * m_msgStream
int GetVertexMuPos1()
void SetMuonPtCut(double newvalue)
int GetVertexElPos2()
const xAOD::TrackParticle * getIDTrack(unsigned int uPart)
float m_fZPhiDir[NUM_TYPES]
int GetVertexElec(unsigned int uPart)
float m_fZEtaDir[NUM_TYPES]
void SetZ0GapCut(double newvalue)
const xAOD::TrackParticle * getMSTrack(unsigned int uPart)
const xAOD::TrackParticle * m_pxIDTrack[NUM_MUONS]
int GetVertexMuNeg2()
bool EventSelection(ZTYPE eType)
void SetMassWindowLow(double newvalue)
const xAOD::TrackParticle * m_pxMUTrack[NUM_MUONS]
double m_OpeningAngleCut
double m_LeadingMuonPtCut
ElectronSelector m_xElecID
unsigned int m_uMuonTags
bool m_passedFourMuonSelection
void doMCPSelection(bool doMCP)
bool ReconstructKinematicsNew()
int GetVertexElPos1()
bool m_passedSelectionCuts
float m_fZPt[NUM_TYPES]
void RecordMuon(const xAOD::Muon *pxMuon)
const xAOD::TrackParticle * m_pxELTrack[NUM_MUONS]
double GetInvMass()
float getPtImbalance(ZTYPE eType)
unsigned int getPosMuon(int eType)
unsigned int m_numberOfFullPassElectrons
const xAOD::Muon * m_pxRecMuon[NUM_MUONS]
unsigned int getNegMuon(int eType)
const xAOD::TrackParticle * m_pxMSTrack[NUM_MUONS]
const float & getZPt(ZTYPE eType)
void setContainer(PerfMonServices::CONTAINERS container)
const xAOD::TrackParticle * getLooseIDTk(unsigned int uPart)
bool EventSelectionNew(ZTYPE eType)
EventAnalysis PARENT
const float & getZPhi(ZTYPE eType)
void doIsoSelection(bool doIso)
int getAcceptedEvents()
void doIPSelection(bool doIPsel)
const float & getZEta(ZTYPE eType)
unsigned int m_numberOfFullPassMuons
const float & get4MuInvMass(ZTYPE eType)
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version: