CMS 3D CMS Logo

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

#include <L1MuBMTrackSegLoc.h>

Public Member Functions

 L1MuBMTrackSegLoc ()
 default constructor More...
 
 L1MuBMTrackSegLoc (int wheel_id, int sector_id, int station_id)
 constructor More...
 
 L1MuBMTrackSegLoc (const L1MuBMTrackSegLoc &)
 copy constructor More...
 
bool operator!= (const L1MuBMTrackSegLoc &) const
 unequal operator More...
 
bool operator< (const L1MuBMTrackSegLoc &) const
 less operator More...
 
L1MuBMTrackSegLocoperator= (const L1MuBMTrackSegLoc &)
 assignment operator More...
 
bool operator== (const L1MuBMTrackSegLoc &) 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 ~L1MuBMTrackSegLoc ()
 destructor More...
 

Private Attributes

int m_sector
 
int m_station
 
int m_wheel
 

Friends

std::ostream & operator<< (std::ostream &, const L1MuBMTrackSegLoc &)
 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 L1MuBMTrackSegLoc.h.

Constructor & Destructor Documentation

L1MuBMTrackSegLoc::L1MuBMTrackSegLoc ( )

default constructor

Definition at line 43 of file L1MuBMTrackSegLoc.cc.

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

constructor

Definition at line 46 of file L1MuBMTrackSegLoc.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
L1MuBMTrackSegLoc::L1MuBMTrackSegLoc ( const L1MuBMTrackSegLoc id)

copy constructor

Definition at line 64 of file L1MuBMTrackSegLoc.cc.

L1MuBMTrackSegLoc::~L1MuBMTrackSegLoc ( )
virtual

destructor

Definition at line 72 of file L1MuBMTrackSegLoc.cc.

72 {}

Member Function Documentation

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

unequal operator

Definition at line 110 of file L1MuBMTrackSegLoc.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 wheel() const
return wheel
int sector() const
return sector (30 deg)
int station() const
return station
bool L1MuBMTrackSegLoc::operator< ( const L1MuBMTrackSegLoc id) const

less operator

Definition at line 123 of file L1MuBMTrackSegLoc.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 wheel() const
return wheel
int sector() const
return sector (30 deg)
int station() const
return station
L1MuBMTrackSegLoc & L1MuBMTrackSegLoc::operator= ( const L1MuBMTrackSegLoc id)

assignment operator

Definition at line 82 of file L1MuBMTrackSegLoc.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 L1MuBMTrackSegLoc::operator== ( const L1MuBMTrackSegLoc id) const

equal operator

Definition at line 97 of file L1MuBMTrackSegLoc.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 wheel() const
return wheel
int sector() const
return sector (30 deg)
int station() const
return station
int L1MuBMTrackSegLoc::sector ( ) const
inline
int L1MuBMTrackSegLoc::station ( ) const
inline
int L1MuBMTrackSegLoc::wheel ( ) const
inline

Friends And Related Function Documentation

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

output stream operator

Referenced by station().

Member Data Documentation

int L1MuBMTrackSegLoc::m_sector
private

Definition at line 87 of file L1MuBMTrackSegLoc.h.

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

int L1MuBMTrackSegLoc::m_station
private

Definition at line 88 of file L1MuBMTrackSegLoc.h.

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

int L1MuBMTrackSegLoc::m_wheel
private

Definition at line 86 of file L1MuBMTrackSegLoc.h.

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