CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HOTPDigiTwinMux Class Reference

#include <HOTPDigiTwinMux.h>

Public Types

typedef HcalDetId key_type
 

Public Member Functions

int bx () const
 
int bx_abs () const
 get the bx() More...
 
int bx_sign () const
 get the bx sign More...
 
 HOTPDigiTwinMux ()
 For the sorted collection. More...
 
 HOTPDigiTwinMux (uint64_t data)
 
 HOTPDigiTwinMux (int ieta, int iphi, int bx, int mip, int validbit, int wheel, int sector, int index, int link)
 
const HcalDetId id () const
 
int ieta () const
 get the signed ieta value More...
 
int ieta_abs () const
 get the absolute value of ieta More...
 
int ieta_sign () const
 get the sign of ieta (int: +/- 1) More...
 
int index () const
 get the index More...
 
int iphi () const
 get the raw iphi value More...
 
int link () const
 get the link value More...
 
int mip () const
 get the mip value More...
 
uint64_t raw () const
 get raw packed HO More...
 
int raw_ieta () const
 get the raw ieta value More...
 
int raw_wheel () const
 get the raw wheel value More...
 
int sector () const
 get the sector value More...
 
int validbit () const
 get the valid bit More...
 
int wheel () const
 get the signed wheel value More...
 
int wheel_abs () const
 get the absolute value of wheel More...
 
int wheel_sign () const
 get the sign of wheel (int: +/- 1) More...
 

Static Public Attributes

static const int HO_SECTOR_MAX = 12
 

Private Attributes

uint64_t theTP_HO
 

Detailed Description

Simple container packer/unpacker for HO TriggerPrimittive in TwinMUX Trigger Primitive from HO HTR

Author
Saxena, Pooja - DESY

Definition at line 15 of file HOTPDigiTwinMux.h.

Member Typedef Documentation

Definition at line 17 of file HOTPDigiTwinMux.h.

Constructor & Destructor Documentation

HOTPDigiTwinMux::HOTPDigiTwinMux ( )
inline

For the sorted collection.

Definition at line 19 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux().

19 {theTP_HO=0;}
HOTPDigiTwinMux::HOTPDigiTwinMux ( uint64_t  data)
inline

Definition at line 20 of file HOTPDigiTwinMux.h.

References bx(), data, HOTPDigiTwinMux(), ieta(), index(), iphi(), link(), mip(), sector(), theTP_HO, validbit(), and wheel().

20 {theTP_HO = data;}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
HOTPDigiTwinMux::HOTPDigiTwinMux ( int  ieta,
int  iphi,
int  bx,
int  mip,
int  validbit,
int  wheel,
int  sector,
int  index,
int  link 
)

//////////////////////////// Summary of the bits //////////////////////////// raw ieta value = theTP_HO &0 0x1F sign of ieta (int: +/- 1) = (theTP_HO &0 0x10)?(-1):(+1)) absolute value of ieta = (theTP_HO &0 0x000F) raw iphi value = (theTP_HO>>5) &0 0x007F; bx() = (theTP_HO>>12) &0 0x1; bx signn = ( ( (theTP_HO>>13) &0 0x1) ?(-1):(+1)); mip value = (theTP_HO>>14) &0 0x1; valid bit = (theTP_HO>>15) &0 0x1; raw wheel value = (theTP_HO>>16) &0 0x7; sign of wheel (int: +/- 1) = ( ( (theTP_HO>>18) &0 0x1) ?(-1):(+1)); absolute value of wheel = (theTP_HO>>16) &0 0x03; sector value = (theTP_HO>>19) &0 0xF; index = (theTP_HO>>23) &0 0x1F; link value = (theTP_HO>>28) &0 0x3;

Definition at line 7 of file HOTPDigiTwinMux.cc.

References funct::abs().

7  {
8 
9  if((ieta > 15) || (ieta < -15)) printf("HOTwinMuxDigi: ieta out of range");
10  if ((mip < 0) || (mip > 1)) printf("HOTwinMuxDigi: mip value out of range");
11 
12  theTP_HO=(std::abs(ieta)&0xF) | ((ieta<0)?(0x10) : (0x00)) |
13  ((iphi&0x7F)<<5) |
14  ((std::abs(bx)&0x1)<<12) | ((bx<0)?(0x2000) : (0x00)) |
15  ((mip&0x1)<<14) |
16  ((validbit&0x1)<<15) |
17  ((std::abs(wheel)&0x3)<<16) | ((wheel<0)?(0x40000) : (0x00)) |
18  ((sector&0xF)<<19) |
19  ((index &0x1F)<<23) | ((link&0x3)<<28);
20 }
int ieta() const
get the signed ieta value
int link() const
get the link value
int mip() const
get the mip value
int index() const
get the index
int iphi() const
get the raw iphi value
int wheel() const
get the signed wheel value
int sector() const
get the sector value
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int bx() const
int validbit() const
get the valid bit

Member Function Documentation

int HOTPDigiTwinMux::bx ( ) const
inline

Definition at line 70 of file HOTPDigiTwinMux.h.

References bx_abs(), and bx_sign().

Referenced by HOTPDigiTwinMux().

70 {return (bx_abs() * bx_sign()); }
int bx_abs() const
get the bx()
int bx_sign() const
get the bx sign
int HOTPDigiTwinMux::bx_abs ( ) const
inline

get the bx()

Definition at line 63 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by bx().

63 {return (theTP_HO>>12)&0x1; }
int HOTPDigiTwinMux::bx_sign ( ) const
inline

get the bx sign

Definition at line 67 of file HOTPDigiTwinMux.h.

References theTP_HO, and globals_cff::x1.

Referenced by bx().

67 {return ( ( (theTP_HO>>13)&0x1) ?(-1):(+1)); }
const HcalDetId HOTPDigiTwinMux::id ( ) const
inline

Definition at line 42 of file HOTPDigiTwinMux.h.

References HcalOuter, ieta(), and iphi().

42 { return HcalDetId(HcalOuter,ieta(),iphi(),4); }
int ieta() const
get the signed ieta value
int iphi() const
get the raw iphi value
int HOTPDigiTwinMux::ieta ( ) const
inline

get the signed ieta value

Definition at line 57 of file HOTPDigiTwinMux.h.

References ieta_abs(), and ieta_sign().

Referenced by HOTPDigiTwinMux(), id(), and operator<<().

57 {return (ieta_abs() * ieta_sign()); }
int ieta_sign() const
get the sign of ieta (int: +/- 1)
int ieta_abs() const
get the absolute value of ieta
int HOTPDigiTwinMux::ieta_abs ( ) const
inline

get the absolute value of ieta

Definition at line 54 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by ieta().

54 {return (theTP_HO&0x000F); }
int HOTPDigiTwinMux::ieta_sign ( ) const
inline

get the sign of ieta (int: +/- 1)

Definition at line 51 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by ieta().

51 {return ( (theTP_HO&0x10)?(-1):(+1)); }
int HOTPDigiTwinMux::index ( ) const
inline

get the index

Definition at line 94 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), BeautifulSoup.PageElement::insert(), and operator<<().

94 {return (theTP_HO>>23)&0x1F; } //channel index in Twinmux protocal
int HOTPDigiTwinMux::iphi ( ) const
inline

get the raw iphi value

Definition at line 60 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), id(), and operator<<().

60 {return (theTP_HO>>5)&0x007F; }
int HOTPDigiTwinMux::link ( ) const
inline

get the link value

Definition at line 97 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), and operator<<().

97 {return (theTP_HO>>28)&0x3; } //two link for all HO wheels
int HOTPDigiTwinMux::mip ( ) const
inline

get the mip value

Definition at line 73 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), and operator<<().

73 {return (theTP_HO>>14)&0x1; }
uint64_t HOTPDigiTwinMux::raw ( ) const
inline

get raw packed HO

Definition at line 45 of file HOTPDigiTwinMux.h.

References theTP_HO.

45 {return theTP_HO; }
int HOTPDigiTwinMux::raw_ieta ( ) const
inline

get the raw ieta value

Definition at line 48 of file HOTPDigiTwinMux.h.

References theTP_HO.

48 {return theTP_HO&0x1F; }
int HOTPDigiTwinMux::raw_wheel ( ) const
inline

get the raw wheel value

Definition at line 79 of file HOTPDigiTwinMux.h.

References theTP_HO.

79 {return (theTP_HO>>16)&0x7; }
int HOTPDigiTwinMux::sector ( ) const
inline

get the sector value

Definition at line 91 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), geometryXMLparser.DTAlignable::index(), and operator<<().

91 {return (theTP_HO>>19)&0xF; }
int HOTPDigiTwinMux::validbit ( ) const
inline

get the valid bit

Definition at line 76 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by HOTPDigiTwinMux(), and operator<<().

76 {return (theTP_HO>>15)&0x1; } //MIP consistency check with HO FEDs
int HOTPDigiTwinMux::wheel ( ) const
inline

get the signed wheel value

Definition at line 88 of file HOTPDigiTwinMux.h.

References wheel_abs(), and wheel_sign().

Referenced by HOTPDigiTwinMux(), geometryXMLparser.DTAlignable::index(), and operator<<().

88 {return (wheel_abs() * wheel_sign()); }
int wheel_sign() const
get the sign of wheel (int: +/- 1)
int wheel_abs() const
get the absolute value of wheel
int HOTPDigiTwinMux::wheel_abs ( ) const
inline

get the absolute value of wheel

Definition at line 85 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by wheel().

85 {return (theTP_HO>>16)&0x03; }
int HOTPDigiTwinMux::wheel_sign ( ) const
inline

get the sign of wheel (int: +/- 1)

Definition at line 82 of file HOTPDigiTwinMux.h.

References theTP_HO, and globals_cff::x1.

Referenced by wheel().

82 {return ( ( (theTP_HO>>18)&0x1) ?(-1):(+1)); }

Member Data Documentation

const int HOTPDigiTwinMux::HO_SECTOR_MAX = 12
static

Definition at line 99 of file HOTPDigiTwinMux.h.

uint64_t HOTPDigiTwinMux::theTP_HO
private