ATLAS Offline Software
Muon_ROI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: Muon_ROI.cxx,v 1.2 2008-05-08 15:00:12 krasznaa Exp $
6 
7 // Local include(s):
9 
13 Muon_ROI::Muon_ROI( uint32_t roiWord, double eta, double phi, const std::string &thrName,
14  double thrValue )
15  : m_roiWord( roiWord ), m_eta( eta ), m_phi( phi ), m_thrName( thrName ),
16  m_thrValue( thrValue ) {
17 
18 }
19 
24  : m_roiWord( 0 ), m_eta( 0. ), m_phi( 0. ), m_thrName( "" ), m_thrValue( 0. ) {
25 
26 }
27 
33 
34 }
35 
44 
45  return ( ( m_roiWord >> 11 ) & 0x7 );
46 }
47 
56 int Muon_ROI::getRoI() const {
57 
58  if( this->getSource() == Forward ) {
59  return ( ( m_roiWord >> 2 ) & 0x3f );
60  } else if( this->getSource() == Endcap ) {
61  return ( ( m_roiWord >> 2 ) & 0xff );
62  } else if( this->getSource() == Barrel ) {
63  return ( ( m_roiWord >> 2 ) & 0x1f );
64  }
65 
66  return 0;
67 }
68 
81 
82  return ( ( m_roiWord >> 14 ) & 0xff );
83 }
84 
93 
94  return ( ( m_roiWord >> 22 ) & 0x1 );
95 }
96 
104 
105  return ( ( m_roiWord >> 1 ) & 0x1 );
106 }
107 
115 
116  return ( m_roiWord & 0x1 );
117 }
118 
127 
128  if( this->getSectorAddress() & 0x80 ) {
129  return Endcap;
130  } else if( this->getSectorAddress() & 0x40 ) {
131  return Forward;
132  } else {
133  return Barrel;
134  }
135 }
136 
145 
146  if( this->getSectorAddress() & 0x1 ) {
147  return Positive;
148  } else {
149  return Negative;
150  }
151 }
152 
161 
162  if( getSource() == Barrel ) return Undef;
163  if( m_roiWord & 0x8000000 ) {
164  return Pos;
165  } else {
166  return Neg;
167  }
168 }
169 
175 bool Muon_ROI::isVetoed() const {
176 
177  return ( m_roiWord & 0x10000000 );
178 }
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Muon_ROI.h
Muon_ROI::Muon_ROI
Muon_ROI()
Default constructor (for persistency purposes)
Definition: Muon_ROI.cxx:23
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Muon_ROI::Undef
@ Undef
This is an RPC candidate.
Definition: Muon_ROI.h:61
Muon_ROI::isFirstCandidate
bool isFirstCandidate() const
Returns if the candidate had the highest pT in the sector.
Definition: Muon_ROI.cxx:92
Muon_ROI::Negative
@ Negative
The candidate came from the -z side (side C)
Definition: Muon_ROI.h:55
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Muon_ROI::Pos
@ Pos
Candidate is a mu+ from a TGC sector.
Definition: Muon_ROI.h:60
Muon_ROI::getSource
RoISource getSource() const
Returns the system that detected the muon candidate.
Definition: Muon_ROI.cxx:126
Muon_ROI::getHemisphere
Hemisphere getHemisphere() const
Returns the hemisphere that detected the muon candidate.
Definition: Muon_ROI.cxx:144
Muon_ROI::Forward
@ Forward
The muon candidate was detected in the forward region.
Definition: Muon_ROI.h:50
Muon_ROI::Barrel
@ Barrel
The muon candidate was detected in the barrel region.
Definition: Muon_ROI.h:48
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
Muon_ROI::getThrNumber
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
Definition: Muon_ROI.cxx:43
Muon_ROI::getCharge
Charge getCharge() const
Returns the charge sign of the muon candidate.
Definition: Muon_ROI.cxx:160
Muon_ROI::Endcap
@ Endcap
The muon candidate was detected in the endcap region.
Definition: Muon_ROI.h:49
Muon_ROI::~Muon_ROI
virtual ~Muon_ROI()
Destructor.
Definition: Muon_ROI.cxx:32
Muon_ROI::isMoreCandInSector
bool isMoreCandInSector() const
Returns if there were other muons detected in the same sector.
Definition: Muon_ROI.cxx:114
Muon_ROI::Hemisphere
Hemisphere
RoI hemisphere enumeration.
Definition: Muon_ROI.h:53
Muon_ROI::Positive
@ Positive
The candidate came from the +z side (side A)
Definition: Muon_ROI.h:54
Muon_ROI::Charge
Charge
Charge sign.
Definition: Muon_ROI.h:58
Muon_ROI::RoISource
RoISource
RoI source enumeration.
Definition: Muon_ROI.h:47
Muon_ROI::getRoI
int getRoI() const
Get the "RoI number" (position inside the sector)
Definition: Muon_ROI.cxx:56
Muon_ROI::isVetoed
bool isVetoed() const
Returns the veto flag for the candidate.
Definition: Muon_ROI.cxx:175
Muon_ROI::m_roiWord
uint32_t m_roiWord
32bit encoded ROI word
Definition: Muon_ROI.h:106
Muon_ROI::isMoreCandInRoI
bool isMoreCandInRoI() const
Returns if there were other muons detected in the same RoI.
Definition: Muon_ROI.cxx:103
Muon_ROI::Neg
@ Neg
Candidate is a mu- from a TGC sector.
Definition: Muon_ROI.h:59
xAOD::thrValue
thrValue
Definition: MuonRoI_v1.cxx:53
Muon_ROI::getSectorAddress
int getSectorAddress() const
Get the full sector address.
Definition: Muon_ROI.cxx:80