CMS 3D CMS Logo

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

#include <L1MuBMTrackSegPhi.h>

Public Types

enum  TSQuality {
  Li, Lo, Hi, Ho,
  LL, HL, HH, Null
}
 quality code of BBMX 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...
 
 L1MuBMTrackSegPhi ()
 default constructor More...
 
 L1MuBMTrackSegPhi (const L1MuBMTrackSegLoc &, int phi=0, int phib=0, TSQuality quality=Null, bool tag=false, int bx=17, bool etaFlag=false)
 constructor More...
 
 L1MuBMTrackSegPhi (const L1MuBMTrackSegPhi &)
 copy constructor More...
 
 L1MuBMTrackSegPhi (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 L1MuBMTrackSegPhi &) const
 unequal operator More...
 
L1MuBMTrackSegPhioperator= (const L1MuBMTrackSegPhi &)
 assignment operator More...
 
bool operator== (const L1MuBMTrackSegPhi &) 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 L1MuBMTrackSegLocwhere () const
 return location of phi track segment More...
 
virtual ~L1MuBMTrackSegPhi ()
 destructor More...
 

Private Attributes

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

Friends

std::ostream & operator<< (std::ostream &, const L1MuBMTrackSegPhi &)
 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 41 of file L1MuBMTrackSegPhi.h.

Member Enumeration Documentation

◆ TSQuality

quality code of BBMX phi track segments

Enumerator
Li 
Lo 
Hi 
Ho 
LL 
HL 
HH 
Null 

Definition at line 44 of file L1MuBMTrackSegPhi.h.

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

Constructor & Destructor Documentation

◆ L1MuBMTrackSegPhi() [1/4]

L1MuBMTrackSegPhi::L1MuBMTrackSegPhi ( )

default constructor

Definition at line 44 of file L1MuBMTrackSegPhi.cc.

44 : m_location(), m_phi(0), m_phib(0), m_quality(Null), m_bx(0) {}

◆ L1MuBMTrackSegPhi() [2/4]

L1MuBMTrackSegPhi::L1MuBMTrackSegPhi ( 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 46 of file L1MuBMTrackSegPhi.cc.

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

◆ L1MuBMTrackSegPhi() [3/4]

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

constructor

Definition at line 66 of file L1MuBMTrackSegPhi.cc.

69  /*
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 */
80 }

◆ L1MuBMTrackSegPhi() [4/4]

L1MuBMTrackSegPhi::L1MuBMTrackSegPhi ( const L1MuBMTrackSegPhi id)

copy constructor

Definition at line 82 of file L1MuBMTrackSegPhi.cc.

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

◆ ~L1MuBMTrackSegPhi()

L1MuBMTrackSegPhi::~L1MuBMTrackSegPhi ( )
virtual

destructor

Definition at line 94 of file L1MuBMTrackSegPhi.cc.

94 {}

Member Function Documentation

◆ bx()

int L1MuBMTrackSegPhi::bx ( ) const
inline

return bunch crossing

Definition at line 109 of file L1MuBMTrackSegPhi.h.

109 { return m_bx; }

References m_bx.

◆ empty()

bool L1MuBMTrackSegPhi::empty ( ) const
inline

is it an empty phi track segment?

Definition at line 115 of file L1MuBMTrackSegPhi.h.

115 { return m_quality == Null; }

References m_quality, and Null.

Referenced by L1MuBMSEU::run(), and L1MuBMExtrapolationUnit::run().

◆ etaFlag()

bool L1MuBMTrackSegPhi::etaFlag ( ) const
inline

return eta flag

Definition at line 112 of file L1MuBMTrackSegPhi.h.

112 { return m_etaFlag; }

References m_etaFlag.

◆ operator!=()

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

unequal operator

Definition at line 162 of file L1MuBMTrackSegPhi.cc.

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

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

◆ operator=()

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

assignment operator

Definition at line 129 of file L1MuBMTrackSegPhi.cc.

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

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

◆ operator==()

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

equal operator

Definition at line 145 of file L1MuBMTrackSegPhi.cc.

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

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

◆ phi()

int L1MuBMTrackSegPhi::phi ( ) const
inline

◆ phib()

int L1MuBMTrackSegPhi::phib ( ) const
inline

◆ phibValue()

double L1MuBMTrackSegPhi::phibValue ( ) const

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

Definition at line 124 of file L1MuBMTrackSegPhi.cc.

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

References m_phib.

◆ phiValue()

double L1MuBMTrackSegPhi::phiValue ( ) const

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

Definition at line 115 of file L1MuBMTrackSegPhi.cc.

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

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

◆ quality()

int L1MuBMTrackSegPhi::quality ( ) const
inline

return quality code

Definition at line 103 of file L1MuBMTrackSegPhi.h.

103 { return m_quality; }

References m_quality.

Referenced by L1MuBMAssignmentUnit::getPt1Method(), L1MuBMAssignmentUnit::getPt2Method(), and L1MuBMEUX::run().

◆ reset()

void L1MuBMTrackSegPhi::reset ( void  )

reset phi track segment

Definition at line 103 of file L1MuBMTrackSegPhi.cc.

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

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

Referenced by L1MuBMSEU::reset().

◆ sector()

int L1MuBMTrackSegPhi::sector ( ) const
inline

◆ setEtaFlag()

void L1MuBMTrackSegPhi::setEtaFlag ( bool  flag)
inline

set eta flag

Definition at line 118 of file L1MuBMTrackSegPhi.h.

118 { m_etaFlag = flag; }

References RemoveAddSevLevel::flag, and m_etaFlag.

◆ station()

int L1MuBMTrackSegPhi::station ( ) const
inline

return station

Definition at line 91 of file L1MuBMTrackSegPhi.h.

91 { return m_location.station(); }

References m_location, and L1MuBMTrackSegLoc::station().

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

◆ tag()

int L1MuBMTrackSegPhi::tag ( ) const
inline

return tag (second TS tag)

Definition at line 106 of file L1MuBMTrackSegPhi.h.

106 { return m_tag; }

References m_tag.

◆ wheel()

int L1MuBMTrackSegPhi::wheel ( ) const
inline

return wheel

Definition at line 85 of file L1MuBMTrackSegPhi.h.

85 { return m_location.wheel(); }

References m_location, and L1MuBMTrackSegLoc::wheel().

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

◆ where()

const L1MuBMTrackSegLoc& L1MuBMTrackSegPhi::where ( ) const
inline

return location of phi track segment

Definition at line 94 of file L1MuBMTrackSegPhi.h.

94 { return m_location; }

References m_location.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  ,
const L1MuBMTrackSegPhi  
)
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 L1MuBMTrackSegPhi::m_bx
private

Definition at line 141 of file L1MuBMTrackSegPhi.h.

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

◆ m_etaFlag

bool L1MuBMTrackSegPhi::m_etaFlag
private

Definition at line 142 of file L1MuBMTrackSegPhi.h.

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

◆ m_location

L1MuBMTrackSegLoc L1MuBMTrackSegPhi::m_location
private

◆ m_phi

int L1MuBMTrackSegPhi::m_phi
private

Definition at line 137 of file L1MuBMTrackSegPhi.h.

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

◆ m_phib

int L1MuBMTrackSegPhi::m_phib
private

Definition at line 138 of file L1MuBMTrackSegPhi.h.

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

◆ m_quality

TSQuality L1MuBMTrackSegPhi::m_quality
private

Definition at line 139 of file L1MuBMTrackSegPhi.h.

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

◆ m_tag

bool L1MuBMTrackSegPhi::m_tag
private

Definition at line 140 of file L1MuBMTrackSegPhi.h.

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

L1MuBMTrackSegPhi::HL
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegLoc::station
int station() const
return station
Definition: L1MuBMTrackSegLoc.h:62
L1MuBMTrackSegPhi::m_location
L1MuBMTrackSegLoc m_location
Definition: L1MuBMTrackSegPhi.h:136
L1MuBMTrackSegPhi::m_phi
int m_phi
Definition: L1MuBMTrackSegPhi.h:137
L1MuBMTrackSegPhi::Li
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::bx
int bx() const
return bunch crossing
Definition: L1MuBMTrackSegPhi.h:109
L1MuBMTrackSegPhi::Ho
Definition: L1MuBMTrackSegPhi.h:44
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
L1MuBMTrackSegPhi::Null
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::m_etaFlag
bool m_etaFlag
Definition: L1MuBMTrackSegPhi.h:142
L1MuBMTrackSegPhi::LL
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::quality
int quality() const
return quality code
Definition: L1MuBMTrackSegPhi.h:103
L1MuBMTrackSegLoc::wheel
int wheel() const
return wheel
Definition: L1MuBMTrackSegLoc.h:56
L1MuBMTrackSegPhi::HH
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::m_tag
bool m_tag
Definition: L1MuBMTrackSegPhi.h:140
L1MuBMTrackSegPhi::m_bx
int m_bx
Definition: L1MuBMTrackSegPhi.h:141
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
L1MuBMTrackSegPhi::Lo
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::m_quality
TSQuality m_quality
Definition: L1MuBMTrackSegPhi.h:139
L1MuBMTrackSegPhi::phib
int phib() const
return phib
Definition: L1MuBMTrackSegPhi.h:100
L1MuBMTrackSegLoc::sector
int sector() const
return sector (30 deg)
Definition: L1MuBMTrackSegLoc.h:59
L1MuBMTrackSegPhi::Hi
Definition: L1MuBMTrackSegPhi.h:44
L1MuBMTrackSegPhi::etaFlag
bool etaFlag() const
return eta flag
Definition: L1MuBMTrackSegPhi.h:112
L1MuBMTrackSegPhi::phi
int phi() const
return phi
Definition: L1MuBMTrackSegPhi.h:97
L1MuBMTrackSegPhi::tag
int tag() const
return tag (second TS tag)
Definition: L1MuBMTrackSegPhi.h:106
L1MuBMTrackSegPhi::m_phib
int m_phib
Definition: L1MuBMTrackSegPhi.h:138
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116