CMS 3D CMS Logo

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

#include <L1MuDTTrackSegLoc.h>

Public Member Functions

 L1MuDTTrackSegLoc ()
 default constructor More...
 
 L1MuDTTrackSegLoc (int wheel_id, int sector_id, int station_id)
 constructor More...
 
 L1MuDTTrackSegLoc (const L1MuDTTrackSegLoc &)
 copy constructor More...
 
bool operator!= (const L1MuDTTrackSegLoc &) const
 unequal operator More...
 
bool operator< (const L1MuDTTrackSegLoc &) const
 less operator More...
 
L1MuDTTrackSegLocoperator= (const L1MuDTTrackSegLoc &)
 assignment operator More...
 
bool operator== (const L1MuDTTrackSegLoc &) const
 equal operator More...
 
int sector () const
 return sector (30 deg) More...
 
int station () const
 return station More...
 
int wheel () const
 return wheel More...
 
virtual ~L1MuDTTrackSegLoc ()
 destructor More...
 

Private Attributes

int m_sector
 
int m_station
 
int m_wheel
 

Friends

std::ostream & operator<< (std::ostream &, const L1MuDTTrackSegLoc &)
 output stream operator More...
 

Detailed Description

Logical location of a Track Segment:

The location of a track segment is given by a triple (wheel, sector, station) with wheel: -3, -2, -1, 0, +1, +2, +3 ( -3, +3 : are forward- and backward-endcaps),
sector: 0-11 (30 deg sectors!)
station: 1-5 (station 5=ME13)

N. Neumeister CERN EP

Definition at line 42 of file L1MuDTTrackSegLoc.h.

Constructor & Destructor Documentation

L1MuDTTrackSegLoc::L1MuDTTrackSegLoc ( )

default constructor

Definition at line 43 of file L1MuDTTrackSegLoc.cc.

L1MuDTTrackSegLoc::L1MuDTTrackSegLoc ( int  wheel_id,
int  sector_id,
int  station_id 
)

constructor

Definition at line 46 of file L1MuDTTrackSegLoc.cc.

References funct::abs().

48  :
49  m_wheel(wheel_id), m_sector(sector_id), m_station(station_id) {
50 
51  // assert(wheel_id >= -3 && wheel_id <= 3);
52  // assert(sector_id >= 0 && sector_id < 12);
53 
54  if ( abs(wheel_id) == 3 ) {
55  // assert(station_id >= 3 && station_id <= 4);
56  }
57  else {
58  // assert(station_id >= 1 && station_id <= 4);
59  }
60 
61 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuDTTrackSegLoc::L1MuDTTrackSegLoc ( const L1MuDTTrackSegLoc id)

copy constructor

Definition at line 64 of file L1MuDTTrackSegLoc.cc.

L1MuDTTrackSegLoc::~L1MuDTTrackSegLoc ( )
virtual

destructor

Definition at line 72 of file L1MuDTTrackSegLoc.cc.

72 {}

Member Function Documentation

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

unequal operator

Definition at line 110 of file L1MuDTTrackSegLoc.cc.

References m_sector, m_station, m_wheel, sector(), station(), and wheel().

Referenced by station().

110  {
111 
112  if ( m_wheel != id.wheel() ) return true;
113  if ( m_sector != id.sector() ) return true;
114  if ( m_station != id.station() ) return true;
115  return false;
116 
117 }
int sector() const
return sector (30 deg)
int station() const
return station
int wheel() const
return wheel
bool L1MuDTTrackSegLoc::operator< ( const L1MuDTTrackSegLoc id) const

less operator

Definition at line 123 of file L1MuDTTrackSegLoc.cc.

References sector(), station(), and wheel().

Referenced by station().

123  {
124 
125  if ( wheel() < id.wheel() ) return true;
126  if ( wheel() > id.wheel() ) return false;
127  if ( sector() < id.sector() ) return true;
128  if ( sector() > id.sector() ) return false;
129  if ( station() < id.station() ) return true;
130  if ( station() > id.station() ) return false;
131  return false;
132 
133 }
int sector() const
return sector (30 deg)
int station() const
return station
int wheel() const
return wheel
L1MuDTTrackSegLoc & L1MuDTTrackSegLoc::operator= ( const L1MuDTTrackSegLoc id)

assignment operator

Definition at line 82 of file L1MuDTTrackSegLoc.cc.

References m_sector, m_station, and m_wheel.

Referenced by station().

82  {
83 
84  if ( this != &id ) {
85  m_wheel = id.m_wheel;
86  m_sector = id.m_sector;
87  m_station = id.m_station;
88  }
89  return *this;
90 
91 }
bool L1MuDTTrackSegLoc::operator== ( const L1MuDTTrackSegLoc id) const

equal operator

Definition at line 97 of file L1MuDTTrackSegLoc.cc.

References m_sector, m_station, m_wheel, sector(), station(), and wheel().

Referenced by station().

97  {
98 
99  if ( m_wheel != id.wheel() ) return false;
100  if ( m_sector != id.sector() ) return false;
101  if ( m_station != id.station() ) return false;
102  return true;
103 
104 }
int sector() const
return sector (30 deg)
int station() const
return station
int wheel() const
return wheel
int L1MuDTTrackSegLoc::sector ( void  ) const
inline
int L1MuDTTrackSegLoc::station ( ) const
inline
int L1MuDTTrackSegLoc::wheel ( ) const
inline

Friends And Related Function Documentation

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

output stream operator

Referenced by station().

Member Data Documentation

int L1MuDTTrackSegLoc::m_sector
private

Definition at line 87 of file L1MuDTTrackSegLoc.h.

Referenced by operator!=(), operator=(), operator==(), and sector().

int L1MuDTTrackSegLoc::m_station
private

Definition at line 88 of file L1MuDTTrackSegLoc.h.

Referenced by operator!=(), operator=(), operator==(), and station().

int L1MuDTTrackSegLoc::m_wheel
private

Definition at line 86 of file L1MuDTTrackSegLoc.h.

Referenced by operator!=(), operator=(), operator==(), and wheel().