#include <HOTriggerPrimitiveDigi.h>
Public Types | |
typedef HcalDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
int | bits () const |
get the single-bit data | |
bool | data (int whichbit=HO_TP_SAMPLES_MAX) const |
HOTriggerPrimitiveDigi (uint32_t data) | |
HOTriggerPrimitiveDigi (int ieta, int iphi, int nsamples, int whichSampleTriggered, int databits) | |
HOTriggerPrimitiveDigi () | |
const HcalDetId | id () const |
int | ieta () const |
get the signed ieta value | |
int | ieta_abs () const |
get the absolute value of ieta | |
int | ieta_sign () const |
get the sign of ieta (int: +/- 1) | |
int | iphi () const |
get the iphi value | |
int | nsamples () const |
get the number of samples used to compute the TP | |
uint32_t | operator() () |
for streaming | |
uint32_t | raw () const |
get the raw (packed) Triger Primitive | |
int | raw_ieta () const |
get the raw ieta value | |
int | whichSampleTriggered () const |
get the number of the triggering sample | |
Static Public Attributes | |
static const int | HO_TP_SAMPLES_MAX = 10 |
Private Attributes | |
uint32_t | theHO_TP |
Definition at line 17 of file HOTriggerPrimitiveDigi.h.
For the sorted collection.
Definition at line 19 of file HOTriggerPrimitiveDigi.h.
HOTriggerPrimitiveDigi::HOTriggerPrimitiveDigi | ( | ) | [inline] |
HOTriggerPrimitiveDigi::HOTriggerPrimitiveDigi | ( | uint32_t | data | ) | [inline] |
HOTriggerPrimitiveDigi::HOTriggerPrimitiveDigi | ( | int | ieta, |
int | iphi, | ||
int | nsamples, | ||
int | whichSampleTriggered, | ||
int | databits | ||
) |
Definition at line 4 of file HOTriggerPrimitiveDigi.cc.
References abs, HO_TP_SAMPLES_MAX, nsamples(), ExpressReco_HICollisions_FallBack::samples, and theHO_TP.
{ if ((nsamples<0) || (nsamples>HO_TP_SAMPLES_MAX)) printf("HOTRiggerPrimitiveDigi: nsamples out of range."); if ((whichSampleTriggered<0) || (whichSampleTriggered>nsamples)) printf("HOTriggerPrimitiveDigi: specified Triggering Sample out of range"); if ( (databits>>nsamples) != 0x0000) printf("HOTRiggerPrimitiveDigi: Specified extra bits out of nsamples range."); int samples=nsamples; if (samples<0) samples=0; if (samples>HO_TP_SAMPLES_MAX) samples=HO_TP_SAMPLES_MAX; theHO_TP=(abs(ieta)&0xf) | ((ieta<0)?(0x10):(0x00)) | ((iphi&0x7F)<<5) | ((samples&0xF)<<12) | (((whichSampleTriggered)&0xF)<<16) | ((databits&0x3FF)<<20); }
int HOTriggerPrimitiveDigi::bits | ( | ) | const [inline] |
get the single-bit data
Definition at line 44 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
{ return (theHO_TP>>20)&0x03FF; }
bool HOTriggerPrimitiveDigi::data | ( | int | whichbit = HO_TP_SAMPLES_MAX | ) | const |
get one bit from the single-bit data. required to be called with a legal value.
Definition at line 21 of file HOTriggerPrimitiveDigi.cc.
References nsamples(), and theHO_TP.
Referenced by HOTriggerPrimitiveDigi(), and operator<<().
const HcalDetId HOTriggerPrimitiveDigi::id | ( | void | ) | const [inline] |
int HOTriggerPrimitiveDigi::ieta | ( | ) | const [inline] |
get the signed ieta value
Definition at line 36 of file HOTriggerPrimitiveDigi.h.
References ieta_abs(), and ieta_sign().
Referenced by id(), and operator<<().
int HOTriggerPrimitiveDigi::ieta_abs | ( | ) | const [inline] |
get the absolute value of ieta
Definition at line 34 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
Referenced by ieta().
{ return (theHO_TP&0x000F); }
int HOTriggerPrimitiveDigi::ieta_sign | ( | ) | const [inline] |
get the sign of ieta (int: +/- 1)
Definition at line 32 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
Referenced by ieta().
{ return ((theHO_TP&0x10)?(-1):(1)); }
int HOTriggerPrimitiveDigi::iphi | ( | ) | const [inline] |
get the iphi value
Definition at line 38 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
Referenced by id(), and operator<<().
{ return (theHO_TP>>5)&0x007F; }
int HOTriggerPrimitiveDigi::nsamples | ( | ) | const [inline] |
get the number of samples used to compute the TP
Definition at line 40 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
Referenced by data(), HOTriggerPrimitiveDigi(), and operator<<().
{ return (theHO_TP>>12)&0x000F; }
uint32_t HOTriggerPrimitiveDigi::operator() | ( | ) | [inline] |
for streaming
Definition at line 53 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
{ return theHO_TP; }
uint32_t HOTriggerPrimitiveDigi::raw | ( | ) | const [inline] |
get the raw (packed) Triger Primitive
Definition at line 28 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
{ return theHO_TP; }
int HOTriggerPrimitiveDigi::raw_ieta | ( | ) | const [inline] |
get the raw ieta value
Definition at line 30 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
{ return theHO_TP&0x1F; }
int HOTriggerPrimitiveDigi::whichSampleTriggered | ( | ) | const [inline] |
get the number of the triggering sample
Definition at line 42 of file HOTriggerPrimitiveDigi.h.
References theHO_TP.
Referenced by operator<<().
{ return (theHO_TP>>16)&0x000F; }
const int HOTriggerPrimitiveDigi::HO_TP_SAMPLES_MAX = 10 [static] |
Definition at line 46 of file HOTriggerPrimitiveDigi.h.
Referenced by HOTriggerPrimitiveDigi().
uint32_t HOTriggerPrimitiveDigi::theHO_TP [private] |
Definition at line 56 of file HOTriggerPrimitiveDigi.h.
Referenced by bits(), data(), HOTriggerPrimitiveDigi(), ieta_abs(), ieta_sign(), iphi(), nsamples(), operator()(), raw(), raw_ieta(), and whichSampleTriggered().