CMS 3D CMS Logo

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

#include <L1MuDTSecProcId.h>

Public Member Functions

 L1MuDTSecProcId ()
 default constructor More...
 
 L1MuDTSecProcId (const L1MuDTSecProcId &)
 copy constructor More...
 
 L1MuDTSecProcId (int wheel_id, int sector_id)
 constructor More...
 
int locwheel () const
 return physical wheel number (-2,-1,0,+1,+2) More...
 
bool operator!= (const L1MuDTSecProcId &) const
 unequal operator More...
 
bool operator< (const L1MuDTSecProcId &) const
 less operator More...
 
L1MuDTSecProcIdoperator= (const L1MuDTSecProcId &)
 assignment operator More...
 
bool operator== (const L1MuDTSecProcId &) const
 equal operator More...
 
bool ovl () const
 is it an overlap region Sector Processor? More...
 
int sector () const
 return sector number More...
 
int wheel () const
 return wheel number More...
 
virtual ~L1MuDTSecProcId ()
 destructor More...
 

Private Attributes

int m_sector
 
int m_wheel
 

Friends

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

Detailed Description

Sector Processor identifier:

There are 6 sector processors along the eta direction numbered: -3 -2 -1 +1 +2 +3 (= wheel)
and 12 sector processors along the phi direction [0,11].
This is necessary because wheel 0 needs two sector processors

N. Neumeister CERN EP

Definition at line 40 of file L1MuDTSecProcId.h.

Constructor & Destructor Documentation

◆ L1MuDTSecProcId() [1/3]

L1MuDTSecProcId::L1MuDTSecProcId ( )

default constructor

Definition at line 42 of file L1MuDTSecProcId.cc.

42 : m_wheel(0), m_sector(0) {}

◆ L1MuDTSecProcId() [2/3]

L1MuDTSecProcId::L1MuDTSecProcId ( int  wheel_id,
int  sector_id 
)

constructor

Definition at line 44 of file L1MuDTSecProcId.cc.

44  : m_wheel(wheel_id), m_sector(sector_id) {
45  if (!(wheel_id >= -3 && wheel_id <= 3)) {
46  // cerr << "SecProcId : wheel out of range: " << wheel_id << endl;
47  }
48  if (!(sector_id >= 0 && sector_id < 12)) {
49  // cerr << "SecProcId : sector out of range: " << sector_id << endl;
50  }
51 }

◆ L1MuDTSecProcId() [3/3]

L1MuDTSecProcId::L1MuDTSecProcId ( const L1MuDTSecProcId id)

copy constructor

Definition at line 53 of file L1MuDTSecProcId.cc.

53 : m_wheel(id.m_wheel), m_sector(id.m_sector) {}

◆ ~L1MuDTSecProcId()

L1MuDTSecProcId::~L1MuDTSecProcId ( )
virtual

destructor

Definition at line 59 of file L1MuDTSecProcId.cc.

59 {}

Member Function Documentation

◆ locwheel()

int L1MuDTSecProcId::locwheel ( ) const

return physical wheel number (-2,-1,0,+1,+2)

Definition at line 79 of file L1MuDTSecProcId.cc.

79 { return (m_wheel / abs(m_wheel) * (abs(m_wheel) - 1)); }

References funct::abs(), and m_wheel.

Referenced by L1MuDTSectorReceiver::address2wheel().

◆ operator!=()

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

unequal operator

Definition at line 95 of file L1MuDTSecProcId.cc.

95  {
96  if (m_wheel != id.wheel())
97  return true;
98  if (m_sector != id.sector())
99  return true;
100  return false;
101 }

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

◆ operator<()

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

less operator

Definition at line 106 of file L1MuDTSecProcId.cc.

106  {
107  if (sector() < id.sector())
108  return true;
109  if (sector() > id.sector())
110  return false;
111  if (wheel() < 0 && id.wheel() < 0) {
112  if (-wheel() < -id.wheel())
113  return true;
114  } else {
115  if (wheel() < id.wheel())
116  return true;
117  }
118  return false;
119 }

References sector(), and wheel().

◆ operator=()

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

assignment operator

Definition at line 68 of file L1MuDTSecProcId.cc.

68  {
69  if (this != &id) {
70  m_wheel = id.m_wheel;
71  m_sector = id.m_sector;
72  }
73  return *this;
74 }

References m_sector, and m_wheel.

◆ operator==()

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

equal operator

Definition at line 84 of file L1MuDTSecProcId.cc.

84  {
85  if (wheel() != id.wheel())
86  return false;
87  if (sector() != id.sector())
88  return false;
89  return true;
90 }

References sector(), and wheel().

◆ ovl()

bool L1MuDTSecProcId::ovl ( ) const
inline

is it an overlap region Sector Processor?

Definition at line 61 of file L1MuDTSecProcId.h.

61 { return (abs(m_wheel) == 3) ? true : false; }

References funct::abs(), m_wheel, and funct::true.

Referenced by L1MuDTSectorProcessor::brl(), and L1MuDTSectorProcessor::ovl().

◆ sector()

int L1MuDTSecProcId::sector ( void  ) const
inline

◆ wheel()

int L1MuDTSecProcId::wheel ( ) const
inline

Friends And Related Function Documentation

◆ operator<<

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

output stream operator

Member Data Documentation

◆ m_sector

int L1MuDTSecProcId::m_sector
private

Definition at line 83 of file L1MuDTSecProcId.h.

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

◆ m_wheel

int L1MuDTSecProcId::m_wheel
private

Definition at line 82 of file L1MuDTSecProcId.h.

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

L1MuDTSecProcId::m_sector
int m_sector
Definition: L1MuDTSecProcId.h:83
L1MuDTSecProcId::wheel
int wheel() const
return wheel number
Definition: L1MuDTSecProcId.h:55
funct::true
true
Definition: Factorize.h:173
L1MuDTSecProcId::sector
int sector() const
return sector number
Definition: L1MuDTSecProcId.h:58
L1MuDTSecProcId::m_wheel
int m_wheel
Definition: L1MuDTSecProcId.h:82
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22