CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
L1MuDTSecProcId Class Reference

#include <L1MuDTSecProcId.h>

Public Member Functions

 L1MuDTSecProcId ()
 default constructor More...
 
 L1MuDTSecProcId (int wheel_id, int sector_id)
 constructor More...
 
 L1MuDTSecProcId (const L1MuDTSecProcId &)
 copy 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

Date:
2006/06/26 16:11:13
Revision:
1.1

N. Neumeister CERN EP

Definition at line 43 of file L1MuDTSecProcId.h.

Constructor & Destructor Documentation

L1MuDTSecProcId::L1MuDTSecProcId ( )

default constructor

Definition at line 44 of file L1MuDTSecProcId.cc.

44  :
45  m_wheel(0), m_sector(0) {}
L1MuDTSecProcId::L1MuDTSecProcId ( int  wheel_id,
int  sector_id 
)

constructor

Definition at line 47 of file L1MuDTSecProcId.cc.

47  :
48  m_wheel(wheel_id), m_sector(sector_id) {
49 
50  if ( !(wheel_id >= -3 && wheel_id <= 3) ) {
51  // cerr << "SecProcId : wheel out of range: " << wheel_id << endl;
52  }
53  if ( !(sector_id >= 0 && sector_id < 12) ) {
54  // cerr << "SecProcId : sector out of range: " << sector_id << endl;
55  }
56 
57 }
L1MuDTSecProcId::L1MuDTSecProcId ( const L1MuDTSecProcId id)

copy constructor

Definition at line 60 of file L1MuDTSecProcId.cc.

L1MuDTSecProcId::~L1MuDTSecProcId ( )
virtual

destructor

Definition at line 68 of file L1MuDTSecProcId.cc.

68 {}

Member Function Documentation

int L1MuDTSecProcId::locwheel ( ) const

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

Definition at line 91 of file L1MuDTSecProcId.cc.

References abs, and m_wheel.

Referenced by L1MuDTSectorReceiver::address2wheel().

91  {
92 
93  return ( m_wheel/abs(m_wheel)*(abs(m_wheel)-1) );
94 
95 }
#define abs(x)
Definition: mlp_lapack.h:159
bool L1MuDTSecProcId::operator!= ( const L1MuDTSecProcId id) const

unequal operator

Definition at line 113 of file L1MuDTSecProcId.cc.

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

113  {
114 
115  if ( m_wheel != id.wheel() ) return true;
116  if ( m_sector != id.sector() ) return true;
117  return false;
118 
119 }
int sector() const
return sector number
int wheel() const
return wheel number
bool L1MuDTSecProcId::operator< ( const L1MuDTSecProcId id) const

less operator

Definition at line 125 of file L1MuDTSecProcId.cc.

References sector(), and wheel().

125  {
126 
127  if ( sector() < id.sector() ) return true;
128  if ( sector() > id.sector() ) return false;
129  if ( wheel() < 0 && id.wheel() < 0 ) {
130  if ( -wheel() < -id.wheel() ) return true;
131  }
132  else {
133  if ( wheel() < id.wheel() ) return true;
134  }
135  return false;
136 
137 }
int sector() const
return sector number
int wheel() const
return wheel number
L1MuDTSecProcId & L1MuDTSecProcId::operator= ( const L1MuDTSecProcId id)

assignment operator

Definition at line 77 of file L1MuDTSecProcId.cc.

References m_sector, and m_wheel.

77  {
78 
79  if ( this != &id ) {
80  m_wheel = id.m_wheel;
81  m_sector = id.m_sector;
82  }
83  return *this;
84 
85 }
bool L1MuDTSecProcId::operator== ( const L1MuDTSecProcId id) const

equal operator

Definition at line 101 of file L1MuDTSecProcId.cc.

References sector(), and wheel().

101  {
102 
103  if ( wheel() != id.wheel() ) return false;
104  if ( sector() != id.sector() ) return false;
105  return true;
106 
107 }
int sector() const
return sector number
int wheel() const
return wheel number
bool L1MuDTSecProcId::ovl ( ) const
inline

is it an overlap region Sector Processor?

Definition at line 66 of file L1MuDTSecProcId.h.

References abs, and m_wheel.

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

66 { return (abs(m_wheel) == 3) ? true : false; }
#define abs(x)
Definition: mlp_lapack.h:159
int L1MuDTSecProcId::sector ( void  ) const
inline
int L1MuDTSecProcId::wheel ( ) const
inline

Friends And Related Function Documentation

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

output stream operator

Member Data Documentation

int L1MuDTSecProcId::m_sector
private

Definition at line 89 of file L1MuDTSecProcId.h.

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

int L1MuDTSecProcId::m_wheel
private

Definition at line 88 of file L1MuDTSecProcId.h.

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