CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes | Friends

L1MuDTTrackSegPhi Class Reference

#include <L1MuDTTrackSegPhi.h>

List of all members.

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

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

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

quality code of DTBX phi track segments

Enumerator:
Li 
Lo 
Hi 
Ho 
LL 
HL 
HH 
Null 

Definition at line 43 of file L1MuDTTrackSegPhi.h.

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

Constructor & Destructor Documentation

L1MuDTTrackSegPhi::L1MuDTTrackSegPhi ( )

default constructor

Definition at line 46 of file L1MuDTTrackSegPhi.cc.

                                     : 
      m_location(), m_phi(0), m_phib(0), m_quality(Null), m_bx(0) {}
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.

                                                   :
  m_location(wheel_id, sector_id, station_id),
  m_phi(phi), m_phib(phib), m_quality(quality), m_bx(bx), m_etaFlag(etaFlag) {

  if ( phi  < -2048 || phi  > 2047 ) { 
    //    cerr << "TrackSegPhi : phi out of range: " << phi << endl;
  }
  if ( phib <  -512 || phib >  511 ) {
    //    cerr << "TrackSegPhi : phib out of range: " << phib << endl;
  }
  if ( quality > 7 ) {
    //    cerr << "TrackSegPhi : quality out of range: " << quality << endl;
  }

}
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.

                                                   : 
  m_location(id), m_phi(phi), m_phib(phib), 
  m_quality(quality), m_tag(tag), m_bx(bx), m_etaFlag(etaFlag) {

  if ( phi  < -2048 || phi  > 2047 ) {
    //    cerr << "TrackSegPhi : phi out of range: " << phi << endl;
  }
  if ( phib <  -512 || phib >  511 ) {
    //    cerr << "TrackSegPhi : phib out of range: " << phib << endl;
  }
  if ( quality > 7 ) {
    //    cerr << "TrackSegPhi : quality out of range: " << quality << endl;
  }

}
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.

{}

Member Function Documentation

int L1MuDTTrackSegPhi::bx ( ) const [inline]

return bunch crossing

Definition at line 100 of file L1MuDTTrackSegPhi.h.

References m_bx.

{ 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().

{ return m_quality == Null; }
bool L1MuDTTrackSegPhi::etaFlag ( ) const [inline]

return eta flag

Definition at line 103 of file L1MuDTTrackSegPhi.h.

References m_etaFlag.

{ 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.

                                                                    {

  if ( m_location != id.m_location ) return true;
  if ( m_phi      != id.m_phi )      return true;
  if ( m_phib     != id.m_phib )     return true;
  if ( m_quality  != id.m_quality )  return true;
  if ( m_bx       != id.m_bx )       return true;
  return false;

}
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.

                                                                           {

  if ( this != &id ) {
    m_location  = id.m_location;
    m_phi       = id.m_phi;
    m_phib      = id.m_phib;
    m_quality   = id.m_quality;
    m_tag       = id.m_tag;
    m_bx        = id.m_bx;
    m_etaFlag   = id.m_etaFlag;
  }
  return *this;

}
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.

                                                                    {

  if ( m_location != id.m_location ) return false;
  if ( m_phi      != id.m_phi )      return false;
  if ( m_phib     != id.m_phib )     return false;
  if ( m_quality  != id.m_quality )  return false;
  if ( m_bx       != id.m_bx )       return false;
  return true;

}
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().

{ 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().

{ 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.

                                          {

  return static_cast<double>(m_phib)/512;

}
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.

                                         {

  double tmp = static_cast<double>(m_location.sector())*M_PI/6;
  tmp += static_cast<double>(m_phi)/4096;
  return (tmp > 0 ) ? tmp : (2*M_PI + tmp);

}
int L1MuDTTrackSegPhi::quality ( void  ) const [inline]

return quality code

Definition at line 94 of file L1MuDTTrackSegPhi.h.

References m_quality.

Referenced by L1MuDTEUX::run().

{ 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().

                              {

  m_phi     = 0;
  m_phib    = 0;
  m_quality = Null;
  m_tag     = false;
  m_bx      = 0;
  m_etaFlag = false;

}
int L1MuDTTrackSegPhi::sector ( void  ) const [inline]

return sector

Definition at line 79 of file L1MuDTTrackSegPhi.h.

References m_location, and L1MuDTTrackSegLoc::sector().

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

{ return m_location.sector(); }
void L1MuDTTrackSegPhi::setEtaFlag ( bool  flag) [inline]

set eta flag

Definition at line 109 of file L1MuDTTrackSegPhi.h.

References m_etaFlag.

{ m_etaFlag = flag; } 
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().

{ return m_location.station(); }
int L1MuDTTrackSegPhi::tag ( ) const [inline]

return tag (second TS tag)

Definition at line 97 of file L1MuDTTrackSegPhi.h.

References m_tag.

{ 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 L1MuDTEUX::run().

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

return location of phi track segment

Definition at line 85 of file L1MuDTTrackSegPhi.h.

References m_location.

{ return 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().

Definition at line 134 of file L1MuDTTrackSegPhi.h.

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

int L1MuDTTrackSegPhi::m_phi [private]

Definition at line 129 of file L1MuDTTrackSegPhi.h.

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

Definition at line 130 of file L1MuDTTrackSegPhi.h.

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

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().