ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronMuonTopoInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5/**************************************************************************
6 **
7 ** File: Trigger/TrigEvent/TrigTopoEvent/ElectronMuonTopoInfo.cxx
8 **
9 ** Description: -Class for description of combined electron-muon object for
10 ** algorithms in TrigEgammaMuonCombHypo package
11 **
12 ** Author: Pavel Jez <pavel.jez@cern.ch>
13 **
14 ** Created: Apr 9, 2011
15 **
16 **
17 **************************************************************************/
18
20#include <sstream>
21#include <iostream>
22
23// constructors
33
34ElectronMuonTopoInfo::ElectronMuonTopoInfo(int roiWord, float deltaPhi, float deltaR, float invMass, bool el_valid,
35 bool oppositeCharge, unsigned short vertexState): m_roiWord(roiWord),
38 m_InvMass(invMass),
39 m_electronValid(el_valid),
40 m_oppositeCharge(oppositeCharge),
41 m_vertexState(vertexState)
42
43{}
44
45// destructor
47
48
49// set methods
56 void ElectronMuonTopoInfo::SetVertexState(unsigned short vertexState){m_vertexState = vertexState;}
57
58// text output
59 std::string str( const ElectronMuonTopoInfo& d )
60 {
61 std::stringstream ss;
62 ss << "ElectronMuonTopoInfo at address: " << &d
63 << " RoIWord: " << d.RoiWord()
64 << " Delta Phi: " << d.DeltaPhi()
65 << " Delta R: " << d.DeltaR()
66 << " Invariant mass: " << d.InvMass()
67 << " electron valid: " << d.ElecValid()
68 << " opposite charge: " << d.OppositeCharge()
69 << " vertex state: " << d.VertexState();
70 return ss.str();
71 }
72
73 MsgStream& operator<< ( MsgStream& m, const ElectronMuonTopoInfo& d )
74 {
75 return( m << str ( d ) );
76 }
77
79 {
80 return(d1.DeltaPhi()==d2.DeltaPhi() && d1.DeltaR()==d2.DeltaR() && d1.InvMass()==d2.InvMass()
81 && d1.OppositeCharge()==d2.OppositeCharge() && d1.VertexState() == d2.VertexState() );
82 }
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar deltaR(const MatrixBase< Derived > &vec) const
bool operator==(const ElectronMuonTopoInfo &d1, const ElectronMuonTopoInfo &d2)
MsgStream & operator<<(MsgStream &m, const ElectronMuonTopoInfo &d)
static Double_t ss
ElectronMuonTopoInfo is a class for storing information about combuned electron-muon object.
float m_DeltaR
Delta R between electron and muon.
void SetOppositeCharge(bool OppositeCharge)
unsigned short m_vertexState
3 bit description of vertex: 0=common, 1=not common, 3= not applicable
float m_DeltaPhi
Delta Phi between electron and muon.
void SetElecValid(bool ElecValid)
void SetDeltaR(float DeltaR)
int m_roiWord
Identifier of the RoI.
void SetVertexState(unsigned short vextexState)
bool m_electronValid
boolean flag showing the validity of electron
void SetInvMass(float InvMass)
void SetRoiWord(int RoiWord)
set methods
int RoiWord() const
accessor methods
float m_InvMass
Invariant mass of electron and muon.
void SetDeltaPhi(float DeltaPhi)
bool m_oppositeCharge
True if electron and muon have opposite charged.