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 (const L1MuBMTrackSegLoc &)
 copy constructor More...
 
 L1MuBMTrackSegLoc (int wheel_id, int sector_id, int station_id)
 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 41 of file L1MuBMTrackSegLoc.h.

Constructor & Destructor Documentation

◆ L1MuBMTrackSegLoc() [1/3]

L1MuBMTrackSegLoc::L1MuBMTrackSegLoc ( )

default constructor

Definition at line 43 of file L1MuBMTrackSegLoc.cc.

43 : m_wheel(0), m_sector(0), m_station(0) {}

◆ L1MuBMTrackSegLoc() [2/3]

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

constructor

Definition at line 45 of file L1MuBMTrackSegLoc.cc.

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 }

References funct::abs().

◆ L1MuBMTrackSegLoc() [3/3]

L1MuBMTrackSegLoc::L1MuBMTrackSegLoc ( const L1MuBMTrackSegLoc id)

copy constructor

Definition at line 57 of file L1MuBMTrackSegLoc.cc.

◆ ~L1MuBMTrackSegLoc()

L1MuBMTrackSegLoc::~L1MuBMTrackSegLoc ( )
virtual

destructor

Definition at line 64 of file L1MuBMTrackSegLoc.cc.

64 {}

Member Function Documentation

◆ operator!=()

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

unequal operator

Definition at line 98 of file L1MuBMTrackSegLoc.cc.

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 }

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

◆ operator<()

bool L1MuBMTrackSegLoc::operator< ( const L1MuBMTrackSegLoc id) const

less operator

Definition at line 111 of file L1MuBMTrackSegLoc.cc.

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 }

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

◆ operator=()

L1MuBMTrackSegLoc & L1MuBMTrackSegLoc::operator= ( const L1MuBMTrackSegLoc id)

assignment operator

Definition at line 73 of file L1MuBMTrackSegLoc.cc.

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 }

References m_sector, m_station, and m_wheel.

◆ operator==()

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

equal operator

Definition at line 85 of file L1MuBMTrackSegLoc.cc.

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 }

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

◆ sector()

int L1MuBMTrackSegLoc::sector ( ) const
inline

◆ station()

int L1MuBMTrackSegLoc::station ( ) const
inline

◆ wheel()

int L1MuBMTrackSegLoc::wheel ( ) const
inline

Friends And Related Function Documentation

◆ operator<<

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

output stream operator

Member Data Documentation

◆ m_sector

int L1MuBMTrackSegLoc::m_sector
private

Definition at line 81 of file L1MuBMTrackSegLoc.h.

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

◆ m_station

int L1MuBMTrackSegLoc::m_station
private

Definition at line 82 of file L1MuBMTrackSegLoc.h.

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

◆ m_wheel

int L1MuBMTrackSegLoc::m_wheel
private

Definition at line 80 of file L1MuBMTrackSegLoc.h.

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

L1MuBMTrackSegLoc::station
int station() const
return station
Definition: L1MuBMTrackSegLoc.h:62
L1MuBMTrackSegLoc::wheel
int wheel() const
return wheel
Definition: L1MuBMTrackSegLoc.h:56
L1MuBMTrackSegLoc::m_station
int m_station
Definition: L1MuBMTrackSegLoc.h:82
L1MuBMTrackSegLoc::sector
int sector() const
return sector (30 deg)
Definition: L1MuBMTrackSegLoc.h:59
L1MuBMTrackSegLoc::m_sector
int m_sector
Definition: L1MuBMTrackSegLoc.h:81
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuBMTrackSegLoc::m_wheel
int m_wheel
Definition: L1MuBMTrackSegLoc.h:80