ATLAS Offline Software
Loading...
Searching...
No Matches
FourMuonEvent.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_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//-
26#include <array>
28// Forward class declarations...
29//==============================================================================
30class TrackParticle;
31
32//==============================================================================
33// Class declaration...
34//==============================================================================
36{
37 public:
39 virtual ~FourMuonEvent();
40
41 FourMuonEvent (const FourMuonEvent&) = delete;
43
44 enum
45 {
51 };
52
53 enum
54 {
59 };
60
61 enum ZTYPE
62 {
63 MS, // Just the muon system ( uncorrected )
64 ME, // The adjusted muon system properties ( corr. for cal. )
65 ID, // Using the ID system.
66 CB, // Using both the muon & ID system.
68 };
69
70 void Init();
71 bool Reco();
72
73 // Public access methods
74 inline void doIsoSelection (bool doIso) { m_xMuonID.doIsoSelection(doIso); }
75 inline void doIPSelection (bool doIPsel) { m_xMuonID.doIPSelection(doIPsel); }
76 inline void doMCPSelection (bool doMCP) { m_xMuonID.doMCPSelection(doMCP); }
77 inline bool EventPassed () { return m_passedSelectionCuts; }
78 inline const float& get4MuInvMass (ZTYPE eType) { return m_fInvariantMass[eType]; }
79 inline int getAcceptedEvents () { return m_acceptedEventCount; }
80 inline const xAOD::Muon* getCombMuon ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxRecMuon[uPart] : nullptr; }
81 inline const xAOD::TrackParticle* getELTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxELTrack[uPart] : nullptr; }
82 inline const xAOD::TrackParticle* getIDTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxIDTrack[uPart] : nullptr; }
83 inline double GetInvMass() { return m_FourMuonInvMass; }
84 inline const xAOD::TrackParticle* getMSTrack ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_pxMSTrack[uPart] : nullptr; }
85 inline const xAOD::TrackParticle* getLooseIDTk( unsigned int uPart );
86 inline const float& getLeptonOpeningAngle( ZTYPE eType ) { return m_fMuonDispersion[eType]; }
87 unsigned int getNegMuon( int eType );
88 inline unsigned int getNumberOfTaggedMuons() { return m_numberOfFullPassMuons; }
89 inline int GetNVertex () { return m_nVertex; }
90 float getPtImbalance( ZTYPE eType );
91 const std::string getRegion() const ;
92 unsigned int getPosMuon( int eType );
93 inline int GetVertexElec ( unsigned int uPart ) { return (uPart < NUM_MUONS) ? m_elec_vtx[uPart] : 0;}
94 inline int GetVertexElNeg1 () { return m_elec_vtx[0];}
95 inline int GetVertexElNeg2 () { return m_elec_vtx[1];}
96 inline int GetVertexElPos1 () { return m_elec_vtx[2];}
97 inline int GetVertexElPos2 () { return m_elec_vtx[3];}
98 inline int GetVertexMuNeg1 () { return m_muon_vtx[0];}
99 inline int GetVertexMuNeg2 () { return m_muon_vtx[1];}
100 inline int GetVertexMuPos1 () { return m_muon_vtx[2];}
101 inline int GetVertexMuPos2 () { return m_muon_vtx[3];}
102 int getZCharge( ZTYPE eType );
103 inline const float& getZEta ( ZTYPE eType ) { return m_fZEtaDir[eType]; }
104 inline const float& getZMass ( ZTYPE eType ) { return m_fInvariantMass[eType];}
105 inline const float& getZPhi ( ZTYPE eType ) { return m_fZPhiDir[eType]; }
106 inline const float& getZPt ( ZTYPE eType ) { return m_fZPt[eType]; }
107 void OrderMuonList ();
108 void setContainer (PerfMonServices::CONTAINERS container) { m_container = container; };
109 inline void setDebugMode (bool debug) { m_doDebug=debug; }
110 void SetLeadingMuonPtCut (double newvalue);
111 inline void SetMassWindowLow (double newvalue) { m_MassWindowLow = newvalue; }
112 inline void SetMassWindowHigh (double newvalue) { m_MassWindowHigh = newvalue; }
113 inline void SetMuonPtCut (double newvalue) { m_xMuonID.SetPtCut(newvalue); }
114 inline void SetMuonSelectionTool ( const ToolHandle<CP::IMuonSelectionTool> & mst ) { m_xMuonID.SetCustomMuonSelectionTool (mst); };
115 void SetSecondMuonPtCut (double newvalue);
116 inline void SetOpeningAngleCut (double newvalue) { m_OpeningAngleCut = newvalue; }
117 inline void SetZ0GapCut (double newvalue) { m_Z0GapCut = newvalue; }
118
119
120 protected:
121 void BookHistograms(); // virtual?
122
123 private:
125
126 // Private methods
127 bool CheckMuonVertices ();
128 void Clear ();
129 bool EventSelection (ZTYPE eType);
130 bool EventSelectionNew (ZTYPE eType);
134 void RecordMuon( const xAOD::Muon* pxMuon );
135
136 // message stream
137 MsgStream * m_msgStream{};
138
139 // Active mu-cuts for the analysis
143
144 // Tag Setup variables
145 unsigned int m_uMuonTags{};
147
153 double m_deltaXYcut{};
154 double m_Z0GapCut{};
155
156 bool m_doDebug{};
160
161 // Member variables : Mostly to store relevant muon data for quick access.
168
170 const xAOD::TrackParticle* m_pxMETrack[NUM_MUONS]{}; // Pointer to muon spectro ( corr. )
171 const xAOD::TrackParticle* m_pxMSTrack[NUM_MUONS]{}; // Pointer to muon spectro
172 const xAOD::TrackParticle* m_pxIDTrack[NUM_MUONS]{}; // Pointer to ID track
173
174 const xAOD::TrackParticle* m_pxELTrack[NUM_MUONS]{}; // pointer to Track particle of the electrons
175 const xAOD::TrackParticle* m_pxMUTrack[NUM_MUONS]{}; // pointer to Track particle of the muons
176
177 // Keep kinematic information on the Z
178 using Arrayf = std::array<float, NUM_TYPES>;
184
185 // Graphs
191
192 // muon selector configuration
195
196 // event count
199 // lepton count
202
203 // selected muon identifiers
204 // to be removed
205 int m_muon1 = 0;
206 int m_muon2 = 0;
207 // selected muon identifiers
208 int m_muonpos1 = 0;
209 int m_muonpos2 = 0;
210 int m_muonneg1 = 0;
211 int m_muonneg2 = 0;
212
213 //
214 int m_nVertex = 0; // number of vertex to which the muons are associated
215 int m_muonneg1_vtx = 0; // tell us wich of the vertex
216 int m_muonneg2_vtx = 0; // tell us wich of the vertex
217 int m_muonpos1_vtx = 0; // tell us wich of the vertex
218 int m_muonpos2_vtx = 0; // tell us wich of the vertex
219
222
223};
224//==============================================================================
225#endif
const bool debug
const xAOD::TrackParticle * m_pxMETrack[NUM_MUONS]
const float & getLeptonOpeningAngle(ZTYPE eType)
void SetSecondMuonPtCut(double newvalue)
int GetVertexElNeg2()
int GetVertexMuNeg1()
double m_MassWindowLow
double m_FourMuonInvMass
void SetOpeningAngleCut(double newvalue)
Arrayf m_fInvariantMass
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()
bool ReconstructKinematics()
FourMuonEvent(const FourMuonEvent &)=delete
bool m_workAsFourElectrons
double m_SecondMuonPtCut
double m_MassWindowHigh
MsgStream * m_msgStream
void SetMuonPtCut(double newvalue)
int GetVertexElPos2()
const xAOD::TrackParticle * getIDTrack(unsigned int uPart)
int GetVertexElec(unsigned int uPart)
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]
std::array< float, NUM_TYPES > Arrayf
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
void RecordMuon(const xAOD::Muon *pxMuon)
const xAOD::TrackParticle * m_pxELTrack[NUM_MUONS]
Arrayf m_fMuonDispersion
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 SetMuonSelectionTool(const ToolHandle< CP::IMuonSelectionTool > &mst)
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: