ATLAS Offline Software
Loading...
Searching...
No Matches
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
13Muon_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
35
44
45 return ( ( m_roiWord >> 11 ) & 0x7 );
46}
47
56int 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
175bool Muon_ROI::isVetoed() const {
176
177 return ( m_roiWord & 0x10000000 );
178}
float m_eta
eta coordinate of RoI
Definition Muon_ROI.h:108
bool isMoreCandInRoI() const
Returns if there were other muons detected in the same RoI.
Definition Muon_ROI.cxx:103
Hemisphere getHemisphere() const
Returns the hemisphere that detected the muon candidate.
Definition Muon_ROI.cxx:144
Charge
Charge sign.
Definition Muon_ROI.h:58
@ Pos
Candidate is a mu+ from a TGC sector.
Definition Muon_ROI.h:60
@ Undef
This is an RPC candidate.
Definition Muon_ROI.h:61
@ Neg
Candidate is a mu- from a TGC sector.
Definition Muon_ROI.h:59
virtual double phi() const
Return the phi coordinate of the center of the RoI.
Definition Muon_ROI.h:101
int getSectorAddress() const
Get the full sector address.
Definition Muon_ROI.cxx:80
virtual double eta() const
Return the eta coordinate of the center of the RoI.
Definition Muon_ROI.h:99
RoISource getSource() const
Returns the system that detected the muon candidate.
Definition Muon_ROI.cxx:126
Muon_ROI()
Default constructor (for persistency purposes)
Definition Muon_ROI.cxx:23
float m_thrValue
Value of the highest threshold this RoI passed.
Definition Muon_ROI.h:112
std::string m_thrName
Name of the highest threshold this RoI passed.
Definition Muon_ROI.h:111
Hemisphere
RoI hemisphere enumeration.
Definition Muon_ROI.h:53
@ Negative
The candidate came from the -z side (side C)
Definition Muon_ROI.h:55
@ Positive
The candidate came from the +z side (side A)
Definition Muon_ROI.h:54
virtual ~Muon_ROI()
Destructor.
Definition Muon_ROI.cxx:32
bool isMoreCandInSector() const
Returns if there were other muons detected in the same sector.
Definition Muon_ROI.cxx:114
bool isVetoed() const
Returns the veto flag for the candidate.
Definition Muon_ROI.cxx:175
bool isFirstCandidate() const
Returns if the candidate had the highest pT in the sector.
Definition Muon_ROI.cxx:92
float m_phi
phi coordinate of RoI
Definition Muon_ROI.h:109
Charge getCharge() const
Returns the charge sign of the muon candidate.
Definition Muon_ROI.cxx:160
uint32_t m_roiWord
32bit encoded ROI word
Definition Muon_ROI.h:106
int getRoI() const
Get the "RoI number" (position inside the sector)
Definition Muon_ROI.cxx:56
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
Definition Muon_ROI.cxx:43
RoISource
RoI source enumeration.
Definition Muon_ROI.h:47
@ Barrel
The muon candidate was detected in the barrel region.
Definition Muon_ROI.h:48
@ Endcap
The muon candidate was detected in the endcap region.
Definition Muon_ROI.h:49
@ Forward
The muon candidate was detected in the forward region.
Definition Muon_ROI.h:50