CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
L1MuDTTrackSegPhi Class Reference

#include <L1MuDTTrackSegPhi.h>

Public Types

enum  TSQuality {
  Li, Lo, Hi, Ho,
  LL, HL, HH, Null
}
 quality code of DTBX phi track segments More...
 

Public Member Functions

int bx () const
 return bunch crossing More...
 
bool empty () const
 is it an empty phi track segment? More...
 
bool etaFlag () const
 return eta flag More...
 
 L1MuDTTrackSegPhi ()
 default constructor More...
 
 L1MuDTTrackSegPhi (const L1MuDTTrackSegLoc &, int phi=0, int phib=0, TSQuality quality=Null, bool tag=false, int bx=17, bool etaFlag=false)
 constructor More...
 
 L1MuDTTrackSegPhi (const L1MuDTTrackSegPhi &)
 copy constructor More...
 
 L1MuDTTrackSegPhi (int wheel_id, int sector_id, int station_id, int phi=0, int phib=0, TSQuality quality=Null, bool tag=false, int bx=17, bool etaFlag=false)
 constructor More...
 
bool operator!= (const L1MuDTTrackSegPhi &) const
 unequal operator More...
 
L1MuDTTrackSegPhioperator= (const L1MuDTTrackSegPhi &)
 assignment operator More...
 
bool operator== (const L1MuDTTrackSegPhi &) const
 equal operator More...
 
int phi () const
 return phi More...
 
int phib () const
 return phib More...
 
double phibValue () const
 return phib-value in global coordinates [0,2pi] More...
 
double phiValue () const
 return phi-value in global coordinates [0,2pi] More...
 
int quality () const
 return quality code More...
 
void reset ()
 reset phi track segment More...
 
int sector () const
 return sector More...
 
void setEtaFlag (bool flag)
 set eta flag More...
 
int station () const
 return station More...
 
int tag () const
 return tag (second TS tag) More...
 
int wheel () const
 return wheel More...
 
const L1MuDTTrackSegLocwhere () const
 return location of phi track segment More...
 
virtual ~L1MuDTTrackSegPhi ()
 destructor More...
 

Private Attributes

int m_bx
 
bool m_etaFlag
 
L1MuDTTrackSegLoc m_location
 
int m_phi
 
int m_phib
 
TSQuality m_quality
 
bool m_tag
 

Friends

std::ostream & operator<< (std::ostream &, const L1MuDTTrackSegPhi &)
 overload output stream operator for phi track segments More...
 
std::ostream & operator<< (std::ostream &, const TSQuality &)
 overload output stream operator for phi track segment quality More...
 

Detailed Description

PHI Track Segment

N. Neumeister CERN EP

Definition at line 36 of file L1MuDTTrackSegPhi.h.

Member Enumeration Documentation

◆ TSQuality

quality code of DTBX phi track segments

Enumerator
Li 
Lo 
Hi 
Ho 
LL 
HL 
HH 
Null 

Definition at line 39 of file L1MuDTTrackSegPhi.h.

39 { Li, Lo, Hi, Ho, LL, HL, HH, Null };

Constructor & Destructor Documentation

◆ L1MuDTTrackSegPhi() [1/4]

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( )

default constructor

Definition at line 44 of file L1MuDTTrackSegPhi.cc.

45  : m_location(), m_phi(0), m_phib(0), m_quality(Null), m_tag(false), m_bx(0), m_etaFlag(false) {}

◆ L1MuDTTrackSegPhi() [2/4]

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( int  wheel_id,
int  sector_id,
int  station_id,
int  phi = 0,
int  phib = 0,
TSQuality  quality = Null,
bool  tag = false,
int  bx = 17,
bool  etaFlag = false 
)

constructor

Definition at line 47 of file L1MuDTTrackSegPhi.cc.

49  : m_location(wheel_id, sector_id, station_id),
50  m_phi(phi),
51  m_phib(phib),
53  m_tag(false),
54  m_bx(bx),
56  if (phi < -2048 || phi > 2047) {
57  // cerr << "TrackSegPhi : phi out of range: " << phi << endl;
58  }
59  if (phib < -512 || phib > 511) {
60  // cerr << "TrackSegPhi : phib out of range: " << phib << endl;
61  }
62  if (quality > 7) {
63  // cerr << "TrackSegPhi : quality out of range: " << quality << endl;
64  }
65 }

References quality().

◆ L1MuDTTrackSegPhi() [3/4]

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( const L1MuDTTrackSegLoc id,
int  phi = 0,
int  phib = 0,
TSQuality  quality = Null,
bool  tag = false,
int  bx = 17,
bool  etaFlag = false 
)

constructor

Definition at line 67 of file L1MuDTTrackSegPhi.cc.

70  if (phi < -2048 || phi > 2047) {
71  // cerr << "TrackSegPhi : phi out of range: " << phi << endl;
72  }
73  if (phib < -512 || phib > 511) {
74  // cerr << "TrackSegPhi : phib out of range: " << phib << endl;
75  }
76  if (quality > 7) {
77  // cerr << "TrackSegPhi : quality out of range: " << quality << endl;
78  }
79 }

References quality().

◆ L1MuDTTrackSegPhi() [4/4]

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( const L1MuDTTrackSegPhi id)

copy constructor

Definition at line 81 of file L1MuDTTrackSegPhi.cc.

82  : m_location(id.m_location),
83  m_phi(id.m_phi),
84  m_phib(id.m_phib),
85  m_quality(id.m_quality),
86  m_tag(id.m_tag),
87  m_bx(id.m_bx),
88  m_etaFlag(id.m_etaFlag) {}

◆ ~L1MuDTTrackSegPhi()

L1MuDTTrackSegPhi::~L1MuDTTrackSegPhi ( )
virtual

destructor

Definition at line 93 of file L1MuDTTrackSegPhi.cc.

93 {}

Member Function Documentation

◆ bx()

int L1MuDTTrackSegPhi::bx ( ) const
inline

return bunch crossing

Definition at line 104 of file L1MuDTTrackSegPhi.h.

104 { return m_bx; }

References m_bx.

◆ empty()

bool L1MuDTTrackSegPhi::empty ( void  ) const
inline

is it an empty phi track segment?

Definition at line 110 of file L1MuDTTrackSegPhi.h.

110 { return m_quality == Null; }

References m_quality, and Null.

Referenced by L1MuDTSEU::run(), and L1MuDTExtrapolationUnit::run().

◆ etaFlag()

bool L1MuDTTrackSegPhi::etaFlag ( ) const
inline

return eta flag

Definition at line 107 of file L1MuDTTrackSegPhi.h.

107 { return m_etaFlag; }

References m_etaFlag.

◆ operator!=()

bool L1MuDTTrackSegPhi::operator!= ( const L1MuDTTrackSegPhi id) const

unequal operator

Definition at line 161 of file L1MuDTTrackSegPhi.cc.

161  {
162  if (m_location != id.m_location)
163  return true;
164  if (m_phi != id.m_phi)
165  return true;
166  if (m_phib != id.m_phib)
167  return true;
168  if (m_quality != id.m_quality)
169  return true;
170  if (m_bx != id.m_bx)
171  return true;
172  return false;
173 }

References m_bx, m_location, m_phi, m_phib, and m_quality.

◆ operator=()

L1MuDTTrackSegPhi & L1MuDTTrackSegPhi::operator= ( const L1MuDTTrackSegPhi id)

assignment operator

Definition at line 128 of file L1MuDTTrackSegPhi.cc.

128  {
129  if (this != &id) {
130  m_location = id.m_location;
131  m_phi = id.m_phi;
132  m_phib = id.m_phib;
133  m_quality = id.m_quality;
134  m_tag = id.m_tag;
135  m_bx = id.m_bx;
136  m_etaFlag = id.m_etaFlag;
137  }
138  return *this;
139 }

References m_bx, m_etaFlag, m_location, m_phi, m_phib, m_quality, and m_tag.

◆ operator==()

bool L1MuDTTrackSegPhi::operator== ( const L1MuDTTrackSegPhi id) const

equal operator

Definition at line 144 of file L1MuDTTrackSegPhi.cc.

144  {
145  if (m_location != id.m_location)
146  return false;
147  if (m_phi != id.m_phi)
148  return false;
149  if (m_phib != id.m_phib)
150  return false;
151  if (m_quality != id.m_quality)
152  return false;
153  if (m_bx != id.m_bx)
154  return false;
155  return true;
156 }

References m_bx, m_location, m_phi, m_phib, and m_quality.

◆ phi()

int L1MuDTTrackSegPhi::phi ( void  ) const
inline

◆ phib()

int L1MuDTTrackSegPhi::phib ( ) const
inline

return phib

Definition at line 95 of file L1MuDTTrackSegPhi.h.

95 { return m_phib; }

References m_phib.

Referenced by L1MuDTAssignmentUnit::getPtMethod(), L1MuDTAssignmentUnit::PhiAU(), and L1MuDTEUX::run().

◆ phibValue()

double L1MuDTTrackSegPhi::phibValue ( ) const

return phib-value in global coordinates [0,2pi]

Definition at line 123 of file L1MuDTTrackSegPhi.cc.

123 { return static_cast<double>(m_phib) / 512; }

References m_phib.

◆ phiValue()

double L1MuDTTrackSegPhi::phiValue ( ) const

return phi-value in global coordinates [0,2pi]

Definition at line 114 of file L1MuDTTrackSegPhi.cc.

114  {
115  double tmp = static_cast<double>(m_location.sector()) * M_PI / 6;
116  tmp += static_cast<double>(m_phi) / 4096;
117  return (tmp > 0) ? tmp : (2 * M_PI + tmp);
118 }

References m_location, m_phi, M_PI, L1MuDTTrackSegLoc::sector(), and createJobs::tmp.

◆ quality()

int L1MuDTTrackSegPhi::quality ( void  ) const
inline

return quality code

Definition at line 98 of file L1MuDTTrackSegPhi.h.

98 { return m_quality; }

References m_quality.

Referenced by L1MuDTTrackSegPhi(), and L1MuDTEUX::run().

◆ reset()

void L1MuDTTrackSegPhi::reset ( void  )

reset phi track segment

Definition at line 102 of file L1MuDTTrackSegPhi.cc.

102  {
103  m_phi = 0;
104  m_phib = 0;
105  m_quality = Null;
106  m_tag = false;
107  m_bx = 0;
108  m_etaFlag = false;
109 }

References m_bx, m_etaFlag, m_phi, m_phib, m_quality, m_tag, and Null.

Referenced by L1MuDTSEU::reset().

◆ sector()

int L1MuDTTrackSegPhi::sector ( void  ) const
inline

◆ setEtaFlag()

void L1MuDTTrackSegPhi::setEtaFlag ( bool  flag)
inline

set eta flag

Definition at line 113 of file L1MuDTTrackSegPhi.h.

113 { m_etaFlag = flag; }

References RemoveAddSevLevel::flag, and m_etaFlag.

◆ station()

int L1MuDTTrackSegPhi::station ( ) const
inline

return station

Definition at line 86 of file L1MuDTTrackSegPhi.h.

86 { return m_location.station(); }

References m_location, and L1MuDTTrackSegLoc::station().

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

◆ tag()

int L1MuDTTrackSegPhi::tag ( ) const
inline

return tag (second TS tag)

Definition at line 101 of file L1MuDTTrackSegPhi.h.

101 { return m_tag; }

References m_tag.

◆ wheel()

int L1MuDTTrackSegPhi::wheel ( ) const
inline

return wheel

Definition at line 80 of file L1MuDTTrackSegPhi.h.

80 { return m_location.wheel(); }

References m_location, and L1MuDTTrackSegLoc::wheel().

Referenced by geometryXMLparser.DTAlignable::index(), and L1MuDTEUX::run().

◆ where()

const L1MuDTTrackSegLoc& L1MuDTTrackSegPhi::where ( ) const
inline

return location of phi track segment

Definition at line 89 of file L1MuDTTrackSegPhi.h.

89 { return m_location; }

References m_location.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  ,
const L1MuDTTrackSegPhi  
)
friend

overload output stream operator for phi track segments

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  ,
const TSQuality  
)
friend

overload output stream operator for phi track segment quality

Member Data Documentation

◆ m_bx

int L1MuDTTrackSegPhi::m_bx
private

Definition at line 136 of file L1MuDTTrackSegPhi.h.

Referenced by bx(), operator!=(), operator=(), operator==(), and reset().

◆ m_etaFlag

bool L1MuDTTrackSegPhi::m_etaFlag
private

Definition at line 137 of file L1MuDTTrackSegPhi.h.

Referenced by etaFlag(), operator=(), reset(), and setEtaFlag().

◆ m_location

L1MuDTTrackSegLoc L1MuDTTrackSegPhi::m_location
private

◆ m_phi

int L1MuDTTrackSegPhi::m_phi
private

Definition at line 132 of file L1MuDTTrackSegPhi.h.

Referenced by operator!=(), operator=(), operator==(), phi(), phiValue(), and reset().

◆ m_phib

int L1MuDTTrackSegPhi::m_phib
private

Definition at line 133 of file L1MuDTTrackSegPhi.h.

Referenced by operator!=(), operator=(), operator==(), phib(), phibValue(), and reset().

◆ m_quality

TSQuality L1MuDTTrackSegPhi::m_quality
private

Definition at line 134 of file L1MuDTTrackSegPhi.h.

Referenced by empty(), operator!=(), operator=(), operator==(), quality(), and reset().

◆ m_tag

bool L1MuDTTrackSegPhi::m_tag
private

Definition at line 135 of file L1MuDTTrackSegPhi.h.

Referenced by operator=(), reset(), and tag().

L1MuDTTrackSegPhi::m_location
L1MuDTTrackSegLoc m_location
Definition: L1MuDTTrackSegPhi.h:131
L1MuDTTrackSegPhi::m_tag
bool m_tag
Definition: L1MuDTTrackSegPhi.h:135
L1MuDTTrackSegPhi::Null
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::m_phib
int m_phib
Definition: L1MuDTTrackSegPhi.h:133
L1MuDTTrackSegPhi::phib
int phib() const
return phib
Definition: L1MuDTTrackSegPhi.h:95
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
L1MuDTTrackSegPhi::Lo
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegLoc::wheel
int wheel() const
return wheel
Definition: L1MuDTTrackSegLoc.h:56
L1MuDTTrackSegPhi::m_etaFlag
bool m_etaFlag
Definition: L1MuDTTrackSegPhi.h:137
L1MuDTTrackSegPhi::bx
int bx() const
return bunch crossing
Definition: L1MuDTTrackSegPhi.h:104
L1MuDTTrackSegLoc::station
int station() const
return station
Definition: L1MuDTTrackSegLoc.h:62
L1MuDTTrackSegPhi::m_quality
TSQuality m_quality
Definition: L1MuDTTrackSegPhi.h:134
L1MuDTTrackSegPhi::LL
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::phi
int phi() const
return phi
Definition: L1MuDTTrackSegPhi.h:92
L1MuDTTrackSegPhi::HL
Definition: L1MuDTTrackSegPhi.h:39
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
L1MuDTTrackSegPhi::m_phi
int m_phi
Definition: L1MuDTTrackSegPhi.h:132
L1MuDTTrackSegPhi::Ho
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::tag
int tag() const
return tag (second TS tag)
Definition: L1MuDTTrackSegPhi.h:101
L1MuDTTrackSegLoc::sector
int sector() const
return sector (30 deg)
Definition: L1MuDTTrackSegLoc.h:59
L1MuDTTrackSegPhi::Li
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::Hi
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::HH
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::quality
int quality() const
return quality code
Definition: L1MuDTTrackSegPhi.h:98
L1MuDTTrackSegPhi::etaFlag
bool etaFlag() const
return eta flag
Definition: L1MuDTTrackSegPhi.h:107
L1MuDTTrackSegPhi::m_bx
int m_bx
Definition: L1MuDTTrackSegPhi.h:136
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117