test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (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...
 
 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...
 
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 TSQuality &)
 overload output stream operator for phi track segment quality More...
 
std::ostream & operator<< (std::ostream &, const L1MuBMTrackSegPhi &)
 overload output stream operator for phi track segments More...
 

Detailed Description

PHI Track Segment

N. Neumeister CERN EP

Definition at line 36 of file L1MuBMTrackSegPhi.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1MuBMTrackSegPhi::L1MuBMTrackSegPhi ( )

default constructor

Definition at line 44 of file L1MuBMTrackSegPhi.cc.

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 48 of file L1MuBMTrackSegPhi.cc.

51  :
52  m_location(wheel_id, sector_id, station_id),
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 
65 }
L1MuBMTrackSegLoc m_location
int phib() const
return phib
int bx() const
return bunch crossing
int phi() const
return phi
bool etaFlag() const
return eta flag
int quality() const
return quality code
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 68 of file L1MuBMTrackSegPhi.cc.

71  :
72  m_location(id), m_phi(phi), m_phib(phib),
74 /*
75  if ( phi < -2048 || phi > 2047 ) {
76  cerr << "TrackSegPhi : phi out of range: " << phi << endl;
77  }
78  if ( phib < -512 || phib > 511 ) {
79  cerr << "TrackSegPhi : phib out of range: " << phib << endl;
80  }
81  if ( quality > 7 ) {
82  cerr << "TrackSegPhi : quality out of range: " << quality << endl;
83  }
84 */
85 }
L1MuBMTrackSegLoc m_location
int tag() const
return tag (second TS tag)
int phib() const
return phib
int bx() const
return bunch crossing
int phi() const
return phi
bool etaFlag() const
return eta flag
int quality() const
return quality code
L1MuBMTrackSegPhi::L1MuBMTrackSegPhi ( const L1MuBMTrackSegPhi id)

copy constructor

Definition at line 88 of file L1MuBMTrackSegPhi.cc.

L1MuBMTrackSegPhi::~L1MuBMTrackSegPhi ( )
virtual

destructor

Definition at line 98 of file L1MuBMTrackSegPhi.cc.

98 {}

Member Function Documentation

int L1MuBMTrackSegPhi::bx ( ) const
inline

return bunch crossing

Definition at line 98 of file L1MuBMTrackSegPhi.h.

References m_bx.

98 { return m_bx; }
bool L1MuBMTrackSegPhi::empty ( void  ) const
inline

is it an empty phi track segment?

Definition at line 104 of file L1MuBMTrackSegPhi.h.

References m_quality, and Null.

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

bool L1MuBMTrackSegPhi::etaFlag ( ) const
inline

return eta flag

Definition at line 101 of file L1MuBMTrackSegPhi.h.

References m_etaFlag.

101 { return m_etaFlag; }
bool L1MuBMTrackSegPhi::operator!= ( const L1MuBMTrackSegPhi id) const

unequal operator

Definition at line 179 of file L1MuBMTrackSegPhi.cc.

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

179  {
180 
181  if ( m_location != id.m_location ) return true;
182  if ( m_phi != id.m_phi ) return true;
183  if ( m_phib != id.m_phib ) return true;
184  if ( m_quality != id.m_quality ) return true;
185  if ( m_bx != id.m_bx ) return true;
186  return false;
187 
188 }
L1MuBMTrackSegLoc m_location
L1MuBMTrackSegPhi & L1MuBMTrackSegPhi::operator= ( const L1MuBMTrackSegPhi id)

assignment operator

Definition at line 145 of file L1MuBMTrackSegPhi.cc.

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

145  {
146 
147  if ( this != &id ) {
148  m_location = id.m_location;
149  m_phi = id.m_phi;
150  m_phib = id.m_phib;
151  m_quality = id.m_quality;
152  m_tag = id.m_tag;
153  m_bx = id.m_bx;
154  m_etaFlag = id.m_etaFlag;
155  }
156  return *this;
157 
158 }
L1MuBMTrackSegLoc m_location
bool L1MuBMTrackSegPhi::operator== ( const L1MuBMTrackSegPhi id) const

equal operator

Definition at line 164 of file L1MuBMTrackSegPhi.cc.

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

164  {
165 
166  if ( m_location != id.m_location ) return false;
167  if ( m_phi != id.m_phi ) return false;
168  if ( m_phib != id.m_phib ) return false;
169  if ( m_quality != id.m_quality ) return false;
170  if ( m_bx != id.m_bx ) return false;
171  return true;
172 
173 }
L1MuBMTrackSegLoc m_location
int L1MuBMTrackSegPhi::phi ( void  ) const
inline
int L1MuBMTrackSegPhi::phib ( ) const
inline
double L1MuBMTrackSegPhi::phibValue ( ) const

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

Definition at line 135 of file L1MuBMTrackSegPhi.cc.

References m_phib.

135  {
136 
137  return static_cast<double>(m_phib)/512;
138 
139 }
double L1MuBMTrackSegPhi::phiValue ( ) const

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

Definition at line 123 of file L1MuBMTrackSegPhi.cc.

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

123  {
124 
125  double tmp = static_cast<double>(m_location.sector())*M_PI/6;
126  tmp += static_cast<double>(m_phi)/4096;
127  return (tmp > 0 ) ? tmp : (2*M_PI + tmp);
128 
129 }
L1MuBMTrackSegLoc m_location
int sector() const
return sector (30 deg)
#define M_PI
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int L1MuBMTrackSegPhi::quality ( void  ) const
inline

return quality code

Definition at line 92 of file L1MuBMTrackSegPhi.h.

References m_quality.

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

92 { return m_quality; }
void L1MuBMTrackSegPhi::reset ( void  )

reset phi track segment

Definition at line 108 of file L1MuBMTrackSegPhi.cc.

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

Referenced by L1MuBMSEU::reset().

108  {
109 
110  m_phi = 0;
111  m_phib = 0;
112  m_quality = Null;
113  m_tag = false;
114  m_bx = 0;
115  m_etaFlag = false;
116 
117 }
int L1MuBMTrackSegPhi::sector ( void  ) const
inline

return sector

Definition at line 77 of file L1MuBMTrackSegPhi.h.

References m_location, and L1MuBMTrackSegLoc::sector().

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

77 { return m_location.sector(); }
L1MuBMTrackSegLoc m_location
int sector() const
return sector (30 deg)
void L1MuBMTrackSegPhi::setEtaFlag ( bool  flag)
inline

set eta flag

Definition at line 107 of file L1MuBMTrackSegPhi.h.

References m_etaFlag.

107 { m_etaFlag = flag; }
int L1MuBMTrackSegPhi::station ( ) const
inline

return station

Definition at line 80 of file L1MuBMTrackSegPhi.h.

References m_location, and L1MuBMTrackSegLoc::station().

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

80 { return m_location.station(); }
L1MuBMTrackSegLoc m_location
int station() const
return station
int L1MuBMTrackSegPhi::tag ( ) const
inline

return tag (second TS tag)

Definition at line 95 of file L1MuBMTrackSegPhi.h.

References m_tag.

Referenced by Inspector.Inspector::SetTag().

95 { return m_tag; }
int L1MuBMTrackSegPhi::wheel ( ) const
inline

return wheel

Definition at line 74 of file L1MuBMTrackSegPhi.h.

References m_location, and L1MuBMTrackSegLoc::wheel().

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

74 { return m_location.wheel(); }
L1MuBMTrackSegLoc m_location
int wheel() const
return wheel
const L1MuBMTrackSegLoc& L1MuBMTrackSegPhi::where ( ) const
inline

return location of phi track segment

Definition at line 83 of file L1MuBMTrackSegPhi.h.

References m_location.

83 { return m_location; }
L1MuBMTrackSegLoc m_location

Friends And Related Function Documentation

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

overload output stream operator for phi track segment quality

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

overload output stream operator for phi track segments

Member Data Documentation

int L1MuBMTrackSegPhi::m_bx
private

Definition at line 131 of file L1MuBMTrackSegPhi.h.

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

bool L1MuBMTrackSegPhi::m_etaFlag
private

Definition at line 132 of file L1MuBMTrackSegPhi.h.

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

L1MuBMTrackSegLoc L1MuBMTrackSegPhi::m_location
private
int L1MuBMTrackSegPhi::m_phi
private

Definition at line 127 of file L1MuBMTrackSegPhi.h.

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

int L1MuBMTrackSegPhi::m_phib
private

Definition at line 128 of file L1MuBMTrackSegPhi.h.

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

TSQuality L1MuBMTrackSegPhi::m_quality
private

Definition at line 129 of file L1MuBMTrackSegPhi.h.

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

bool L1MuBMTrackSegPhi::m_tag
private

Definition at line 130 of file L1MuBMTrackSegPhi.h.

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