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 (int ieta, int iphi, int bx, int mip, int validbit, int wheel, int sector, int index, int link)
 
 HOTPDigiTwinMux (uint64_t data)
 
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.

19 { theTP_HO = 0; }

References theTP_HO.

◆ HOTPDigiTwinMux() [2/3]

HOTPDigiTwinMux::HOTPDigiTwinMux ( uint64_t  data)
inline

Definition at line 20 of file HOTPDigiTwinMux.h.

20 { theTP_HO = data; }

References data, and theTP_HO.

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

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 }

References funct::abs(), simKBmtfDigis_cfi::bx, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, MainPageGenerator::link, and makeMuonMisalignmentScenario::wheel.

Member Function Documentation

◆ bx()

int HOTPDigiTwinMux::bx ( ) const
inline

Definition at line 70 of file HOTPDigiTwinMux.h.

70 { return (bx_abs() * bx_sign()); }

References bx_abs(), and bx_sign().

◆ bx_abs()

int HOTPDigiTwinMux::bx_abs ( ) const
inline

get the bx()

Definition at line 63 of file HOTPDigiTwinMux.h.

63 { return (theTP_HO >> 12) & 0x1; }

References theTP_HO.

Referenced by bx().

◆ bx_sign()

int HOTPDigiTwinMux::bx_sign ( ) const
inline

get the bx sign

Definition at line 67 of file HOTPDigiTwinMux.h.

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

References theTP_HO, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by bx().

◆ id()

const HcalDetId HOTPDigiTwinMux::id ( ) const
inline

Definition at line 42 of file HOTPDigiTwinMux.h.

42 { return HcalDetId(HcalOuter, ieta(), iphi(), 4); }

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

◆ ieta()

int HOTPDigiTwinMux::ieta ( ) const
inline

get the signed ieta value

Definition at line 57 of file HOTPDigiTwinMux.h.

57 { return (ieta_abs() * ieta_sign()); }

References ieta_abs(), and ieta_sign().

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

◆ ieta_abs()

int HOTPDigiTwinMux::ieta_abs ( ) const
inline

get the absolute value of ieta

Definition at line 54 of file HOTPDigiTwinMux.h.

54 { return (theTP_HO & 0x000F); }

References theTP_HO.

Referenced by ieta().

◆ ieta_sign()

int HOTPDigiTwinMux::ieta_sign ( ) const
inline

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

Definition at line 51 of file HOTPDigiTwinMux.h.

51 { return ((theTP_HO & 0x10) ? (-1) : (+1)); }

References theTP_HO.

Referenced by ieta().

◆ index()

int HOTPDigiTwinMux::index ( ) const
inline

get the index

Definition at line 94 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

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

◆ iphi()

int HOTPDigiTwinMux::iphi ( ) const
inline

get the raw iphi value

Definition at line 60 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

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

◆ link()

int HOTPDigiTwinMux::link ( ) const
inline

get the link value

Definition at line 97 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

Referenced by operator<<().

◆ mip()

int HOTPDigiTwinMux::mip ( ) const
inline

get the mip value

Definition at line 73 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

Referenced by operator<<().

◆ raw()

uint64_t HOTPDigiTwinMux::raw ( ) const
inline

get raw packed HO

Definition at line 45 of file HOTPDigiTwinMux.h.

45 { return theTP_HO; }

References theTP_HO.

◆ raw_ieta()

int HOTPDigiTwinMux::raw_ieta ( ) const
inline

get the raw ieta value

Definition at line 48 of file HOTPDigiTwinMux.h.

48 { return theTP_HO & 0x1F; }

References theTP_HO.

◆ raw_wheel()

int HOTPDigiTwinMux::raw_wheel ( ) const
inline

get the raw wheel value

Definition at line 79 of file HOTPDigiTwinMux.h.

79 { return (theTP_HO >> 16) & 0x7; }

References theTP_HO.

◆ sector()

int HOTPDigiTwinMux::sector ( ) const
inline

get the sector value

Definition at line 91 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

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

◆ validbit()

int HOTPDigiTwinMux::validbit ( ) const
inline

get the valid bit

Definition at line 76 of file HOTPDigiTwinMux.h.

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

References theTP_HO.

Referenced by operator<<().

◆ wheel()

int HOTPDigiTwinMux::wheel ( ) const
inline

get the signed wheel value

Definition at line 88 of file HOTPDigiTwinMux.h.

88 { return (wheel_abs() * wheel_sign()); }

References wheel_abs(), and wheel_sign().

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

◆ wheel_abs()

int HOTPDigiTwinMux::wheel_abs ( ) const
inline

get the absolute value of wheel

Definition at line 85 of file HOTPDigiTwinMux.h.

85 { return (theTP_HO >> 16) & 0x03; }

References theTP_HO.

Referenced by wheel().

◆ wheel_sign()

int HOTPDigiTwinMux::wheel_sign ( ) const
inline

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

Definition at line 82 of file HOTPDigiTwinMux.h.

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

References theTP_HO, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by wheel().

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
HOTPDigiTwinMux::iphi
int iphi() const
get the raw iphi value
Definition: HOTPDigiTwinMux.h:60
HOTPDigiTwinMux::index
int index() const
get the index
Definition: HOTPDigiTwinMux.h:94
HOTPDigiTwinMux::ieta
int ieta() const
get the signed ieta value
Definition: HOTPDigiTwinMux.h:57
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HOTPDigiTwinMux::mip
int mip() const
get the mip value
Definition: HOTPDigiTwinMux.h:73
HOTPDigiTwinMux::bx
int bx() const
Definition: HOTPDigiTwinMux.h:70
HOTPDigiTwinMux::wheel
int wheel() const
get the signed wheel value
Definition: HOTPDigiTwinMux.h:88
HcalOuter
Definition: HcalAssistant.h:35
HOTPDigiTwinMux::validbit
int validbit() const
get the valid bit
Definition: HOTPDigiTwinMux.h:76
HOTPDigiTwinMux::link
int link() const
get the link value
Definition: HOTPDigiTwinMux.h:97
HOTPDigiTwinMux::wheel_sign
int wheel_sign() const
get the sign of wheel (int: +/- 1)
Definition: HOTPDigiTwinMux.h:82
HOTPDigiTwinMux::sector
int sector() const
get the sector value
Definition: HOTPDigiTwinMux.h:91
HOTPDigiTwinMux::ieta_sign
int ieta_sign() const
get the sign of ieta (int: +/- 1)
Definition: HOTPDigiTwinMux.h:51
HcalDetId
Definition: HcalDetId.h:12
HOTPDigiTwinMux::bx_abs
int bx_abs() const
get the bx()
Definition: HOTPDigiTwinMux.h:63
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
HOTPDigiTwinMux::ieta_abs
int ieta_abs() const
get the absolute value of ieta
Definition: HOTPDigiTwinMux.h:54
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HOTPDigiTwinMux::theTP_HO
uint64_t theTP_HO
Definition: HOTPDigiTwinMux.h:102
HOTPDigiTwinMux::bx_sign
int bx_sign() const
get the bx sign
Definition: HOTPDigiTwinMux.h:67
HOTPDigiTwinMux::wheel_abs
int wheel_abs() const
get the absolute value of wheel
Definition: HOTPDigiTwinMux.h:85