CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 41 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 45 of file L1MuDTTrackSegLoc.cc.

References funct::abs().

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

copy constructor

Definition at line 57 of file L1MuDTTrackSegLoc.cc.

L1MuDTTrackSegLoc::~L1MuDTTrackSegLoc ( )
virtual

destructor

Definition at line 64 of file L1MuDTTrackSegLoc.cc.

64 {}

Member Function Documentation

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

unequal operator

Definition at line 98 of file L1MuDTTrackSegLoc.cc.

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

98  {
99  if (m_wheel != id.wheel())
100  return true;
101  if (m_sector != id.sector())
102  return true;
103  if (m_station != id.station())
104  return true;
105  return false;
106 }
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 111 of file L1MuDTTrackSegLoc.cc.

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

111  {
112  if (wheel() < id.wheel())
113  return true;
114  if (wheel() > id.wheel())
115  return false;
116  if (sector() < id.sector())
117  return true;
118  if (sector() > id.sector())
119  return false;
120  if (station() < id.station())
121  return true;
122  if (station() > id.station())
123  return false;
124  return false;
125 }
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 73 of file L1MuDTTrackSegLoc.cc.

References m_sector, m_station, and m_wheel.

73  {
74  if (this != &id) {
75  m_wheel = id.m_wheel;
76  m_sector = id.m_sector;
77  m_station = id.m_station;
78  }
79  return *this;
80 }
bool L1MuDTTrackSegLoc::operator== ( const L1MuDTTrackSegLoc id) const

equal operator

Definition at line 85 of file L1MuDTTrackSegLoc.cc.

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

85  {
86  if (m_wheel != id.wheel())
87  return false;
88  if (m_sector != id.sector())
89  return false;
90  if (m_station != id.station())
91  return false;
92  return true;
93 }
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

Member Data Documentation

int L1MuDTTrackSegLoc::m_sector
private

Definition at line 81 of file L1MuDTTrackSegLoc.h.

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

int L1MuDTTrackSegLoc::m_station
private

Definition at line 82 of file L1MuDTTrackSegLoc.h.

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

int L1MuDTTrackSegLoc::m_wheel
private

Definition at line 80 of file L1MuDTTrackSegLoc.h.

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