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

◆ key_type

Definition at line 17 of file HOTPDigiTwinMux.h.

Constructor & Destructor Documentation

◆ HOTPDigiTwinMux() [1/3]

HOTPDigiTwinMux::HOTPDigiTwinMux ( )
inline

For the sorted collection.

Definition at line 19 of file HOTPDigiTwinMux.h.

References theTP_HO.

19 { theTP_HO = 0; }

◆ HOTPDigiTwinMux() [2/3]

HOTPDigiTwinMux::HOTPDigiTwinMux ( uint64_t  data)
inline

Definition at line 20 of file HOTPDigiTwinMux.h.

References data, and theTP_HO.

20 { theTP_HO = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ HOTPDigiTwinMux() [3/3]

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(), simKBmtfDigis_cfi::bx, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and makeMuonMisalignmentScenario::wheel.

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

Member Function Documentation

◆ bx()

int HOTPDigiTwinMux::bx ( ) const
inline

Definition at line 70 of file HOTPDigiTwinMux.h.

References bx_abs(), and bx_sign().

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

◆ bx_abs()

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; }

◆ bx_sign()

int HOTPDigiTwinMux::bx_sign ( ) const
inline

get the bx sign

Definition at line 67 of file HOTPDigiTwinMux.h.

References theTP_HO, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by bx().

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

◆ id()

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

◆ ieta()

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 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

◆ ieta_abs()

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); }

◆ ieta_sign()

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)); }

◆ index()

int HOTPDigiTwinMux::index ( ) const
inline

get the index

Definition at line 94 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by operator<<().

94 { return (theTP_HO >> 23) & 0x1F; } //channel index in Twinmux protocal

◆ iphi()

int HOTPDigiTwinMux::iphi ( ) const
inline

get the raw iphi value

Definition at line 60 of file HOTPDigiTwinMux.h.

References theTP_HO.

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

60 { return (theTP_HO >> 5) & 0x007F; }

◆ link()

int HOTPDigiTwinMux::link ( ) const
inline

get the link value

Definition at line 97 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by operator<<().

97 { return (theTP_HO >> 28) & 0x3; } //two link for all HO wheels

◆ mip()

int HOTPDigiTwinMux::mip ( ) const
inline

get the mip value

Definition at line 73 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by operator<<().

73 { return (theTP_HO >> 14) & 0x1; }

◆ raw()

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; }

◆ raw_ieta()

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; }

◆ raw_wheel()

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; }

◆ sector()

int HOTPDigiTwinMux::sector ( ) const
inline

get the sector value

Definition at line 91 of file HOTPDigiTwinMux.h.

References theTP_HO.

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

91 { return (theTP_HO >> 19) & 0xF; }

◆ validbit()

int HOTPDigiTwinMux::validbit ( ) const
inline

get the valid bit

Definition at line 76 of file HOTPDigiTwinMux.h.

References theTP_HO.

Referenced by operator<<().

76 { return (theTP_HO >> 15) & 0x1; } //MIP consistency check with HO FEDs

◆ wheel()

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 geometryXMLparser.DTAlignable::index(), and operator<<().

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

◆ wheel_abs()

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; }

◆ wheel_sign()

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 testProducerWithPsetDescEmpty_cfi::x1.

Referenced by wheel().

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

Member Data Documentation

◆ HO_SECTOR_MAX

const int HOTPDigiTwinMux::HO_SECTOR_MAX = 12
static

Definition at line 99 of file HOTPDigiTwinMux.h.

◆ theTP_HO

uint64_t HOTPDigiTwinMux::theTP_HO
private