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
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 (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...
 
 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...
 
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 TSQuality &)
 overload output stream operator for phi track segment quality More...
 
std::ostream & operator<< (std::ostream &, const L1MuDTTrackSegPhi &)
 overload output stream operator for phi track segments More...
 

Detailed Description

PHI Track Segment

Date:
2007/02/27 11:44:00
Revision:
1.2

N. Neumeister CERN EP

Definition at line 38 of file L1MuDTTrackSegPhi.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( )

default constructor

Definition at line 46 of file L1MuDTTrackSegPhi.cc.

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 50 of file L1MuDTTrackSegPhi.cc.

53  :
54  m_location(wheel_id, sector_id, station_id),
56 
57  if ( phi < -2048 || phi > 2047 ) {
58  // cerr << "TrackSegPhi : phi out of range: " << phi << endl;
59  }
60  if ( phib < -512 || phib > 511 ) {
61  // cerr << "TrackSegPhi : phib out of range: " << phib << endl;
62  }
63  if ( quality > 7 ) {
64  // cerr << "TrackSegPhi : quality out of range: " << quality << endl;
65  }
66 
67 }
int quality() const
return quality code
bool etaFlag() const
return eta flag
int phi() const
return phi
int bx() const
return bunch crossing
int phib() const
return phib
L1MuDTTrackSegLoc m_location
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 70 of file L1MuDTTrackSegPhi.cc.

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

copy constructor

Definition at line 90 of file L1MuDTTrackSegPhi.cc.

L1MuDTTrackSegPhi::~L1MuDTTrackSegPhi ( )
virtual

destructor

Definition at line 100 of file L1MuDTTrackSegPhi.cc.

100 {}

Member Function Documentation

int L1MuDTTrackSegPhi::bx ( ) const
inline

return bunch crossing

Definition at line 100 of file L1MuDTTrackSegPhi.h.

References m_bx.

100 { return m_bx; }
bool L1MuDTTrackSegPhi::empty ( void  ) const
inline

is it an empty phi track segment?

Definition at line 106 of file L1MuDTTrackSegPhi.h.

References m_quality, and Null.

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

bool L1MuDTTrackSegPhi::etaFlag ( ) const
inline

return eta flag

Definition at line 103 of file L1MuDTTrackSegPhi.h.

References m_etaFlag.

103 { return m_etaFlag; }
bool L1MuDTTrackSegPhi::operator!= ( const L1MuDTTrackSegPhi id) const

unequal operator

Definition at line 181 of file L1MuDTTrackSegPhi.cc.

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

181  {
182 
183  if ( m_location != id.m_location ) return true;
184  if ( m_phi != id.m_phi ) return true;
185  if ( m_phib != id.m_phib ) return true;
186  if ( m_quality != id.m_quality ) return true;
187  if ( m_bx != id.m_bx ) return true;
188  return false;
189 
190 }
L1MuDTTrackSegLoc m_location
L1MuDTTrackSegPhi & L1MuDTTrackSegPhi::operator= ( const L1MuDTTrackSegPhi id)

assignment operator

Definition at line 147 of file L1MuDTTrackSegPhi.cc.

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

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

equal operator

Definition at line 166 of file L1MuDTTrackSegPhi.cc.

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

166  {
167 
168  if ( m_location != id.m_location ) return false;
169  if ( m_phi != id.m_phi ) return false;
170  if ( m_phib != id.m_phib ) return false;
171  if ( m_quality != id.m_quality ) return false;
172  if ( m_bx != id.m_bx ) return false;
173  return true;
174 
175 }
L1MuDTTrackSegLoc m_location
int L1MuDTTrackSegPhi::phi ( void  ) const
inline

return phi

Definition at line 88 of file L1MuDTTrackSegPhi.h.

References m_phi.

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

88 { return m_phi; }
int L1MuDTTrackSegPhi::phib ( ) const
inline

return phib

Definition at line 91 of file L1MuDTTrackSegPhi.h.

References m_phib.

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

91 { return m_phib; }
double L1MuDTTrackSegPhi::phibValue ( ) const

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

Definition at line 137 of file L1MuDTTrackSegPhi.cc.

References m_phib.

137  {
138 
139  return static_cast<double>(m_phib)/512;
140 
141 }
double L1MuDTTrackSegPhi::phiValue ( ) const

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

Definition at line 125 of file L1MuDTTrackSegPhi.cc.

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

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

return quality code

Definition at line 94 of file L1MuDTTrackSegPhi.h.

References m_quality.

Referenced by L1MuDTEUX::run().

94 { return m_quality; }
void L1MuDTTrackSegPhi::reset ( void  )

reset phi track segment

Definition at line 110 of file L1MuDTTrackSegPhi.cc.

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

Referenced by L1MuDTSEU::reset().

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

return sector

Definition at line 79 of file L1MuDTTrackSegPhi.h.

References m_location, and L1MuDTTrackSegLoc::sector().

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

79 { return m_location.sector(); }
int sector() const
return sector (30 deg)
L1MuDTTrackSegLoc m_location
void L1MuDTTrackSegPhi::setEtaFlag ( bool  flag)
inline

set eta flag

Definition at line 109 of file L1MuDTTrackSegPhi.h.

References m_etaFlag.

109 { m_etaFlag = flag; }
long int flag
Definition: mlp_lapack.h:47
int L1MuDTTrackSegPhi::station ( ) const
inline

return station

Definition at line 82 of file L1MuDTTrackSegPhi.h.

References m_location, and L1MuDTTrackSegLoc::station().

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

82 { return m_location.station(); }
int station() const
return station
L1MuDTTrackSegLoc m_location
int L1MuDTTrackSegPhi::tag ( ) const
inline

return tag (second TS tag)

Definition at line 97 of file L1MuDTTrackSegPhi.h.

References m_tag.

Referenced by Inspector.Inspector::SetTag().

97 { return m_tag; }
int L1MuDTTrackSegPhi::wheel ( ) const
inline

return wheel

Definition at line 76 of file L1MuDTTrackSegPhi.h.

References m_location, and L1MuDTTrackSegLoc::wheel().

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

76 { return m_location.wheel(); }
L1MuDTTrackSegLoc m_location
int wheel() const
return wheel
const L1MuDTTrackSegLoc& L1MuDTTrackSegPhi::where ( ) const
inline

return location of phi track segment

Definition at line 85 of file L1MuDTTrackSegPhi.h.

References m_location.

85 { return m_location; }
L1MuDTTrackSegLoc 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 L1MuDTTrackSegPhi  
)
friend

overload output stream operator for phi track segments

Member Data Documentation

int L1MuDTTrackSegPhi::m_bx
private

Definition at line 133 of file L1MuDTTrackSegPhi.h.

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

bool L1MuDTTrackSegPhi::m_etaFlag
private

Definition at line 134 of file L1MuDTTrackSegPhi.h.

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

L1MuDTTrackSegLoc L1MuDTTrackSegPhi::m_location
private
int L1MuDTTrackSegPhi::m_phi
private

Definition at line 129 of file L1MuDTTrackSegPhi.h.

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

int L1MuDTTrackSegPhi::m_phib
private

Definition at line 130 of file L1MuDTTrackSegPhi.h.

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

TSQuality L1MuDTTrackSegPhi::m_quality
private

Definition at line 131 of file L1MuDTTrackSegPhi.h.

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

bool L1MuDTTrackSegPhi::m_tag
private

Definition at line 132 of file L1MuDTTrackSegPhi.h.

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