CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HOTriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HOTRIGGERPRIMITIVEDIGI_H
2 #define DIGIHCAL_HOTRIGGERPRIMITIVEDIGI_H
3 
4 #include <boost/cstdint.hpp>
5 #include <ostream>
7 
18 public:
19  typedef HcalDetId key_type;
20 
23  HOTriggerPrimitiveDigi(int ieta, int iphi, int nsamples, int whichSampleTriggered, int databits);
24 
25  const HcalDetId id() const { return HcalDetId(HcalOuter,ieta(),iphi(),4); }
26 
28  uint32_t raw() const { return theHO_TP; }
30  int raw_ieta() const { return theHO_TP&0x1F; }
32  int ieta_sign() const { return ((theHO_TP&0x10)?(-1):(1)); }
34  int ieta_abs() const { return (theHO_TP&0x000F); }
36  int ieta() const { return ieta_abs()*ieta_sign(); }
38  int iphi() const { return (theHO_TP>>5)&0x007F; }
40  int nsamples() const { return (theHO_TP>>12)&0x000F; }
42  int whichSampleTriggered() const { return (theHO_TP>>16)&0x000F; }
44  int bits() const { return (theHO_TP>>20)&0x03FF; }
45 
46  static const int HO_TP_SAMPLES_MAX = 10;
47 
50  bool data(int whichbit=HO_TP_SAMPLES_MAX) const;
51 
53  uint32_t operator()() { return theHO_TP; }
54 
55 private:
56  uint32_t theHO_TP;
57 };
58 
59 std::ostream& operator<<(std::ostream&, const HOTriggerPrimitiveDigi&);
60 
61 #endif
int raw_ieta() const
get the raw ieta value
int bits() const
get the single-bit data
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static const int HO_TP_SAMPLES_MAX
int iphi() const
get the iphi value
HcalDetId key_type
For the sorted collection.
int ieta_abs() const
get the absolute value of ieta
uint32_t raw() const
get the raw (packed) Triger Primitive
const HcalDetId id() const
uint32_t operator()()
for streaming
HOTriggerPrimitiveDigi(uint32_t data)
int ieta_sign() const
get the sign of ieta (int: +/- 1)
bool data(int whichbit=HO_TP_SAMPLES_MAX) const
int ieta() const
get the signed ieta value
int nsamples() const
get the number of samples used to compute the TP
int whichSampleTriggered() const
get the number of the triggering sample