ATLAS Offline Software
Loading...
Searching...
No Matches
FourMuonEvent Class Reference

#include <FourMuonEvent.h>

Inheritance diagram for FourMuonEvent:
Collaboration diagram for FourMuonEvent:

Public Types

enum  {
  MUON1 , MUON2 , MUON3 , MUON4 ,
  NUM_MUONS
}
enum  { CENTRAL , FORWARD , BACKWARD , UNDEF }
enum  ZTYPE {
  MS , ME , ID , CB ,
  NUM_TYPES
}

Public Member Functions

 FourMuonEvent ()
virtual ~FourMuonEvent ()
 FourMuonEvent (const FourMuonEvent &)=delete
FourMuonEventoperator= (const FourMuonEvent &)=delete
void Init ()
bool Reco ()
void doIsoSelection (bool doIso)
void doIPSelection (bool doIPsel)
void doMCPSelection (bool doMCP)
bool EventPassed ()
const float & get4MuInvMass (ZTYPE eType)
int getAcceptedEvents ()
const xAOD::MuongetCombMuon (unsigned int uPart)
const xAOD::TrackParticlegetELTrack (unsigned int uPart)
const xAOD::TrackParticlegetIDTrack (unsigned int uPart)
double GetInvMass ()
const xAOD::TrackParticlegetMSTrack (unsigned int uPart)
const xAOD::TrackParticlegetLooseIDTk (unsigned int uPart)
const float & getLeptonOpeningAngle (ZTYPE eType)
unsigned int getNegMuon (int eType)
unsigned int getNumberOfTaggedMuons ()
int GetNVertex ()
float getPtImbalance (ZTYPE eType)
const std::string getRegion () const
unsigned int getPosMuon (int eType)
int GetVertexElec (unsigned int uPart)
int GetVertexElNeg1 ()
int GetVertexElNeg2 ()
int GetVertexElPos1 ()
int GetVertexElPos2 ()
int GetVertexMuNeg1 ()
int GetVertexMuNeg2 ()
int GetVertexMuPos1 ()
int GetVertexMuPos2 ()
int getZCharge (ZTYPE eType)
const float & getZEta (ZTYPE eType)
const float & getZMass (ZTYPE eType)
const float & getZPhi (ZTYPE eType)
const float & getZPt (ZTYPE eType)
void OrderMuonList ()
void setContainer (PerfMonServices::CONTAINERS container)
void setDebugMode (bool debug)
void SetLeadingMuonPtCut (double newvalue)
void SetMassWindowLow (double newvalue)
void SetMassWindowHigh (double newvalue)
void SetMuonPtCut (double newvalue)
void SetMuonSelectionTool (const ToolHandle< CP::IMuonSelectionTool > &mst)
void SetSecondMuonPtCut (double newvalue)
void SetOpeningAngleCut (double newvalue)
void SetZ0GapCut (double newvalue)

Static Public Member Functions

template<class T>
static CLHEP::Hep3Vector calculateMomentum (const T *pP)
template<class T>
static float EvalInvMass (const T *pxP1, const T *pxP2, float fMass1, float fMass2=invalidAnswer)
template<class T>
static float EvalInvMass (const T *pxP1, const T *pxP2, const T *pxp3, const T *pxP4, float fMass1, float fMass2=-999.9, float fMass3=-999.9, float fMass4=invalidAnswer)
template<class T>
static float EvalDiMuInvMass (const T *pxP1, const T *pxP2)
template<class T>
static float EvalFourMuInvMass (const T *pxP1, const T *pxP2, const T *pxP3, const T *pxP4)
template<class T>
static float EvaluateAngle (const T *pxP1, const T *pxP2)
template<class T>
static float EvalPtDiff (const T *pxP1, const T *pxP2)
template<class T>
static float EvalPhiDiff (const T *pxP1, const T *pxP2)
template<class T>
static float EvalEtaDiff (const T *pxP1, const T *pxP2)
template<class T>
static float EvalPt (const T *pxP1, const T *pxP2)
template<class T>
static float EvalPhi (const T *pxP1, const T *pxP2)
template<class T>
static float EvalEta (const T *pxP1, const T *pxP2)
template<class T>
static float EvalCharge (const T *pxP1, const T *pxP2)
template<class T>
static float EvalTransverseMass (const T *pxP1, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer)
template<class T>
static float EvalTransverseMass (const T *pxP1, float fMETx, float fMETy)
template<class T>
static float EvalTransverseMass (const T *pxP1, const T *pxP2, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer)
template<class T>
static float EvalTransverseMass (const T *pxP1, const T *pxP2, float fMETx, float fMETy)

Static Public Attributes

static constexpr float invalidAnswer {-999.9f}

Protected Member Functions

void BookHistograms ()

Protected Attributes

unsigned int m_uPassedEvents
std::map< unsigned int, TH1F * > m_x1DHistograms
std::map< unsigned int, TH2F * > m_x2DHistograms
std::map< unsigned int, TProfile * > m_x1DProfHistograms
std::map< unsigned int, TProfile2D * > m_x2DProfHistograms
std::string m_xSampleName

Private Types

enum  HISTOS_1D {
  ZMASS_MUON , ZMASS_MUONADJ , ZMASS_TRACK , ZMASS_COMB ,
  NUM_1HISTOS
}
typedef EventAnalysis PARENT
using Arrayf = std::array<float, NUM_TYPES>

Private Member Functions

bool CheckMuonVertices ()
void Clear ()
bool EventSelection (ZTYPE eType)
bool EventSelectionNew (ZTYPE eType)
bool ReconstructKinematicsNew ()
bool ReconstructKinematics ()
bool ReconstructKinematics4Elec ()
void RecordMuon (const xAOD::Muon *pxMuon)
void Register ()

Private Attributes

MsgStream * m_msgStream {}
MuonSelector m_xMuonID
ElectronSelector m_xElecID
PerfMonServices::CONTAINERS m_container
unsigned int m_uMuonTags {}
double m_FourMuonInvMass {}
double m_LeadingMuonPtCut {}
double m_SecondMuonPtCut {}
double m_MassWindowLow {}
double m_MassWindowHigh {}
double m_OpeningAngleCut {}
double m_deltaXYcut {}
double m_Z0GapCut {}
bool m_doDebug {}
bool m_workAsFourMuons {}
bool m_workAsFourElectrons {}
bool m_workAsFourLeptons {}
unsigned int m_numberOfFullPassMuons {}
unsigned int m_numberOfFullPassElectrons {}
bool m_passedSelectionCuts = false
bool m_passedFourMuonSelection = false
bool m_passedFourElectronSelection = false
bool m_passedFourLeptonSelection = false
const xAOD::Muonm_pxRecMuon [NUM_MUONS] {}
const xAOD::TrackParticlem_pxMETrack [NUM_MUONS] {}
const xAOD::TrackParticlem_pxMSTrack [NUM_MUONS] {}
const xAOD::TrackParticlem_pxIDTrack [NUM_MUONS] {}
const xAOD::TrackParticlem_pxELTrack [NUM_MUONS] {}
const xAOD::TrackParticlem_pxMUTrack [NUM_MUONS] {}
Arrayf m_fZPt {}
Arrayf m_fZEtaDir {}
Arrayf m_fZPhiDir {}
Arrayf m_fInvariantMass {}
Arrayf m_fMuonDispersion {}
bool m_SelectMuonByIso {}
bool m_SelectMuonByIP {}
int m_eventCount {}
int m_acceptedEventCount {}
int m_acceptedMuonCount {}
int m_acceptedElecCount {}
int m_muon1 = 0
int m_muon2 = 0
int m_muonpos1 = 0
int m_muonpos2 = 0
int m_muonneg1 = 0
int m_muonneg2 = 0
int m_nVertex = 0
int m_muonneg1_vtx = 0
int m_muonneg2_vtx = 0
int m_muonpos1_vtx = 0
int m_muonpos2_vtx = 0
int m_muon_vtx [NUM_MUONS] {}
int m_elec_vtx [NUM_MUONS] {}

Detailed Description

Definition at line 35 of file FourMuonEvent.h.

Member Typedef Documentation

◆ Arrayf

using FourMuonEvent::Arrayf = std::array<float, NUM_TYPES>
private

Definition at line 178 of file FourMuonEvent.h.

◆ PARENT

Definition at line 124 of file FourMuonEvent.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CENTRAL 
FORWARD 
BACKWARD 
UNDEF 

Definition at line 53 of file FourMuonEvent.h.

◆ anonymous enum

anonymous enum
Enumerator
MUON1 
MUON2 
MUON3 
MUON4 
NUM_MUONS 

Definition at line 44 of file FourMuonEvent.h.

◆ HISTOS_1D

Enumerator
ZMASS_MUON 
ZMASS_MUONADJ 
ZMASS_TRACK 
ZMASS_COMB 
NUM_1HISTOS 

Definition at line 186 of file FourMuonEvent.h.

◆ ZTYPE

Enumerator
MS 
ME 
ID 
CB 
NUM_TYPES 

Definition at line 61 of file FourMuonEvent.h.

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 };

Constructor & Destructor Documentation

◆ FourMuonEvent() [1/2]

FourMuonEvent::FourMuonEvent ( )

Definition at line 25 of file FourMuonEvent.cxx.

26{
27 m_xSampleName = "FourMuon";
28
29 m_container = PerfMonServices::MUON_COLLECTION; //PerfMonServices::ELECTRON_COLLECTION
30
31 m_doDebug = false;
32 m_workAsFourMuons = false;
35
36 // Setup the muon tags
37 m_uMuonTags = 4;
38 m_LeadingMuonPtCut = 20.;
40 m_MassWindowLow = 10.0;
41 m_MassWindowHigh = 125.0;
42 m_deltaXYcut = 0.1; // in mm
43 m_Z0GapCut = 5.0; // in mm
44 m_SelectMuonByIso = true;
45 m_SelectMuonByIP = true;
46 m_eventCount = 0;
50
51 m_msgStream = new MsgStream(Athena::getMessageSvc(), "InDetPerformanceMonitoring" );
52}
std::string m_xSampleName
double m_MassWindowLow
PerfMonServices::CONTAINERS m_container
bool m_workAsFourElectrons
double m_SecondMuonPtCut
double m_MassWindowHigh
MsgStream * m_msgStream
double m_LeadingMuonPtCut
unsigned int m_uMuonTags
IMessageSvc * getMessageSvc(bool quiet=false)

◆ ~FourMuonEvent()

FourMuonEvent::~FourMuonEvent ( )
virtual

Definition at line 55 of file FourMuonEvent.cxx.

56{
57 delete m_msgStream;
58}

◆ FourMuonEvent() [2/2]

FourMuonEvent::FourMuonEvent ( const FourMuonEvent & )
delete

Member Function Documentation

◆ BookHistograms()

void FourMuonEvent::BookHistograms ( )
protectedvirtual

Reimplemented from EventAnalysis.

Definition at line 251 of file FourMuonEvent.cxx.

252{
253}

◆ calculateMomentum()

template<class T>
CLHEP::Hep3Vector EventAnalysis::calculateMomentum ( const T * pP)
staticinherited

Definition at line 92 of file EventAnalysis.h.

92 {
93 const auto & p4(pP->p4());
94 return CLHEP::Hep3Vector(p4.Px() * EAna::CGeV , p4.Py() * EAna::CGeV, p4.Pz() * EAna::CGeV);
95}
const float CGeV

◆ CheckMuonVertices()

bool FourMuonEvent::CheckMuonVertices ( )
private

Definition at line 1187 of file FourMuonEvent.cxx.

1188{
1189 (*m_msgStream) << MSG::DEBUG << " * FourMuonsEvents::CheckMuonVertices * -- START --" << endmsg;
1190
1191 bool goodvertices = false;
1192 goodvertices = true; // R22 set true by default. Needs to be revisited
1193 int nverticesfound = 0;
1194
1195 // loop on mu-, and for each mu-, loop on mu+ and check at least one mu+ and mu- come from the same vertex
1196 // mu- indices are 0 or 1
1197 for (unsigned int imuneg = 0; imuneg <= 1; imuneg++) {
1198 if (m_pxMUTrack[imuneg] != nullptr) {
1199 /* R21 SALVA --> vertex is not available in R22 --> A FIX IS NEEDED */
1200 /*
1201 if (m_pxMUTrack[imuneg]->vertex()) {
1202
1203 if (m_doDebug) std::cout << " mu-(" << imuneg <<")->vertex()->v= (" << m_pxMUTrack[imuneg]->vertex()->x()
1204 << ", " << m_pxMUTrack[imuneg]->vertex()->y()
1205 << ", " << m_pxMUTrack[imuneg]->vertex()->z()
1206 << ") " << std::endl;
1207
1208 for (unsigned int imupos = 2; imupos <= 3; imupos++) { // mu+ indices are 2 and 3
1209 if (m_pxMUTrack[imupos] != nullptr) {
1210 if (m_pxMUTrack[imupos]->vertex()) {
1211 if (m_doDebug) std::cout << " mu+(" << imupos <<")->vertex()->v= (" << m_pxMUTrack[imupos]->vertex()->x()
1212 << ", " << m_pxMUTrack[imupos]->vertex()->y()
1213 << ", " << m_pxMUTrack[imupos]->vertex()->z()
1214 << ") " << std::endl;
1215
1216 float delta_x = fabs( m_pxMUTrack[imuneg]->vertex()->x() - m_pxMUTrack[imupos]->vertex()->x());
1217 float delta_y = fabs( m_pxMUTrack[imuneg]->vertex()->y() - m_pxMUTrack[imupos]->vertex()->y());
1218 float delta_z = fabs( m_pxMUTrack[imuneg]->vertex()->z() - m_pxMUTrack[imupos]->vertex()->z());
1219
1220 if (delta_x < m_deltaXYcut && delta_y < m_deltaXYcut && delta_z < m_Z0GapCut) {
1221 nverticesfound++;
1222 if (m_doDebug) std::cout << " MUON-BINGO !!! mu+mu- pair in same vertex !!! mu-[" << imuneg
1223 << "] mu+[" << imupos<< "] count: " << nverticesfound << std::endl;
1224 } // vertex is the same
1225 } // mu+ has vertex
1226 } // mu+ exists
1227 } // loop on mu+
1228 } // mu- has vertex
1229 */
1230 } // mu- exists
1231 } // loop on mu-
1232
1233 if (nverticesfound >= 1) goodvertices = true;
1234
1235 if (nverticesfound == 0) if (m_doDebug) std::cout << " -- FourMuonEvent::CheckMuonVertices -- WARNING -- MUONS DO NOT COME FROM SAME VERTEX " << std::endl;
1236
1237 (*m_msgStream) << MSG::DEBUG << " * FourMuonsEvents::CheckMuonVertices * -- COMPLETED -- status: " << goodvertices << endmsg;
1238 return goodvertices;
1239}
#define endmsg
const xAOD::TrackParticle * m_pxMUTrack[NUM_MUONS]

◆ Clear()

void FourMuonEvent::Clear ( )
private

Definition at line 593 of file FourMuonEvent.cxx.

594{
597 m_passedSelectionCuts = false;
601
602
603 m_FourMuonInvMass = -1.; // flag as no reconstructed inv mass yet
604 m_muon1 = MUON1; // point to the first two
605 m_muon2 = MUON2;
606 m_muonneg1 = -1;
607 m_muonneg2 = -1;
608 m_muonpos1 = -1;
609 m_muonpos2 = -1;
610
611
612 for ( unsigned int u = 0; u < NUM_MUONS; ++u ) {
613 m_pxRecMuon[u] = nullptr;
614 m_pxMSTrack[u] = nullptr;
615 m_pxMETrack[u] = nullptr;
616 m_pxIDTrack[u] = nullptr;
617 m_pxMUTrack[u] = nullptr;
618 m_pxELTrack[u] = nullptr;
619 }
620 for ( unsigned int v = 0; v < NUM_TYPES; ++v ) {
621 m_fZPt[v] = -999.9f;
622 m_fZEtaDir[v] = -999.9f;
623 m_fZPhiDir[v] = -999.9f;
624 m_fInvariantMass[v] = -999.9f;
625 m_fMuonDispersion[v] = -999.9f;
626 }
627
628 // tell us to which vertex the muons are associated
629 m_nVertex = 0; // reset vertex count
630 m_muonneg1_vtx = 0;
631 m_muonneg2_vtx = 0;
632 m_muonpos1_vtx = 0;
633 m_muonpos2_vtx = 0;
634
635 for (size_t i=0; i < NUM_MUONS; i++) m_muon_vtx[i] = 0; // reset the vertex ID to which the electrons are associated
636 for (size_t i=0; i < NUM_MUONS; i++) m_elec_vtx[i] = 0; // reset the vertex ID to which the electrons are associated
637 return;
638}
const xAOD::TrackParticle * m_pxMETrack[NUM_MUONS]
double m_FourMuonInvMass
Arrayf m_fInvariantMass
bool m_passedFourLeptonSelection
int m_muon_vtx[NUM_MUONS]
bool m_passedFourElectronSelection
int m_elec_vtx[NUM_MUONS]
const xAOD::TrackParticle * m_pxIDTrack[NUM_MUONS]
bool m_passedFourMuonSelection
bool m_passedSelectionCuts
const xAOD::TrackParticle * m_pxELTrack[NUM_MUONS]
Arrayf m_fMuonDispersion
unsigned int m_numberOfFullPassElectrons
const xAOD::Muon * m_pxRecMuon[NUM_MUONS]
const xAOD::TrackParticle * m_pxMSTrack[NUM_MUONS]
unsigned int m_numberOfFullPassMuons
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ doIPSelection()

void FourMuonEvent::doIPSelection ( bool doIPsel)
inline

Definition at line 75 of file FourMuonEvent.h.

75{ m_xMuonID.doIPSelection(doIPsel); }
MuonSelector m_xMuonID

◆ doIsoSelection()

void FourMuonEvent::doIsoSelection ( bool doIso)
inline

Definition at line 74 of file FourMuonEvent.h.

74{ m_xMuonID.doIsoSelection(doIso); }

◆ doMCPSelection()

void FourMuonEvent::doMCPSelection ( bool doMCP)
inline

Definition at line 76 of file FourMuonEvent.h.

76{ m_xMuonID.doMCPSelection(doMCP); }

◆ EvalCharge()

template<class T>
float EventAnalysis::EvalCharge ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 239 of file EventAnalysis.h.

240{
241 // Check integrity of inputs.
242 if ( !pxP1 || !pxP2 ) return invalidAnswer;
243 return static_cast<float>( pxP1->charge() + pxP2->charge() );
244}
static constexpr float invalidAnswer

◆ EvalDiMuInvMass()

template<class T>
float EventAnalysis::EvalDiMuInvMass ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 98 of file EventAnalysis.h.

99{
100 // Check integrity of inputs.
101 if ( !pxP1 || !pxP2 ) return invalidAnswer;
102
103 // Evaluate Di-mu invariant mass.
104 return EvalInvMass( pxP1, pxP2, EAna::g_fMuonMass );
105}
static float EvalInvMass(const T *pxP1, const T *pxP2, float fMass1, float fMass2=invalidAnswer)
const float g_fMuonMass

◆ EvalEta()

template<class T>
float EventAnalysis::EvalEta ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 230 of file EventAnalysis.h.

231{
232 // Check integrity of inputs.
233 if ( !pxP1 || !pxP2 ) return invalidAnswer;
234 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
235 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
236 return static_cast<float>( (xTmp1 + xTmp2).pseudoRapidity() );
237}
static CLHEP::Hep3Vector calculateMomentum(const T *pP)

◆ EvalEtaDiff()

template<class T>
float EventAnalysis::EvalEtaDiff ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 202 of file EventAnalysis.h.

203{
204 // Check integrity of inputs.
205 if ( !pxP1 || !pxP2 ) return invalidAnswer;
206 // Evaluate the angle.
207 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
208 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
209 return static_cast<float>( xTmp1.polarAngle(xTmp2) );
210}

◆ EvalFourMuInvMass()

template<class T>
float EventAnalysis::EvalFourMuInvMass ( const T * pxP1,
const T * pxP2,
const T * pxP3,
const T * pxP4 )
staticinherited

Definition at line 124 of file EventAnalysis.h.

125{
126 // Check integrity of inputs.
127 if ( !pxP1 || !pxP2 || !pxP3 || !pxP4) return invalidAnswer;
128
129 // Evaluate invariant mass.
130 return EvalInvMass( pxP1, pxP2, pxP3, pxP4, EAna::g_fMuonMass );
131}

◆ EvalInvMass() [1/2]

template<class T>
float EventAnalysis::EvalInvMass ( const T * pxP1,
const T * pxP2,
const T * pxp3,
const T * pxP4,
float fMass1,
float fMass2 = -999.9,
float fMass3 = -999.9,
float fMass4 = invalidAnswer )
staticinherited

Definition at line 133 of file EventAnalysis.h.

135{
136 // Check integrity of inputs.No tachyons.
137 if ( fMass1 < 0.0f ) return invalidAnswer;
138 if ( !pxP1 || !pxP2 || !pxP3 || !pxP4) return invalidAnswer;
139
140 // Set masses equal if required by user
141 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
142 fMass3 = ( fMass3 < 0.0f ) ? fMass1 : fMass3;
143 fMass4 = ( fMass4 < 0.0f ) ? fMass1 : fMass4;
144
145 // Evaluate invariant mass.
146 CLHEP::Hep3Vector xTmp1 = CLHEP::Hep3Vector( pxP1->p4().Px() * EAna::CGeV, pxP1->p4().Py() * EAna::CGeV, pxP1->p4().Pz() * EAna::CGeV );
147 CLHEP::Hep3Vector xTmp2 = CLHEP::Hep3Vector( pxP2->p4().Px() * EAna::CGeV, pxP2->p4().Py() * EAna::CGeV, pxP2->p4().Pz() * EAna::CGeV );
148 CLHEP::Hep3Vector xTmp3 = CLHEP::Hep3Vector( pxP3->p4().Px() * EAna::CGeV, pxP3->p4().Py() * EAna::CGeV, pxP3->p4().Pz() * EAna::CGeV );
149 CLHEP::Hep3Vector xTmp4 = CLHEP::Hep3Vector( pxP4->p4().Px() * EAna::CGeV, pxP4->p4().Py() * EAna::CGeV, pxP4->p4().Pz() * EAna::CGeV );
150
151 CLHEP::HepLorentzVector xLVec; xLVec.setVectM ( xTmp1, fMass1 );
152 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, fMass2 );
153 CLHEP::HepLorentzVector xLVec3; xLVec3.setVectM( xTmp3, fMass3 );
154 CLHEP::HepLorentzVector xLVec4; xLVec4.setVectM( xTmp4, fMass4 );
155
156 xLVec += xLVec2;
157 xLVec += xLVec3;
158 xLVec += xLVec4;
159
160 return static_cast<float>( xLVec.m() );
161}

◆ EvalInvMass() [2/2]

template<class T>
float EventAnalysis::EvalInvMass ( const T * pxP1,
const T * pxP2,
float fMass1,
float fMass2 = invalidAnswer )
staticinherited

Definition at line 107 of file EventAnalysis.h.

109{
110 // Check integrity of inputs.No tachyons.
111 if ( fMass1 < 0.0f ) return invalidAnswer;
112 if ( !pxP1 || !pxP2 ) return invalidAnswer;
113 // Set masses equal if required by user
114 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
115 // Evaluate invariant mass.
116 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
117 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
118 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp1, fMass1 );
119 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, fMass2 );
120 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
121}

◆ EvalPhi()

template<class T>
float EventAnalysis::EvalPhi ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 221 of file EventAnalysis.h.

222{
223 // Check integrity of inputs.
224 if ( !pxP1 || !pxP2 ) return invalidAnswer;
225 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
226 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
227 return static_cast<float>( (xTmp1 + xTmp2).phi() );
228}

◆ EvalPhiDiff()

template<class T>
float EventAnalysis::EvalPhiDiff ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 191 of file EventAnalysis.h.

192{
193 // Check integrity of inputs.
194 if ( !pxP1 || !pxP2 ) return invalidAnswer;
195 // Evaluate the angle.
196 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
197 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
198 return static_cast<float>( xTmp1.deltaPhi(xTmp2) );
199}

◆ EvalPt()

template<class T>
float EventAnalysis::EvalPt ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 212 of file EventAnalysis.h.

213{
214 // Check integrity of inputs.
215 if ( !pxP1 || !pxP2 ) return invalidAnswer;
216 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
217 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
218 return static_cast<float>( (xTmp1 + xTmp2).perp() );
219}

◆ EvalPtDiff()

template<class T>
float EventAnalysis::EvalPtDiff ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 174 of file EventAnalysis.h.

175{
176 // Check integrity of inputs.
177 if ( !pxP1 || !pxP2 ) return invalidAnswer;
178 // Evaluate the difference between the momenta. Signed using positive - negative if appropriate.
179 if ( pxP1->charge() > 0.5f )
180 {
181 return static_cast<float>( pxP1->pt() * EAna::CGeV - pxP2->pt() * EAna::CGeV );
182 }
183 else
184 {
185 return static_cast<float>( pxP2->pt() * EAna::CGeV - pxP1->pt() * EAna::CGeV );
186 }
187}

◆ EvalTransverseMass() [1/4]

template<class T>
float EventAnalysis::EvalTransverseMass ( const T * pxP1,
const T * pxP2,
float fMETx,
float fMETy )
staticinherited

Definition at line 272 of file EventAnalysis.h.

273{
274 // Check integrity of inputs.
275 if ( !pxP1 || !pxP2 ) return invalidAnswer;
276 // Evaluate Di-mu invariant mass.
277 return EvalTransverseMass( pxP1, pxP2, fMETx, fMETy, EAna::g_fMuonMass );
278}
static float EvalTransverseMass(const T *pxP1, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer)

◆ EvalTransverseMass() [2/4]

template<class T>
float EventAnalysis::EvalTransverseMass ( const T * pxP1,
const T * pxP2,
float fMETx,
float fMETy,
float fMass1,
float fMass2 = invalidAnswer )
staticinherited

Definition at line 280 of file EventAnalysis.h.

282{
283 // Check integrity of inputs.No tachyons.
284 if ( fMass1 < 0.0f ) return invalidAnswer;
285 if ( !pxP1 || !pxP2 ) return invalidAnswer;
286 // Set masses equal if required by user.
287 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
288 // Evaluate invariant mass.
289 CLHEP::Hep3Vector xTmp1 = CLHEP::Hep3Vector( pxP1->p4().Px() * EAna::CGeV, pxP1->p4().Py() * EAna::CGeV, 0.0f );
290 CLHEP::Hep3Vector xTmp2 = CLHEP::Hep3Vector( pxP2->p4().Px() * EAna::CGeV, pxP2->p4().Py() * EAna::CGeV, 0.0f );
291 CLHEP::Hep3Vector xTmp12 = xTmp1 + xTmp2;
292 CLHEP::Hep3Vector xTmp3 = CLHEP::Hep3Vector( fMETx, fMETy, 0.0f );
293 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp12, fMass1 );
294 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp3, 0.0f );
295 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
296}

◆ EvalTransverseMass() [3/4]

template<class T>
float EventAnalysis::EvalTransverseMass ( const T * pxP1,
float fMETx,
float fMETy )
staticinherited

Definition at line 247 of file EventAnalysis.h.

248{
249 // Check integrity of inputs.
250 if ( !pxP1 ) return invalidAnswer;
251 // Evaluate Di-mu invariant mass.
252 return EvalInvMass( pxP1, fMETx, fMETy, EAna::g_fMuonMass );
253}

◆ EvalTransverseMass() [4/4]

template<class T>
float EventAnalysis::EvalTransverseMass ( const T * pxP1,
float fMETx,
float fMETy,
float fMass1,
float fMass2 = invalidAnswer )
staticinherited

Definition at line 255 of file EventAnalysis.h.

257{
258 // Check integrity of inputs.No tachyons.
259 if ( fMass1 < 0.0f ) return invalidAnswer;
260 if ( !pxP1 ) return invalidAnswer;
261 // Set masses equal if required by user.
262 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
263 // Evaluate invariant mass.
264 CLHEP::Hep3Vector xTmp1 = CLHEP::Hep3Vector( pxP1->p4().Px() * EAna::CGeV, pxP1->p4().Py() * EAna::CGeV, 0.0f );
265 CLHEP::Hep3Vector xTmp2 = CLHEP::Hep3Vector( fMETx, fMETy, 0.0f );
266 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp1, fMass1 );
267 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, 0.0f );
268 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
269}

◆ EvaluateAngle()

template<class T>
float EventAnalysis::EvaluateAngle ( const T * pxP1,
const T * pxP2 )
staticinherited

Definition at line 164 of file EventAnalysis.h.

165{
166 // Check integrity of inputs.
167 if ( !pxP1 || !pxP2 ) return invalidAnswer;
168 // Evaluate the angle.
169 CLHEP::Hep3Vector xTmp1 = calculateMomentum(pxP1);
170 CLHEP::Hep3Vector xTmp2 = calculateMomentum(pxP2);
171 return static_cast<float>( xTmp1.angle(xTmp2) );
172}

◆ EventPassed()

bool FourMuonEvent::EventPassed ( )
inline

Definition at line 77 of file FourMuonEvent.h.

77{ return m_passedSelectionCuts; }

◆ EventSelection()

bool FourMuonEvent::EventSelection ( ZTYPE eType)
private

Definition at line 458 of file FourMuonEvent.cxx.

459{
460 if(m_doDebug){ std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") ** started ** " << std::endl
461 << " event count: " << m_eventCount << std::endl
462 << " m_NumberOfFullPassMuons: " << m_numberOfFullPassMuons << std::endl
463 << " m_NumberOfFullPassElectrons: " << m_numberOfFullPassElectrons
464 << std::endl;
465 }
466
467 // First require two muon-id's with cuts pre-applied.
469 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing number of good muons and electrons == 4 :( "
471 << " = " << m_numberOfFullPassMuons << " + " << m_numberOfFullPassElectrons << std::endl;}
472 return false;
473 }
474
475 if ( m_numberOfFullPassMuons > 4 ) {
476 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Too many muons !! Failing number of good muons == 4 :( "
477 << m_numberOfFullPassMuons << std::endl;}
478 return false;
479 }
480
481 if ( m_numberOfFullPassElectrons > 4 ) {
482 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Too many electrons !! Failing number of good electrons == 4 :( "
483 << m_numberOfFullPassElectrons << std::endl;}
484 return false;
485 }
486
487 // momentum of the muons
488 double leadingMuonPt = -1., secondMuonPt=-1., thirdMuonPt=-1, fourthMuonPt=-1.; // negative pt, means not computed yet
489 switch ( eType ) {
490 case MS :
491 {
492 if (m_muonpos1 >= 0) leadingMuonPt = m_pxMSTrack[m_muonpos1]->pt();
493 if (m_muonpos2 >= 0) secondMuonPt = m_pxMSTrack[m_muonpos2]->pt();
494 if (m_muonneg1 >= 0) thirdMuonPt = m_pxMSTrack[m_muonneg1]->pt();
495 if (m_muonneg2 >= 0) fourthMuonPt = m_pxMSTrack[m_muonneg2]->pt();
496 break;
497 }
498 case ME:
499 {
500 if (m_muonpos1 >= 0) leadingMuonPt = m_pxMETrack[m_muonpos1]->pt();
501 if (m_muonpos2 >= 0) secondMuonPt = m_pxMETrack[m_muonpos2]->pt();
502 if (m_muonneg1 >= 0) thirdMuonPt = m_pxMETrack[m_muonneg1]->pt();
503 if (m_muonneg2 >= 0) fourthMuonPt = m_pxMETrack[m_muonneg2]->pt();
504 break;
505 }
506 case CB:
507 {
508 if (m_muonpos1 >= 0) leadingMuonPt = m_pxRecMuon[m_muonpos1]->pt();
509 if (m_muonpos2 >= 0) secondMuonPt = m_pxRecMuon[m_muonpos2]->pt();
510 if (m_muonneg1 >= 0) thirdMuonPt = m_pxRecMuon[m_muonneg1]->pt();
511 if (m_muonneg2 >= 0) fourthMuonPt = m_pxRecMuon[m_muonneg2]->pt();
512 break;
513 }
514 case ID:
515 {
516 if (m_muonpos1 >= 0) leadingMuonPt = m_pxIDTrack[m_muonpos1]->pt();
517 if (m_muonpos2 >= 0) secondMuonPt = m_pxIDTrack[m_muonpos2]->pt();
518 if (m_muonneg1 >= 0) thirdMuonPt = m_pxIDTrack[m_muonneg1]->pt();
519 if (m_muonneg2 >= 0) fourthMuonPt = m_pxIDTrack[m_muonneg2]->pt();
520 break;
521 }
522
523 default:
524 if (m_muonpos1 >= 0) leadingMuonPt = m_pxIDTrack[m_muonpos1]->pt();
525 if (m_muonpos2 >= 0) secondMuonPt = m_pxIDTrack[m_muonpos2]->pt();
526 if (m_muonneg1 >= 0) thirdMuonPt = m_pxIDTrack[m_muonneg1]->pt();
527 if (m_muonneg2 >= 0) fourthMuonPt = m_pxIDTrack[m_muonneg2]->pt();
528 } // end switch
529
530 // up to here the leading and second pt are not really in the right order.
531 // order the muon pt:
532 double theLeadingPt = leadingMuonPt;
533 if (secondMuonPt > theLeadingPt) { theLeadingPt = secondMuonPt;}
534 if (thirdMuonPt > theLeadingPt) { theLeadingPt = thirdMuonPt;}
535 if (fourthMuonPt > theLeadingPt) { theLeadingPt = fourthMuonPt;}
536
537 double theTrailingPt = leadingMuonPt;
538 if (secondMuonPt < theTrailingPt && secondMuonPt > 0) { theTrailingPt = secondMuonPt;}
539 if (thirdMuonPt < theTrailingPt && thirdMuonPt > 0) { theTrailingPt = thirdMuonPt;}
540 if (fourthMuonPt < theTrailingPt && fourthMuonPt > 0) { theTrailingPt = fourthMuonPt;}
541
542 if (m_doDebug || true) {
543 std::cout << " * FourMuonEvent::EventSelection * muon pt selection -- cuts: Leading: " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl
544 << " 2nd: " << m_SecondMuonPtCut*CLHEP::GeV << std::endl;
545 std::cout << " Pt of muons in this event 1: " << leadingMuonPt << std::endl
546 << " 2: " << secondMuonPt << std::endl
547 << " 3: " << thirdMuonPt << std::endl
548 << " 4: " << fourthMuonPt << std::endl
549 << " leading Pt: " << theLeadingPt << std::endl
550 << " trailing Pt: " << theTrailingPt << std::endl;
551 }
552
553 // muon pt cut
554 if ( !(theLeadingPt > m_LeadingMuonPtCut*CLHEP::GeV && theTrailingPt > m_SecondMuonPtCut*CLHEP::GeV ) ) {
555 if(m_doDebug){
556 std::cout <<" * FourMuonEvent::EventSelection * Failing pt cut * Reco Pt: leading " << theLeadingPt << " --> trailing " << theTrailingPt << std::endl;
557 }
558 return false;
559 }
560 if(m_doDebug){
561 std::cout << " * FourMuonEvent::EventSelection * Event passed the pt cuts: leading muon pt: " << leadingMuonPt << std::endl;
562 std::cout << " trailing muon pt: " << theTrailingPt << std::endl;
563 }
564
565
566 // Invariant mass window
567 if ( m_fInvariantMass[eType] < m_MassWindowLow ) {
568 if(m_doDebug) {
569 std::cout <<" * FourMuonEvent::EventSelection * Failing mass window low cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowLow << std::endl;
570 }
571 return false;
572 }
573 if ( m_fInvariantMass[eType] > m_MassWindowHigh ) {
574 if(m_doDebug) {
575 std::cout <<" * FourMuonEvent * Failing mass window high cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowHigh << std::endl;
576 }
577 return false;
578 }
579 if(m_doDebug){
580 std::cout <<" * FourMuonEvent::EventSelection * Event passed the mass window: " << m_fInvariantMass[eType] << std::endl;
581 }
582
583 if(m_doDebug) {
584 std::cout << " * FourMuonEvent::EventSelection( type= " << eType << ")* Good 4-muon set: pt range from " << leadingMuonPt/1000
585 << " to " << secondMuonPt/1000
586 << " GeV 4-muon invariant mass = " << m_fInvariantMass.at(eType) << " GeV \n";
587 std::cout << " * FourMuonEvent::EventSelection( type= " << eType << ")* completed * \n";
588 }
589 return true;
590}

◆ EventSelectionNew()

bool FourMuonEvent::EventSelectionNew ( ZTYPE eType)
private

Definition at line 258 of file FourMuonEvent.cxx.

259{
260 bool inputdebug = m_doDebug;
261 //m_doDebug = true;
262
263 bool eventisgood = true;
264 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::EventSelection( type= " << eType << ") ** started ** " << std::endl
265 << " event count: " << m_eventCount << std::endl
266 << " m_NumberOfFullPassMuons: " << m_numberOfFullPassMuons << std::endl
267 << " m_NumberOfFullPassElectrons: " << m_numberOfFullPassElectrons
268 << endmsg;
269
270
271 // Depending on mode: require a minimum of electrons or muons
272 if ( eventisgood && m_workAsFourMuons) {
273 if (m_numberOfFullPassMuons < 4) {
274 eventisgood = false;
275 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing number of good muons == 4 :( "
276 <<" m_numberOfFullPassMuons= " << m_numberOfFullPassMuons << std::endl;
277 }
278 }
279 }
280
281 if ( eventisgood && m_workAsFourElectrons) {
283 eventisgood = false;
284 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing number of good electrons == 4 :( "
285 <<" m_numberOfFullPassElectrons= " << m_numberOfFullPassElectrons << std::endl;
286 }
287 }
288 }
289
290 if ( eventisgood && m_workAsFourLeptons) {
291 bool thisselection = false;
292 if (m_numberOfFullPassMuons == 4) thisselection = true;
293 if (m_numberOfFullPassElectrons == 4) thisselection = true;
294 if (m_numberOfFullPassMuons >= 2 && m_numberOfFullPassElectrons >= 2) thisselection = true;
295 if (!thisselection) {
296 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing number of good muons >= 2 && electrons >= 2 :( "
297 <<" m_numberOfFullPassMuons= " << m_numberOfFullPassMuons
298 <<" m_numberOfFullPassElectrons= " << m_numberOfFullPassElectrons << std::endl;
299 }
300 }
301 eventisgood = thisselection;
302 }
303
304 //
305 // momentum of the leptons
306 // loop over the muons and electrons and count how many pass the leadingPt and secondPt cut
307 unsigned int npassleadingpt = 0;
308 unsigned int npasssecondpt = 0;
309 if ( eventisgood && (m_workAsFourMuons || m_workAsFourLeptons) ) {
310 if (m_numberOfFullPassMuons >= 2) { // electrons pt cuts if there are some electrons
311 //for (unsigned int i=0; i < m_numberOfFullPassMuons; i++) {
312 for (unsigned int i=0; i < NUM_MUONS; i++) {
313 if (m_pxIDTrack[i] == nullptr) continue;
314 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * using muon " << i << " with pt: " << m_pxIDTrack[i]->pt() << std::endl;}
315 if (m_pxIDTrack[i]->pt() > m_LeadingMuonPtCut*CLHEP::GeV) npassleadingpt++;
316 if (m_pxIDTrack[i]->pt() > m_SecondMuonPtCut*CLHEP::GeV) npasssecondpt++;
317 }
318 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * #muons with pt > leading pt: " << m_LeadingMuonPtCut*CLHEP::GeV << " = " << npassleadingpt << std::endl;}
319 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * #muons with pt > second pt: " << m_SecondMuonPtCut*CLHEP::GeV << " = " << npasssecondpt << std::endl;}
320 if (npassleadingpt == 0) { // at least 1 muon must pass the leading pt cut
321 eventisgood = false;
322 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing leading muon pt cut " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl;}
323 }
324 if (npasssecondpt < m_numberOfFullPassMuons) { // all muons must pass the second pt cut
325 eventisgood = false;
326 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing second muon pt cut " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl;}
327 }
328 }
329 }
330
331 // four electrons case
332 if ( eventisgood && (m_workAsFourElectrons || m_workAsFourLeptons) ) {
333 npassleadingpt = 0;
334 npasssecondpt = 0;
335 if (m_numberOfFullPassElectrons >= 2) { // electrons pt cuts if there are some electrons
336 for (unsigned int i=0; i < NUM_MUONS; i++) {
337 if (m_pxELTrack[i] == nullptr) continue;
338 if (m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * using electron " << i << " with pt: " << m_pxELTrack[i]->pt() << std::endl;}
339 if (m_pxELTrack[i]->pt() > m_LeadingMuonPtCut*CLHEP::GeV) npassleadingpt++;
340 if (m_pxELTrack[i]->pt() > m_SecondMuonPtCut*CLHEP::GeV) npasssecondpt++;
341 }
342 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * #elecs with pt > leading pt: " << m_LeadingMuonPtCut*CLHEP::GeV << " = " << npassleadingpt << std::endl;}
343 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * #elecs with pt > second pt: " << m_SecondMuonPtCut*CLHEP::GeV << " = " << npasssecondpt << std::endl;}
344 if (npassleadingpt == 0) { // at least 1 electron must pass the leading pt cut
345 eventisgood = false;
346 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing leading electron pt cut " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl;}
347 }
348 if (npasssecondpt < m_numberOfFullPassElectrons) { // all electrons must pass the second pt cut
349 eventisgood = false;
350 if(m_doDebug) {std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") * Failing second electrons pt cut " << m_LeadingMuonPtCut*CLHEP::GeV << std::endl;}
351 }
352 } // electron pt cuts apply if there are some electrons
353 }
354
355 // Invariant mass window
356 if (eventisgood) {
357 if ( m_fInvariantMass[eType] < m_MassWindowLow ) {
358 if(m_doDebug) {
359 std::cout <<" * FourMuonEvent::EventSelection * Failing mass window low cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowLow << std::endl;
360 }
361 eventisgood = false;
362 }
363 if ( m_fInvariantMass[eType] > m_MassWindowHigh ) {
364 if(m_doDebug) {
365 std::cout <<" * FourMuonEvent::EventSelection * Failing mass window high cut: reco m= " << m_fInvariantMass[eType] << " > " << m_MassWindowHigh << std::endl;
366 }
367 eventisgood = false;
368 }
369 }
370
371 // check on vertices
372 if (eventisgood) {
373 bool vertexstatus = false;
374
375 std::vector <float> vtxListX; // coordinates of the vertex
376 std::vector <float> vtxListY;
377 std::vector <float> vtxListZ;
378 std::vector <int> vtxNpart; // count how many particles are in vertex
379
380 int noVertexCountMuon = 0;
381 int noVertexCountElec = 0;
382 //
383 if ( m_workAsFourMuons ) { // till here we have the muon vertices list
384 m_nVertex = vtxListX.size();
385 if (vtxListX.size()>0) vertexstatus = true;
386 // check that the muons are not split into too many vertices
387 if (vtxListX.size() >= m_numberOfFullPassMuons - 1) vertexstatus = false;
388 // allow no muon without vertex
389 if (noVertexCountMuon > 0) vertexstatus = false;
390 if (m_doDebug || true) {
391 std::cout << " * FourMuonEvent::EventSelection(" << eType <<") * vertices ID of the muons = " << std::endl
392 << " mu- 1 " << m_muon_vtx[0] << " pt: " << m_pxMUTrack[0]->pt() << std::endl
393 << " mu- 2 " << m_muon_vtx[1] << " pt: " << m_pxMUTrack[1]->pt() << std::endl
394 << " mu+ 1 " << m_muon_vtx[2] << " pt: " << m_pxMUTrack[2]->pt() << std::endl
395 << " mu+ 2 " << m_muon_vtx[3] << " pt: " << m_pxMUTrack[3]->pt()
396 << std::endl;
397 } // end debug
398 } // end m_workAsFourMuons
399
400 if ( m_workAsFourElectrons ) { // till here we have the electrons vertices list
401 m_nVertex = vtxListX.size();
402 if (vtxListX.size()>0) vertexstatus = true;
403 // check that the electrons are not split into too many vertices
404 if (vtxListX.size() >= m_numberOfFullPassElectrons - 1) vertexstatus = false;
405
406 std::cout << " * FourMuonEvent::EventSelection(" << eType <<") * vertices ID of the electrons = "
407 << "\n el- 1 " << m_elec_vtx[0] << " pt: " << m_pxELTrack[0]->pt() << std::endl
408 << "\n el- 2 " << m_elec_vtx[1] << " pt: " << m_pxELTrack[1]->pt() << std::endl
409 << "\n el+ 1 " << m_elec_vtx[2] << " pt: " << m_pxELTrack[2]->pt() << std::endl
410 << "\n el+ 2 " << m_elec_vtx[3] << " pt: " << m_pxELTrack[3]->pt() <<"\n";
411 }
412
413 if ( m_workAsFourLeptons ) { // till here we have the muons and electrons vertices list
414 m_nVertex = vtxListX.size();
415 if (vtxListX.size()>0) vertexstatus = true;
416 // check that the electrons are not split into too many vertices
417 // if (vtxListX.size() >= m_numberOfFullPassElectrons - 1) vertexstatus = false;
418 // and allow no electron without vertex
419 if (m_doDebug) {
420 std::cout << " * FourMuonEvent::EventSelection(" << eType <<") * vertices in event = " << vtxListX.size() << std::endl;
421 for (size_t imu=0; imu < NUM_MUONS; imu++) {
422 if (m_pxMUTrack[imu]) std::cout << " mu " << m_muon_vtx[imu] << " pt: " << m_pxMUTrack[imu]->pt() << std::endl;
423 }
424 for (size_t iel=0; iel < NUM_MUONS; iel++) {
425 if (m_pxELTrack[iel]) std::cout << " el " << m_elec_vtx[iel] << " pt: " << m_pxELTrack[iel]->pt() << std::endl;
426 }
427 }
428 }
429
430 vertexstatus = true; // Temporary fix to work on R22
431
432 if(m_doDebug) {
433 std::cout <<" * FourMuonEvent::EventSelection(" << eType <<") * Number of vertex found = " << vtxListX.size()
434 << " and mu without vertex: " << noVertexCountMuon
435 << " and elec without vertex: " << noVertexCountElec << std::endl;
436 for (unsigned int ivtx=0; ivtx < vtxListX.size(); ivtx++) {
437 std::cout << " vtx[" << ivtx << "]= "
438 << "( " << vtxListX.at(ivtx)
439 << ", " << vtxListY.at(ivtx)
440 << ", " << vtxListZ.at(ivtx)
441 << ") nparticles: " << vtxNpart.at(ivtx)
442 << std::endl;
443 }
444 }
445
446
447 eventisgood = vertexstatus;
448 }
449
450 //
451 if(m_doDebug){ std::cout <<" * FourMuonEvent::EventSelection(" << eType << ") ** completed ** result= " << eventisgood << std::endl;}
452
453 m_doDebug = inputdebug;
454
455 return eventisgood;
456}

◆ get4MuInvMass()

const float & FourMuonEvent::get4MuInvMass ( ZTYPE eType)
inline

Definition at line 78 of file FourMuonEvent.h.

78{ return m_fInvariantMass[eType]; }

◆ getAcceptedEvents()

int FourMuonEvent::getAcceptedEvents ( )
inline

Definition at line 79 of file FourMuonEvent.h.

79{ return m_acceptedEventCount; }

◆ getCombMuon()

const xAOD::Muon * FourMuonEvent::getCombMuon ( unsigned int uPart)
inline

Definition at line 80 of file FourMuonEvent.h.

80{ return (uPart < NUM_MUONS) ? m_pxRecMuon[uPart] : nullptr; }

◆ getELTrack()

const xAOD::TrackParticle * FourMuonEvent::getELTrack ( unsigned int uPart)
inline

Definition at line 81 of file FourMuonEvent.h.

81{ return (uPart < NUM_MUONS) ? m_pxELTrack[uPart] : nullptr; }

◆ getIDTrack()

const xAOD::TrackParticle * FourMuonEvent::getIDTrack ( unsigned int uPart)
inline

Definition at line 82 of file FourMuonEvent.h.

82{ return (uPart < NUM_MUONS) ? m_pxIDTrack[uPart] : nullptr; }

◆ GetInvMass()

double FourMuonEvent::GetInvMass ( )
inline

Definition at line 83 of file FourMuonEvent.h.

83{ return m_FourMuonInvMass; }

◆ getLeptonOpeningAngle()

const float & FourMuonEvent::getLeptonOpeningAngle ( ZTYPE eType)
inline

Definition at line 86 of file FourMuonEvent.h.

86{ return m_fMuonDispersion[eType]; }

◆ getLooseIDTk()

const xAOD::TrackParticle * FourMuonEvent::getLooseIDTk ( unsigned int uPart)
inline

Definition at line 1003 of file FourMuonEvent.cxx.

1004{
1005 const xAOD::TrackParticleContainer* pxTrackContainer =
1007
1008 if ( pxTrackContainer )
1009 {
1010 xAOD::TrackParticleContainer::const_iterator xTrkItr = pxTrackContainer->begin();
1011 xAOD::TrackParticleContainer::const_iterator xTrkItrE = pxTrackContainer->end();
1012 while ( xTrkItr != xTrkItrE )
1013 {
1014 const xAOD::TrackParticle* pxTrack = *xTrkItr;
1015 if ( !pxTrack ) continue;
1016 const Trk::Track* pxTrkTrack = pxTrack->track();
1017 if(!pxTrkTrack) continue;
1018 const Trk::Perigee* pxPerigee = pxTrkTrack->perigeeParameters() ;
1019 if ( !pxPerigee ) continue;
1020 const float fTrkPhi = pxPerigee->parameters()[Trk::phi];
1021 const float fTrkEta = pxPerigee->eta();
1022
1023 float fDPhi = fabs( fTrkPhi - m_pxMETrack[m_muon1]->phi() );
1024 float fDEta = fabs( fTrkEta - m_pxMETrack[m_muon2]->eta() );
1025 float fDR = sqrt( fDPhi*fDPhi + fDEta*fDEta );
1026
1027 if ( fDR < 0.3f )
1028 {
1029 return pxTrack;
1030 }
1031
1032 ++xTrkItr;
1033 }
1034 }
1035 // if ()
1036 return nullptr;
1037}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
static const T * getContainer(CONTAINERS eContainer)
double eta() const
Access method for pseudorapidity - from momentum.
const Perigee * perigeeParameters() const
return Perigee.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ phi
Definition ParamDefs.h:75
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".

◆ getMSTrack()

const xAOD::TrackParticle * FourMuonEvent::getMSTrack ( unsigned int uPart)
inline

Definition at line 84 of file FourMuonEvent.h.

84{ return (uPart < NUM_MUONS) ? m_pxMSTrack[uPart] : nullptr; }

◆ getNegMuon()

unsigned int FourMuonEvent::getNegMuon ( int eType)

Definition at line 995 of file FourMuonEvent.cxx.

996{
997 unsigned int muid = m_muonneg1;
998 if (eType==2) muid = m_muonneg2;
999 return muid;
1000}

◆ getNumberOfTaggedMuons()

unsigned int FourMuonEvent::getNumberOfTaggedMuons ( )
inline

Definition at line 88 of file FourMuonEvent.h.

◆ GetNVertex()

int FourMuonEvent::GetNVertex ( )
inline

Definition at line 89 of file FourMuonEvent.h.

89{ return m_nVertex; }

◆ getPosMuon()

unsigned int FourMuonEvent::getPosMuon ( int eType)

Definition at line 984 of file FourMuonEvent.cxx.

985{
986 //if ( getNumberOfTaggedMuons() != 2 ) return 999;
987 //if ( getZCharge(eType) != 0 ) return 999;
988
989 unsigned int muid = m_muonpos1;
990 if (eType==2) muid = m_muonpos2;
991 return muid;
992}

◆ getPtImbalance()

float FourMuonEvent::getPtImbalance ( ZTYPE eType)

Definition at line 924 of file FourMuonEvent.cxx.

925{
926 // First determine what's positive
927 if ( m_numberOfFullPassMuons == 2 )
928 {
929 switch ( eType )
930 {
931 case MS :
932 {
934 }
935 case ME:
936 {
938 }
939 case CB:
940 {
942 }
943 case ID:
944 {
946 }
947 default:
948 return -999.0;
949 }
950 }
951 else
952 {
953 return -999.0;
954 }
955}
static float EvalPtDiff(const T *pxP1, const T *pxP2)

◆ getRegion()

const std::string FourMuonEvent::getRegion ( ) const

◆ GetVertexElec()

int FourMuonEvent::GetVertexElec ( unsigned int uPart)
inline

Definition at line 93 of file FourMuonEvent.h.

93{ return (uPart < NUM_MUONS) ? m_elec_vtx[uPart] : 0;}

◆ GetVertexElNeg1()

int FourMuonEvent::GetVertexElNeg1 ( )
inline

Definition at line 94 of file FourMuonEvent.h.

94{ return m_elec_vtx[0];}

◆ GetVertexElNeg2()

int FourMuonEvent::GetVertexElNeg2 ( )
inline

Definition at line 95 of file FourMuonEvent.h.

95{ return m_elec_vtx[1];}

◆ GetVertexElPos1()

int FourMuonEvent::GetVertexElPos1 ( )
inline

Definition at line 96 of file FourMuonEvent.h.

96{ return m_elec_vtx[2];}

◆ GetVertexElPos2()

int FourMuonEvent::GetVertexElPos2 ( )
inline

Definition at line 97 of file FourMuonEvent.h.

97{ return m_elec_vtx[3];}

◆ GetVertexMuNeg1()

int FourMuonEvent::GetVertexMuNeg1 ( )
inline

Definition at line 98 of file FourMuonEvent.h.

98{ return m_muon_vtx[0];}

◆ GetVertexMuNeg2()

int FourMuonEvent::GetVertexMuNeg2 ( )
inline

Definition at line 99 of file FourMuonEvent.h.

99{ return m_muon_vtx[1];}

◆ GetVertexMuPos1()

int FourMuonEvent::GetVertexMuPos1 ( )
inline

Definition at line 100 of file FourMuonEvent.h.

100{ return m_muon_vtx[2];}

◆ GetVertexMuPos2()

int FourMuonEvent::GetVertexMuPos2 ( )
inline

Definition at line 101 of file FourMuonEvent.h.

101{ return m_muon_vtx[3];}

◆ getZCharge()

int FourMuonEvent::getZCharge ( ZTYPE eType)

Definition at line 958 of file FourMuonEvent.cxx.

959{
960 switch ( eType )
961 {
962 case MS :
963 {
964 return ( static_cast<int>( EvalCharge( m_pxMSTrack[m_muon1], m_pxMSTrack[m_muon2] ) ) );
965 }
966 case ME:
967 {
968 return ( static_cast<int>( EvalCharge( m_pxMETrack[m_muon1], m_pxMETrack[m_muon2] ) ) );
969 }
970 case CB:
971 {
972 return ( static_cast<int>( EvalCharge( m_pxRecMuon[m_muon1], m_pxRecMuon[m_muon2] ) ) );
973 }
974 case ID:
975 {
976 return ( static_cast<int>( EvalCharge( m_pxIDTrack[m_muon1], m_pxIDTrack[m_muon2] ) ) );
977 }
978 default:
979 return -999;
980 }
981}
static float EvalCharge(const T *pxP1, const T *pxP2)

◆ getZEta()

const float & FourMuonEvent::getZEta ( ZTYPE eType)
inline

Definition at line 103 of file FourMuonEvent.h.

103{ return m_fZEtaDir[eType]; }

◆ getZMass()

const float & FourMuonEvent::getZMass ( ZTYPE eType)
inline

Definition at line 104 of file FourMuonEvent.h.

104{ return m_fInvariantMass[eType];}

◆ getZPhi()

const float & FourMuonEvent::getZPhi ( ZTYPE eType)
inline

Definition at line 105 of file FourMuonEvent.h.

105{ return m_fZPhiDir[eType]; }

◆ getZPt()

const float & FourMuonEvent::getZPt ( ZTYPE eType)
inline

Definition at line 106 of file FourMuonEvent.h.

106{ return m_fZPt[eType]; }

◆ Init()

void FourMuonEvent::Init ( )
virtual

Reimplemented from EventAnalysis.

Definition at line 61 of file FourMuonEvent.cxx.

62{
63 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Init * START *" << endmsg;
64
65 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Init * initializing muon selector *" << endmsg;
66 m_xMuonID.Init();
67 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Init * initializing electron selector *" << endmsg;
68 m_xElecID.Init();
69
70 if (m_workAsFourMuons) {(*m_msgStream) << MSG::INFO << " * FourMuonEvent::Init * working mode: 4 muons" << endmsg; }
71 if (m_workAsFourElectrons) {(*m_msgStream) << MSG::INFO << " * FourMuonEvent::Init * working mode: 4 electrons" << endmsg; }
72 if (m_workAsFourLeptons) {(*m_msgStream) << MSG::INFO << " * FourMuonEvent::Init * working mode: 4 leptons" << endmsg; }
73
75 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Init * Completed * " << endmsg;
76
77 return;
78}
virtual void Init()
ElectronSelector m_xElecID

◆ operator=()

FourMuonEvent & FourMuonEvent::operator= ( const FourMuonEvent & )
delete

◆ OrderMuonList()

void FourMuonEvent::OrderMuonList ( )

Definition at line 1083 of file FourMuonEvent.cxx.

1084{
1085 // Salva: 20/January/2020 RecMuon -> IDTrack
1086 constexpr bool thisdebug = false;
1087
1088 if (m_doDebug || thisdebug) {std::cout << " * FourMuonEvent::OrderMuonList * -- start -- " << std::endl
1089 << " #muons: " << m_numberOfFullPassMuons<< std::endl;}
1090
1091 int muPlus1Id = -9;
1092 int muPlus2Id = -9;
1093 int muMinus1Id = -9;
1094 int muMinus2Id = -9;
1095 double muPlus1Pt = 0.;
1096 double muPlus2Pt = 0.;
1097 double muMinus1Pt = 0.;
1098 double muMinus2Pt = 0.;
1099
1100 int muposcount = 0;
1101 int munegcount = 0;
1102
1103 int nMuonsAtEntry = m_numberOfFullPassMuons;
1104 m_numberOfFullPassMuons = 0; // reset the number of full pass muons
1105
1106 if (nMuonsAtEntry >= 2) { // we need at least 2 muons
1107 for (int imuon=0; imuon < (int) nMuonsAtEntry; imuon++) {
1108 if(m_doDebug && false ){ std::cout << " * FourMuonEvent::OrderMuonList * testing imuon= " << imuon
1109 << " with charge= " << m_pxRecMuon[imuon]->charge()
1110 << " and pt= " << m_pxRecMuon[imuon]->pt()
1111 << std::endl;
1112 }
1113 if (m_pxIDTrack[imuon] != nullptr) {
1114
1115 if (m_pxIDTrack[imuon]->charge()==1) { // positive muon
1116 muposcount++;
1117 if (m_pxIDTrack[imuon]->pt()> muPlus1Pt) {
1118 // store 1st in 2nd
1119 muPlus2Pt = muPlus1Pt;
1120 muPlus2Id = muPlus1Id;
1121 // now store the new one in 1st place
1122 muPlus1Pt = m_pxIDTrack[imuon]->pt();
1123 muPlus1Id = imuon;
1124 }
1125 else if (m_pxIDTrack[imuon]->pt()> muPlus2Pt) {
1126 // store the new one in 2nd place
1127 muPlus2Pt = m_pxIDTrack[imuon]->pt();
1128 muPlus2Id = imuon;
1129 }
1130 }
1131 // Negative muons
1132 if (m_pxIDTrack[imuon]->charge()==-1) {
1133 munegcount++;
1134 if(m_pxIDTrack[imuon]->pt()> muMinus1Pt) {
1135 // store 1st in 2nd
1136 muMinus2Pt = muMinus1Pt;
1137 muMinus2Id = muMinus1Id;
1138 muMinus1Pt = m_pxIDTrack[imuon]->pt();
1139 muMinus1Id = imuon;
1140 }
1141 else if(m_pxRecMuon[imuon]->pt()> muMinus2Pt) {
1142 muMinus2Pt = m_pxIDTrack[imuon]->pt();
1143 muMinus2Id = imuon;
1144 }
1145 }
1146 } // muon exist
1147 } // for (int imuon)
1148 } // if (nMuonsAtEntry >= 2)
1149
1150 // require at least one opposite charge muon pair
1151 if (nMuonsAtEntry >= 2 && (muposcount == 0 || munegcount == 0)) {
1152 if (m_doDebug) std::cout << " -- FourMuonEvent::OrderMuonList -- No opposite charge muons in the " << nMuonsAtEntry << " input muons"
1153 << " #mu+ " << muposcount
1154 << " #mu- " << munegcount
1155 << " --> DISCARD ALL MUONS -- \n";
1156 muPlus1Id = -9;
1157 muPlus2Id = -9;
1158 muMinus1Id = -9;
1159 muMinus2Id = -9;
1160 }
1161
1162
1163 if (muPlus1Id>=0) {m_muonpos1 = muPlus1Id; m_numberOfFullPassMuons++;}
1164 if (muPlus2Id>=0) {m_muonpos2 = muPlus2Id; m_numberOfFullPassMuons++;}
1165 if (muMinus1Id>=0) {m_muonneg1 = muMinus1Id; m_numberOfFullPassMuons++;}
1166 if (muMinus2Id>=0) {m_muonneg2 = muMinus2Id; m_numberOfFullPassMuons++;}
1167
1168 m_muon1 = m_muonpos1; // to be deleted when no more m_muon is left
1169 m_muon2 = m_muonneg1; // to be deleted when no more m_muon is left
1170
1171 if ((m_doDebug || thisdebug) && m_numberOfFullPassMuons >= 2){
1172 std::cout << " * FourMuonEvent::OrderMuonList * taking " << m_numberOfFullPassMuons << " muons from the input list of " << nMuonsAtEntry << " muons: " << std::endl;
1173 if (muMinus1Id >= 0) std::cout << " leading mu-: " << muMinus1Id << " Pt = " << muMinus1Pt << std::endl;
1174 if (muMinus2Id >= 0) std::cout << " second mu-: " << muMinus2Id << " Pt = " << muMinus2Pt << std::endl;
1175 if (muPlus1Id >= 0) std::cout << " leading mu+: " << muPlus1Id << " Pt = " << muPlus1Pt << std::endl;
1176 if (muPlus2Id >= 0) std::cout << " second mu+: " << muPlus2Id << " Pt = " << muPlus2Pt << std::endl;
1177 }
1178 else {
1179 if (m_doDebug) std::cout << " * FourMuonEvent::OrderMuonList * This event has less than 2 muons :(" << std::endl;
1180 }
1181
1182 if (m_doDebug || thisdebug) std::cout << " * FourMuonEvent::OrderMuonList * completed * m_numberOfFullPassMuons= " << m_numberOfFullPassMuons << std::endl;
1183 return;
1184}
double charge(const T &p)
Definition AtlasPID.h:997

◆ Reco()

bool FourMuonEvent::Reco ( )

Definition at line 81 of file FourMuonEvent.cxx.

82{
84 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * STARTING ** New event ** eventCount " << m_eventCount << endmsg;
85
86 // Clear out the previous events record.
87 this->Clear();
88
89 // if muons are requested
91 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * retrieving xAOD::MuonContainer " << m_container << " of eventCount " << m_eventCount << std::endl;
92
94
95 // check if muon container does exist
96 if (pxMuonContainer != nullptr) {
97 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * eventCount " << m_eventCount
98 << " track list has "<< pxMuonContainer->size()
99 << " combined muons in container " << m_container
100 << " container name: " << PerfMonServices::getContainerName ( m_container )
101 << endmsg;
102
103 xAOD::MuonContainer::const_iterator xMuonItr = pxMuonContainer->begin();
104 xAOD::MuonContainer::const_iterator xMuonItrE = pxMuonContainer->end();
105 int theCount = 0;
106 while ( xMuonItr != xMuonItrE ){ // start loop on muons
107 const xAOD::Muon* pxCMuon = *xMuonItr;
108 theCount++;
109 // Apply muon cuts
110 if ( m_xMuonID.passSelection( pxCMuon)) {
111 RecordMuon( pxCMuon );
112 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco ** muon " << theCount << " is accepted " << endmsg;
113 }
114 ++xMuonItr;
115 } // end loop on muons
116
117 // ordering of muons
118 this->OrderMuonList();
119 } // end muon container exists
120 if (!pxMuonContainer) {
121 std::cout << " * FourMuonEvent::Reco * Can't retrieve combined muon collection (container: " << m_container <<") " << std::endl;
122 return false;
123 } // end muon container does not exist
124 } // end requesting muons
125
126 //
127 // Electron selection (in case electrons are requested)
129 // Get the electron AOD container
130 const xAOD::ElectronContainer* pxElecContainer = nullptr;
131 if (m_doDebug){ std::cout << " * FourMuonEvent::Reco * retrieving xAOD::ElectronContainer " << PerfMonServices::ELECTRON_COLLECTION << std::endl; }
133
134 //pxElecContainer = evtStore()->retrieve( pxElecContainer, "Electrons" );
135
136 if (pxElecContainer != nullptr) {
137 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * retrieving xAOD::ElectronContainer SUCCESS. "
139 << " size: " << pxElecContainer->size()
140 << endmsg;
141 if (pxElecContainer->size() > 0 ){
142 m_xElecID.PrepareElectronList (pxElecContainer);
143 m_numberOfFullPassElectrons = m_xElecID.GetElectronCollectionSize();
145 }
146 }
147 else { // no pxElecContainer
148 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * retrieving xAOD::ElectronContainer -- FAILED -- eventcount: " << m_eventCount << endmsg;
149 }
150 }
151
153 // reached this point one has the list of muons and electrons in this event
155
156 // now check if the particles in the event make them to satisfy the event selection
157 if (m_workAsFourMuons) {
158 m_passedFourMuonSelection = false; // unless the event has 4 muons, assume it is not good
159
160 if (m_numberOfFullPassMuons == 4) {
164
166 m_FourMuonInvMass = m_fInvariantMass[ID]; // store invariant mass
167 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * === Event " << m_eventCount << " is a GOOD 4-muon event " << std::endl;
168 }
169 else {
170 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * === Event " << m_eventCount << " FAILS the 4-muon event selection " << std::endl;
171 }
172 }
173 } // end of workAsFourMuons
174
176 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * applying 4 electron selection " << std::endl;
177 m_passedFourElectronSelection = false; // unless the event has 4 muons, assume it is not good
178
182
184 m_FourMuonInvMass = m_fInvariantMass[ID]; // store invariant mass
185 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * === Event " << m_eventCount << " is a GOOD 4-electrom event " << std::endl;
186 }
187 else {
188 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * === Event " << m_eventCount << " FAILS the 4-electron event selection " << std::endl;
189 }
190 }
191 else {
192 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * === Event " << m_eventCount << " is not a 4-electron event " << std::endl;
193 }
194 } // end of workAsFourElectrons
195
196
198 if (m_doDebug) std::cout << " * FourMuonEvent::Reco * applying 4 lepton selection " << std::endl;
200
201 bool enoughleptons = false;
202 if (m_numberOfFullPassMuons == 4) enoughleptons = true;
203 if (m_numberOfFullPassElectrons == 4) enoughleptons = true;
204 if (m_numberOfFullPassMuons >= 2 && m_numberOfFullPassElectrons >= 2) enoughleptons = true;
205
206 if ( enoughleptons) {
207 if (m_doDebug) {
208 std::cout << " * FourMuonEvent::Reco * Global statistics: Total number of accepted muons so far: " << m_acceptedMuonCount
209 << " & electrons: " << m_acceptedElecCount << " integrated over all events "
210 << std::endl;
211 std::cout << " * FourMuonEvent::Reco * This event has " << m_numberOfFullPassMuons
212 << " muons & " << m_numberOfFullPassElectrons << " electrons --> try kinematics, vertex and event selection"
213 << std::endl;
214 }
218
220 m_FourMuonInvMass = m_fInvariantMass[ID]; // store invariant mass
221 (*m_msgStream) << MSG::INFO << " * FourMuonEvent::Reco * === Event " << m_eventCount << " is a GOOD 4-lepton event with inv mass: " << m_FourMuonInvMass << endmsg;
222 }
223 else {
224 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * === Event " << m_eventCount << " -- FAILS -- the 4-lepton event selection " << endmsg;
225 }
226 }
227 else {
228 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * 4lepton selection FAILURE. Not enough muons or electrons. Event has " << m_numberOfFullPassMuons
229 << " muons & " << m_numberOfFullPassElectrons << " electrons"
230 << endmsg;
231 }
232 }
233
234 m_passedSelectionCuts = false; // assume event is not good, but check the selection according to the use case
238
240
241 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent::Reco * COMPLETED * Event has " << m_numberOfFullPassMuons << " muons & "
242 << m_numberOfFullPassElectrons << " electrons. "
243 << " So far: " << m_acceptedEventCount << " events were accepted out of " << m_eventCount << " tested" << endmsg;
244
246}
size_type size() const noexcept
Returns the number of elements in the collection.
bool ReconstructKinematicsNew()
void RecordMuon(const xAOD::Muon *pxMuon)
bool EventSelectionNew(ZTYPE eType)
static const std::string & getContainerName(CONTAINERS eContainer)
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".

◆ ReconstructKinematics()

bool FourMuonEvent::ReconstructKinematics ( )
private

Definition at line 693 of file FourMuonEvent.cxx.

694{
695 if(m_doDebug){ std::cout << " * FourMuonEvent * ReconstructKinematics * -- start -- " << std::endl; }
696 bool kinematicscomputed = false;
697
698 // Three ways. No checks here. Thus make sure the pointers are ok before this.
699 if ( m_numberOfFullPassMuons == 4 ) {
700 // crosscheck identifiers are good:
701 bool goodidentifiers = true;
702 if (m_muonneg1 < 0) goodidentifiers = false;
703 if (m_muonneg2 < 0) goodidentifiers = false;
704 if (m_muonpos1 < 0) goodidentifiers = false;
705 if (m_muonpos2 < 0) goodidentifiers = false;
706
707 if (goodidentifiers) {
708 // before computing the kinematic parameters check track particles are ok
709 bool goodtracks = true;
710 if (m_pxIDTrack[m_muonneg1] == nullptr) goodtracks = false;
711 if (m_pxIDTrack[m_muonneg2] == nullptr) goodtracks = false;
712 if (m_pxIDTrack[m_muonpos1] == nullptr) goodtracks = false;
713 if (m_pxIDTrack[m_muonpos2] == nullptr) goodtracks = false;
714
719
720 if (goodtracks) { // Everything is ready
722 m_fMuonDispersion[ID] = EvaluateAngle( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
723 m_fZPt[ID] = EvalPt( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
724 m_fZEtaDir[ID] = EvalEta( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
725 m_fZPhiDir[ID] = EvalPhi( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
726
727 kinematicscomputed = true;
728
729 if(m_doDebug){
730 std::cout << " * FourMuonEvent * ReconstructKinematics4Elec * -- Muon ID Tracks -- new -- " << std::endl
731 << " Pt(mu1-)= " << m_pxMUTrack[0]->pt() << std::endl
732 << " Pt(mu2-)= " << m_pxMUTrack[1]->pt() << std::endl
733 << " Pt(mu1+)= " << m_pxMUTrack[2]->pt() << std::endl
734 << " Pt(mu2+)= " << m_pxMUTrack[3]->pt() << std::endl
735 << " invariant mass (4mu) = " << m_fInvariantMass[ID] << std::endl
736 << std::endl;
737 }
738
739 } // good tracks
740 } // goodidentifiers
741 } // goodmuons == 4
742
743 if (!kinematicscomputed) {
744 if(m_doDebug){ std::cout <<" * FourMuonEvent * ReconstructKinematics * -- FAILED -- " << std::endl; }
745 }
746
747 if(m_doDebug){ std::cout <<" * FourMuonEvent * ReconstructKinematics * -- completed -- status: " << kinematicscomputed << std::endl; }
748 return kinematicscomputed;
749}
static float EvaluateAngle(const T *pxP1, const T *pxP2)
static float EvalPhi(const T *pxP1, const T *pxP2)
static float EvalPt(const T *pxP1, const T *pxP2)
static float EvalFourMuInvMass(const T *pxP1, const T *pxP2, const T *pxP3, const T *pxP4)
static float EvalEta(const T *pxP1, const T *pxP2)

◆ ReconstructKinematics4Elec()

bool FourMuonEvent::ReconstructKinematics4Elec ( )
private

Definition at line 752 of file FourMuonEvent.cxx.

753{
754 if(m_doDebug){ std::cout << " * FourMuonEvent * ReconstructKinematics4Elec * -- start -- " << std::endl; }
755 bool kinematicscomputed = false;
756
757 // Three ways. No checks here. Thus make sure the pointers are ok before this.
758 if ( m_numberOfFullPassElectrons == 4 ) {
759 // before computing the kinematic parameters check track particles are ok
760 bool goodtracks = true;
761 m_pxELTrack[0] = m_xElecID.GetElecNegTrackParticle(0);
762 m_pxELTrack[1] = m_xElecID.GetElecNegTrackParticle(1);
763 m_pxELTrack[2] = m_xElecID.GetElecPosTrackParticle(0);
764 m_pxELTrack[3] = m_xElecID.GetElecPosTrackParticle(1);
765 if (m_pxELTrack[0] == nullptr) goodtracks = false;
766 if (m_pxELTrack[1] == nullptr) goodtracks = false;
767 if (m_pxELTrack[2] == nullptr) goodtracks = false;
768 if (m_pxELTrack[3] == nullptr) goodtracks = false;
769
770 if (goodtracks) { // Everything is ready
771 // For the time being analysis is performed only with ID tracks
773 m_fMuonDispersion[ID] = EvaluateAngle( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
774 m_fZPt[ID] = EvalPt( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
775 m_fZEtaDir[ID] = EvalEta( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
776 m_fZPhiDir[ID] = EvalPhi( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
777 kinematicscomputed = true;
778
779 if(m_doDebug){
780 std::cout << " * FourMuonEvent * ReconstructKinematics4Elec * -- Electron Tracks -- " << std::endl
781 << " Pt(e1-)= " << m_pxELTrack[0]->pt() << std::endl
782 << " Pt(e2-)= " << m_pxELTrack[1]->pt() << std::endl
783 << " Pt(e1+)= " << m_pxELTrack[2]->pt() << std::endl
784 << " Pt(e2+)= " << m_pxELTrack[3]->pt() << std::endl
785 << " invariant mass (4e) = " << m_fInvariantMass[ID] << std::endl
786 << std::endl;
787 }
788 } // good tracks
789 } // goodidentifiers
790
791 if (!kinematicscomputed) {
792 if(m_doDebug){ std::cout <<" * FourMuonEvent * ReconstructKinematics4Elec * -- FAILED -- " << std::endl; }
793 }
794
795 if(m_doDebug){ std::cout <<" * FourMuonEvent * ReconstructKinematics4Elec * -- completed -- status: " << kinematicscomputed << std::endl; }
796 return kinematicscomputed;
797}

◆ ReconstructKinematicsNew()

bool FourMuonEvent::ReconstructKinematicsNew ( )
private

Definition at line 800 of file FourMuonEvent.cxx.

801{
802 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent * ReconstructKinematicsNew * -- START -- " << endmsg;
803
804 bool kinematicscomputed = false;
805
806 // first step get the list of TrackParticles for muons and electrons
807 // -- muons (a bit more complex than for electrons)
812 // add an extra proteccion
813 if (m_numberOfFullPassMuons < 2) {
814 for (int i=0; i<4; i++) m_pxMUTrack[i] = nullptr;
815 }
816
817 // -- electrons
818 m_pxELTrack[0] = m_xElecID.GetElecNegTrackParticle(0);
819 m_pxELTrack[1] = m_xElecID.GetElecNegTrackParticle(1);
820 m_pxELTrack[2] = m_xElecID.GetElecPosTrackParticle(0);
821 m_pxELTrack[3] = m_xElecID.GetElecPosTrackParticle(1);
822 // add an extra proteccion
824 for (int i=0; i<4; i++) m_pxELTrack[i] = nullptr;
825 }
826
827 if ( m_numberOfFullPassMuons == 4 ) {
828 bool goodtracks = true;
829 if (m_pxMUTrack[0] == nullptr) goodtracks = false;
830 if (m_pxMUTrack[1] == nullptr) goodtracks = false;
831 if (m_pxMUTrack[2] == nullptr) goodtracks = false;
832 if (m_pxMUTrack[3] == nullptr) goodtracks = false;
833
834 if (goodtracks) { // Everything is ready
836 m_fMuonDispersion[ID] = EvaluateAngle ( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
837 m_fZPt[ID] = EvalPt ( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
838 m_fZEtaDir[ID] = EvalEta ( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
839 m_fZPhiDir[ID] = EvalPhi ( m_pxMUTrack[0], m_pxMUTrack[2]); // leading mu- and leading mu+
840 kinematicscomputed = true;
841 }
842 }
843
844 if(m_doDebug){
845 std::cout << " * FourMuonEvent * ReconstructKinematicsNew * -- Muon ID Tracks -- new -- " << std::endl;
846 if (m_pxMUTrack[0] != nullptr) std::cout << " Pt(mu1-)= " << m_pxMUTrack[0]->pt() << std::endl;
847 if (m_pxMUTrack[1] != nullptr) std::cout << " Pt(mu2-)= " << m_pxMUTrack[1]->pt() << std::endl;
848 if (m_pxMUTrack[2] != nullptr) std::cout << " Pt(mu1+)= " << m_pxMUTrack[2]->pt() << std::endl;
849 if (m_pxMUTrack[3] != nullptr) std::cout << " Pt(mu2+)= " << m_pxMUTrack[3]->pt() << std::endl;
850 if (kinematicscomputed) std::cout << " invariant mass (4mu) = " << m_fInvariantMass[ID] << std::endl;
851 }
852
853 double invmass_test = -1.; // default value
854 if ( m_numberOfFullPassElectrons == 4) {
855 // before computing the kinematic parameters check track particles are ok
856 bool goodtracks = true;
857 if (m_pxELTrack[0] == nullptr) goodtracks = false;
858 if (m_pxELTrack[1] == nullptr) goodtracks = false;
859 if (m_pxELTrack[2] == nullptr) goodtracks = false;
860 if (m_pxELTrack[3] == nullptr) goodtracks = false;
861
862 if (goodtracks && !kinematicscomputed) { // Everything is ready
863 // For the time being analysis is performed only with ID tracks
865 invmass_test = m_fInvariantMass[ID];
866 m_fMuonDispersion[ID] = EvaluateAngle( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
867 m_fZPt[ID] = EvalPt( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
868 m_fZEtaDir[ID] = EvalEta( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
869 m_fZPhiDir[ID] = EvalPhi( m_pxELTrack[0], m_pxELTrack[2]); // leading e- and leading e+
870 kinematicscomputed = true;
871 } // good tracks
872 }
873 if(m_doDebug){
874 std::cout << " * FourMuonEvent * ReconstructKinematicsNew * -- Electron Tracks -- " << std::endl;
875 if (m_pxELTrack[0] != nullptr) std::cout << " Pt(e1-)= " << m_pxELTrack[0]->pt() << std::endl;
876 if (m_pxELTrack[1] != nullptr) std::cout << " Pt(e2-)= " << m_pxELTrack[1]->pt() << std::endl;
877 if (m_pxELTrack[2] != nullptr) std::cout << " Pt(e1+)= " << m_pxELTrack[2]->pt() << std::endl;
878 if (m_pxELTrack[3] != nullptr) std::cout << " Pt(e2+)= " << m_pxELTrack[3]->pt() << std::endl;
879 std::cout << " invariant mass (4e) = " << invmass_test << std::endl;
880 }
881
882 if ( m_numberOfFullPassMuons >= 2 && m_numberOfFullPassElectrons >= 2 && !kinematicscomputed) {
883 // before computing the kinematic parameters check track particles are ok
884 bool goodtracks = true;
885 if (m_pxMUTrack[0] == nullptr) goodtracks = false; // leading mu-
886 if (m_pxMUTrack[2] == nullptr) goodtracks = false; // leading mu+
887 if (m_pxELTrack[0] == nullptr) goodtracks = false; // leading e-
888 if (m_pxELTrack[2] == nullptr) goodtracks = false; // leading e+
889
890 if (goodtracks && !kinematicscomputed) { // Everything is ready
891 // For the time being analysis is performed only with ID tracks
893 invmass_test = m_fInvariantMass[ID];
894 m_fMuonDispersion[ID] = EvaluateAngle ( m_pxMUTrack[0], m_pxELTrack[0]); // leading mu- and leading e-
895 m_fZPt[ID] = EvalPt ( m_pxMUTrack[0], m_pxELTrack[0]); // leading mu- and leading e-
896 m_fZEtaDir[ID] = EvalEta ( m_pxMUTrack[0], m_pxELTrack[0]); // leading mu- and leading e-
897 m_fZPhiDir[ID] = EvalPhi ( m_pxMUTrack[0], m_pxELTrack[0]); // leading mu- and leading e-
898 kinematicscomputed = true;
899 } // good tracks
900 }
901 if(m_doDebug){
902 std::cout << " * FourMuonEvent * ReconstructKinematicsNew * -- Muon and Electron Tracks -- " << std::endl;
903 if (m_pxMUTrack[0] != nullptr) std::cout << " Pt(mu1-)= " << m_pxMUTrack[0]->pt() << std::endl;
904 if (m_pxMUTrack[1] != nullptr) std::cout << " Pt(mu2-)= " << m_pxMUTrack[1]->pt() << std::endl;
905 if (m_pxMUTrack[2] != nullptr) std::cout << " Pt(mu1+)= " << m_pxMUTrack[2]->pt() << std::endl;
906 if (m_pxMUTrack[3] != nullptr) std::cout << " Pt(mu2+)= " << m_pxMUTrack[3]->pt() << std::endl;
907 if (m_pxELTrack[0] != nullptr) std::cout << " Pt(e1-)= " << m_pxELTrack[0]->pt() << std::endl;
908 if (m_pxELTrack[1] != nullptr) std::cout << " Pt(e2-)= " << m_pxELTrack[1]->pt() << std::endl;
909 if (m_pxELTrack[2] != nullptr) std::cout << " Pt(e1+)= " << m_pxELTrack[2]->pt() << std::endl;
910 if (m_pxELTrack[3] != nullptr) std::cout << " Pt(e2+)= " << m_pxELTrack[3]->pt() << std::endl;
911 std::cout << " invariant mass used = " << m_fInvariantMass[ID] << std::endl;
912 std::cout << " invariant mass test = " << invmass_test << std::endl;
913 }
914
915 if (!kinematicscomputed) {
916 if(m_doDebug){ std::cout <<" * FourMuonEvent * ReconstructKinematicsNew * -- FAILED -- " << std::endl; }
917 }
918
919 (*m_msgStream) << MSG::DEBUG << " * FourMuonEvent * ReconstructKinematicsNew * -- COMPLETED -- status " << kinematicscomputed << endmsg;
920 return kinematicscomputed;
921}

◆ RecordMuon()

void FourMuonEvent::RecordMuon ( const xAOD::Muon * pxMuon)
private

Definition at line 641 of file FourMuonEvent.cxx.

642{
643 constexpr bool thisdebug = false;
644 // This shouldn't really ever happen but just in case.
645 if ( !pxMuon ) {
646 if(m_doDebug){ std::cout <<" * FourMuonEvent * RecordMuon * bad pxMuon --> EXIT "<< std::endl;}
647 return;
648 }
649
651 // The main Muon
653 if (thisdebug) {
654 std::cout <<" * FourMuonEvent * RecordMuon * m_pxRecMuon for this muon--> pt "<< m_pxRecMuon[m_numberOfFullPassMuons]->pt() << std::endl;
655 std::cout <<" d0 "<< m_pxRecMuon[m_numberOfFullPassMuons]->trackParticle(xAOD::Muon::TrackParticleType::Primary)->d0() << std::endl;
656 std::cout <<" sigma_d0 "<< m_pxRecMuon[m_numberOfFullPassMuons]->trackParticle(xAOD::Muon::TrackParticleType::Primary)->definingParametersCovMatrixVec()[0] << std::endl;
657 }
658
659 const xAOD::TrackParticle* pxMSTrack = pxMuon->trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
660 if (!pxMSTrack) {
661 if (m_doDebug){ std::cout <<" * FourMuonEvent * RecordMuon * bad pxMSmuon --> EXIT "<< std::endl;}
662 return;
663 }
665 if (thisdebug) {
666 std::cout <<" * FourMuonEvent * RecordMuon * m_pxMSTrack for this muon--> pt "<< m_pxMSTrack[m_numberOfFullPassMuons]->pt() << std::endl;
667 std::cout <<" d0 "<< m_pxMSTrack[m_numberOfFullPassMuons]->d0() << std::endl;
668 std::cout <<" sigma_d0 "<< m_pxMSTrack[m_numberOfFullPassMuons]->definingParametersCovMatrixVec()[0] << std::endl;
669 }
670
671 // ID muon
672 const xAOD::TrackParticle* pxIDTrack = pxMuon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
673 if (!pxIDTrack) {
674 if (m_doDebug){ std::cout <<" * FourMuonEvent * RecordMuon * bad pxIDTrack for this muon--> EXIT "<< std::endl;}
675 return;
676 }
678 if (thisdebug) {
679 std::cout <<" * FourMuonEvent * RecordMuon * m_pxIDTrack for this muon--> pt "<< m_pxIDTrack[m_numberOfFullPassMuons]->pt() << std::endl;
680 std::cout <<" d0 "<< m_pxIDTrack[m_numberOfFullPassMuons]->d0() << std::endl;
681 std::cout <<" sigma_d0 "<< m_pxIDTrack[m_numberOfFullPassMuons]->definingParametersCovMatrixVec()[0] << std::endl;
682 }
683 //
686 }
687 // if(m_doDebug){ std::cout <<" * FourMuonEvent * RecordMuon * completed -- return with a total of " << m_numberOfFullPassMuons << std::endl;}
688 return;
689}
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be a nullptr) to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:422

◆ Register()

void EventAnalysis::Register ( )
privateinherited

Definition at line 63 of file EventAnalysis.cxx.

64{
65 ServiceHandle<ITHistSvc> histSvc ("THistSvc", "EventAnalysis");
66
67 // Register histograms in monitoring tool
68 registerHistogramType(*histSvc, m_x1DHistograms, m_xSampleName, "/1dhisto_");
69 registerHistogramType(*histSvc, m_x2DHistograms, m_xSampleName, "/2dhisto_");
70
71 registerHistogramType(*histSvc, m_x1DProfHistograms, m_xSampleName, "/1dprof_");
72 registerHistogramType(*histSvc, m_x2DProfHistograms, m_xSampleName, "/2dprof_");
73}
std::map< unsigned int, TProfile2D * > m_x2DProfHistograms
std::map< unsigned int, TH2F * > m_x2DHistograms
std::map< unsigned int, TH1F * > m_x1DHistograms
std::map< unsigned int, TProfile * > m_x1DProfHistograms

◆ setContainer()

void FourMuonEvent::setContainer ( PerfMonServices::CONTAINERS container)
inline

Definition at line 108 of file FourMuonEvent.h.

const SG::AuxVectorData * container() const
Return the container holding this element.

◆ setDebugMode()

void FourMuonEvent::setDebugMode ( bool debug)
inline

Definition at line 109 of file FourMuonEvent.h.

109{ m_doDebug=debug; }
const bool debug

◆ SetLeadingMuonPtCut()

void FourMuonEvent::SetLeadingMuonPtCut ( double newvalue)

Definition at line 1040 of file FourMuonEvent.cxx.

1041{
1042 // first set the new pt cut value
1043 m_LeadingMuonPtCut = newvalue;
1044
1045 // the second muon pt cut can not be higher than the leading muon pt cut:
1047
1048 // this has to be translated to the MuonSelector
1049 // but there one has to use the minimum momentum --> second muon
1050 //this->SetMuonPtCut(m_SecondMuonPtCut);
1051 if(m_doDebug){
1052 std::cout <<" * FourMuonEvent * SetLeadingMuonPtCut * new Pt cuts: " << m_LeadingMuonPtCut << " & "
1054 << " MuonSelector: " << m_xMuonID.GetPtCut() << std::endl;
1055 }
1056 return;
1057}
void SetSecondMuonPtCut(double newvalue)

◆ SetMassWindowHigh()

void FourMuonEvent::SetMassWindowHigh ( double newvalue)
inline

Definition at line 112 of file FourMuonEvent.h.

112{ m_MassWindowHigh = newvalue; }

◆ SetMassWindowLow()

void FourMuonEvent::SetMassWindowLow ( double newvalue)
inline

Definition at line 111 of file FourMuonEvent.h.

111{ m_MassWindowLow = newvalue; }

◆ SetMuonPtCut()

void FourMuonEvent::SetMuonPtCut ( double newvalue)
inline

Definition at line 113 of file FourMuonEvent.h.

113{ m_xMuonID.SetPtCut(newvalue); }

◆ SetMuonSelectionTool()

void FourMuonEvent::SetMuonSelectionTool ( const ToolHandle< CP::IMuonSelectionTool > & mst)
inline

Definition at line 114 of file FourMuonEvent.h.

114{ m_xMuonID.SetCustomMuonSelectionTool (mst); };

◆ SetOpeningAngleCut()

void FourMuonEvent::SetOpeningAngleCut ( double newvalue)
inline

Definition at line 116 of file FourMuonEvent.h.

116{ m_OpeningAngleCut = newvalue; }
double m_OpeningAngleCut

◆ SetSecondMuonPtCut()

void FourMuonEvent::SetSecondMuonPtCut ( double newvalue)

Definition at line 1060 of file FourMuonEvent.cxx.

1061{
1062 m_SecondMuonPtCut = newvalue;
1063
1064 // use same for electrons
1065 m_xElecID.SetPtCut(m_SecondMuonPtCut);
1066
1067 // second muon pt shouldn't be higher than the leading muon pt
1069
1070 // this has to be translated to the MuonSelector
1072
1073 if(m_doDebug) {
1074 std::cout <<" * FourMuonEvent * SetSecondMuonPtCut * new Pt cuts: " << m_LeadingMuonPtCut
1075 << " & " << m_SecondMuonPtCut
1076 << " MuonSelector: " << m_xMuonID.GetPtCut() << std::endl;
1077 }
1078
1079 return;
1080}
void SetLeadingMuonPtCut(double newvalue)
void SetMuonPtCut(double newvalue)

◆ SetZ0GapCut()

void FourMuonEvent::SetZ0GapCut ( double newvalue)
inline

Definition at line 117 of file FourMuonEvent.h.

117{ m_Z0GapCut = newvalue; }

Member Data Documentation

◆ invalidAnswer

float EventAnalysis::invalidAnswer {-999.9f}
staticconstexprinherited

Definition at line 40 of file EventAnalysis.h.

40{-999.9f};

◆ m_acceptedElecCount

int FourMuonEvent::m_acceptedElecCount {}
private

Definition at line 201 of file FourMuonEvent.h.

201{};

◆ m_acceptedEventCount

int FourMuonEvent::m_acceptedEventCount {}
private

Definition at line 198 of file FourMuonEvent.h.

198{};

◆ m_acceptedMuonCount

int FourMuonEvent::m_acceptedMuonCount {}
private

Definition at line 200 of file FourMuonEvent.h.

200{};

◆ m_container

PerfMonServices::CONTAINERS FourMuonEvent::m_container
private

Definition at line 142 of file FourMuonEvent.h.

◆ m_deltaXYcut

double FourMuonEvent::m_deltaXYcut {}
private

Definition at line 153 of file FourMuonEvent.h.

153{};

◆ m_doDebug

bool FourMuonEvent::m_doDebug {}
private

Definition at line 156 of file FourMuonEvent.h.

156{};

◆ m_elec_vtx

int FourMuonEvent::m_elec_vtx[NUM_MUONS] {}
private

Definition at line 221 of file FourMuonEvent.h.

221{};

◆ m_eventCount

int FourMuonEvent::m_eventCount {}
private

Definition at line 197 of file FourMuonEvent.h.

197{};

◆ m_fInvariantMass

Arrayf FourMuonEvent::m_fInvariantMass {}
private

Definition at line 182 of file FourMuonEvent.h.

182{};

◆ m_fMuonDispersion

Arrayf FourMuonEvent::m_fMuonDispersion {}
private

Definition at line 183 of file FourMuonEvent.h.

183{};

◆ m_FourMuonInvMass

double FourMuonEvent::m_FourMuonInvMass {}
private

Definition at line 146 of file FourMuonEvent.h.

146{};

◆ m_fZEtaDir

Arrayf FourMuonEvent::m_fZEtaDir {}
private

Definition at line 180 of file FourMuonEvent.h.

180{};

◆ m_fZPhiDir

Arrayf FourMuonEvent::m_fZPhiDir {}
private

Definition at line 181 of file FourMuonEvent.h.

181{};

◆ m_fZPt

Arrayf FourMuonEvent::m_fZPt {}
private

Definition at line 179 of file FourMuonEvent.h.

179{};

◆ m_LeadingMuonPtCut

double FourMuonEvent::m_LeadingMuonPtCut {}
private

Definition at line 148 of file FourMuonEvent.h.

148{};

◆ m_MassWindowHigh

double FourMuonEvent::m_MassWindowHigh {}
private

Definition at line 151 of file FourMuonEvent.h.

151{};

◆ m_MassWindowLow

double FourMuonEvent::m_MassWindowLow {}
private

Definition at line 150 of file FourMuonEvent.h.

150{};

◆ m_msgStream

MsgStream* FourMuonEvent::m_msgStream {}
private

Definition at line 137 of file FourMuonEvent.h.

137{};

◆ m_muon1

int FourMuonEvent::m_muon1 = 0
private

Definition at line 205 of file FourMuonEvent.h.

◆ m_muon2

int FourMuonEvent::m_muon2 = 0
private

Definition at line 206 of file FourMuonEvent.h.

◆ m_muon_vtx

int FourMuonEvent::m_muon_vtx[NUM_MUONS] {}
private

Definition at line 220 of file FourMuonEvent.h.

220{};

◆ m_muonneg1

int FourMuonEvent::m_muonneg1 = 0
private

Definition at line 210 of file FourMuonEvent.h.

◆ m_muonneg1_vtx

int FourMuonEvent::m_muonneg1_vtx = 0
private

Definition at line 215 of file FourMuonEvent.h.

◆ m_muonneg2

int FourMuonEvent::m_muonneg2 = 0
private

Definition at line 211 of file FourMuonEvent.h.

◆ m_muonneg2_vtx

int FourMuonEvent::m_muonneg2_vtx = 0
private

Definition at line 216 of file FourMuonEvent.h.

◆ m_muonpos1

int FourMuonEvent::m_muonpos1 = 0
private

Definition at line 208 of file FourMuonEvent.h.

◆ m_muonpos1_vtx

int FourMuonEvent::m_muonpos1_vtx = 0
private

Definition at line 217 of file FourMuonEvent.h.

◆ m_muonpos2

int FourMuonEvent::m_muonpos2 = 0
private

Definition at line 209 of file FourMuonEvent.h.

◆ m_muonpos2_vtx

int FourMuonEvent::m_muonpos2_vtx = 0
private

Definition at line 218 of file FourMuonEvent.h.

◆ m_numberOfFullPassElectrons

unsigned int FourMuonEvent::m_numberOfFullPassElectrons {}
private

Definition at line 163 of file FourMuonEvent.h.

163{};

◆ m_numberOfFullPassMuons

unsigned int FourMuonEvent::m_numberOfFullPassMuons {}
private

Definition at line 162 of file FourMuonEvent.h.

162{};

◆ m_nVertex

int FourMuonEvent::m_nVertex = 0
private

Definition at line 214 of file FourMuonEvent.h.

◆ m_OpeningAngleCut

double FourMuonEvent::m_OpeningAngleCut {}
private

Definition at line 152 of file FourMuonEvent.h.

152{};

◆ m_passedFourElectronSelection

bool FourMuonEvent::m_passedFourElectronSelection = false
private

Definition at line 166 of file FourMuonEvent.h.

◆ m_passedFourLeptonSelection

bool FourMuonEvent::m_passedFourLeptonSelection = false
private

Definition at line 167 of file FourMuonEvent.h.

◆ m_passedFourMuonSelection

bool FourMuonEvent::m_passedFourMuonSelection = false
private

Definition at line 165 of file FourMuonEvent.h.

◆ m_passedSelectionCuts

bool FourMuonEvent::m_passedSelectionCuts = false
private

Definition at line 164 of file FourMuonEvent.h.

◆ m_pxELTrack

const xAOD::TrackParticle* FourMuonEvent::m_pxELTrack[NUM_MUONS] {}
private

Definition at line 174 of file FourMuonEvent.h.

174{}; // pointer to Track particle of the electrons

◆ m_pxIDTrack

const xAOD::TrackParticle* FourMuonEvent::m_pxIDTrack[NUM_MUONS] {}
private

Definition at line 172 of file FourMuonEvent.h.

172{}; // Pointer to ID track

◆ m_pxMETrack

const xAOD::TrackParticle* FourMuonEvent::m_pxMETrack[NUM_MUONS] {}
private

Definition at line 170 of file FourMuonEvent.h.

170{}; // Pointer to muon spectro ( corr. )

◆ m_pxMSTrack

const xAOD::TrackParticle* FourMuonEvent::m_pxMSTrack[NUM_MUONS] {}
private

Definition at line 171 of file FourMuonEvent.h.

171{}; // Pointer to muon spectro

◆ m_pxMUTrack

const xAOD::TrackParticle* FourMuonEvent::m_pxMUTrack[NUM_MUONS] {}
private

Definition at line 175 of file FourMuonEvent.h.

175{}; // pointer to Track particle of the muons

◆ m_pxRecMuon

const xAOD::Muon* FourMuonEvent::m_pxRecMuon[NUM_MUONS] {}
private

Definition at line 169 of file FourMuonEvent.h.

169{};

◆ m_SecondMuonPtCut

double FourMuonEvent::m_SecondMuonPtCut {}
private

Definition at line 149 of file FourMuonEvent.h.

149{};

◆ m_SelectMuonByIP

bool FourMuonEvent::m_SelectMuonByIP {}
private

Definition at line 194 of file FourMuonEvent.h.

194{};

◆ m_SelectMuonByIso

bool FourMuonEvent::m_SelectMuonByIso {}
private

Definition at line 193 of file FourMuonEvent.h.

193{};

◆ m_uMuonTags

unsigned int FourMuonEvent::m_uMuonTags {}
private

Definition at line 145 of file FourMuonEvent.h.

145{};

◆ m_uPassedEvents

unsigned int EventAnalysis::m_uPassedEvents
protectedinherited

Definition at line 75 of file EventAnalysis.h.

◆ m_workAsFourElectrons

bool FourMuonEvent::m_workAsFourElectrons {}
private

Definition at line 158 of file FourMuonEvent.h.

158{};

◆ m_workAsFourLeptons

bool FourMuonEvent::m_workAsFourLeptons {}
private

Definition at line 159 of file FourMuonEvent.h.

159{};

◆ m_workAsFourMuons

bool FourMuonEvent::m_workAsFourMuons {}
private

Definition at line 157 of file FourMuonEvent.h.

157{};

◆ m_x1DHistograms

std::map<unsigned int, TH1F*> EventAnalysis::m_x1DHistograms
protectedinherited

Definition at line 76 of file EventAnalysis.h.

◆ m_x1DProfHistograms

std::map<unsigned int, TProfile*> EventAnalysis::m_x1DProfHistograms
protectedinherited

Definition at line 78 of file EventAnalysis.h.

◆ m_x2DHistograms

std::map<unsigned int, TH2F*> EventAnalysis::m_x2DHistograms
protectedinherited

Definition at line 77 of file EventAnalysis.h.

◆ m_x2DProfHistograms

std::map<unsigned int, TProfile2D*> EventAnalysis::m_x2DProfHistograms
protectedinherited

Definition at line 79 of file EventAnalysis.h.

◆ m_xElecID

ElectronSelector FourMuonEvent::m_xElecID
private

Definition at line 141 of file FourMuonEvent.h.

◆ m_xMuonID

MuonSelector FourMuonEvent::m_xMuonID
private

Definition at line 140 of file FourMuonEvent.h.

◆ m_xSampleName

std::string EventAnalysis::m_xSampleName
protectedinherited

Definition at line 81 of file EventAnalysis.h.

◆ m_Z0GapCut

double FourMuonEvent::m_Z0GapCut {}
private

Definition at line 154 of file FourMuonEvent.h.

154{};

The documentation for this class was generated from the following files: