CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalMCParam.h
Go to the documentation of this file.
1 #ifndef HcalMCParam_h
2 #define HcalMCParam_h
3 
11 
12 #include <boost/cstdint.hpp>
13 
14 // definition 8.Feb.2011
15 // MC signal shape integer variable assigned to each readout this way:
16 // 0 - regular HPD HB/HE/HO shape
17 // 1 - "special" HB shape
18 // 2 - SiPMs shape (HO, possibly also in HB/HE)
19 // 3 - HF Shape
20 // 4 - ZDC shape
21 //
22 // change in definition 28.Oct.2011 sk
23 // mParam1 is now packed word.
24 // pulseShapeID [0,500] 9 bits (use this as phot0 detetor ID as well)
25 // syncPhase = cms.bool(True), bool 1 bit (use this for QPLL unlocked channel)
26 // binOfMaximum = cms.int32(5) [1-10] 4 bits
27 // timePhase = cms.double(5.0), [-30.0,30.0] 8 bits (0.25ns step)
28 // timeSmearing = cms.bool(False) bool 1 bit
29 // packingScheme 4 bits
30 class HcalMCParam {
31  public:
32  HcalMCParam():mId(0), mParam1(0) {}
33 
34  HcalMCParam(unsigned long fId, unsigned int fParam1):
35  mId(fId), mParam1(fParam1) {}
36 
37  uint32_t rawId () const {return mId;}
38 
39  unsigned int param1() const {return mParam1;}
40  unsigned int signalShape() const {return mParam1&0x1FF;}
41  bool syncPhase() const {return (mParam1>>9)&0x1;}
42  unsigned int binOfMaximum() const {return (mParam1>>10)&0xF;}
43  float timePhase() const {return ((mParam1>>14)&0xFF)/4.0-32.0;}
44  bool timeSmearing() const {return (mParam1>>22)&0x1;}
45  unsigned int packingScheme() const {return (mParam1>>27)&0xF;}
46 
47 
48  private:
49 
50  uint32_t mId;
51  uint32_t mParam1;
52 
54 };
55 
56 #endif
float timePhase() const
Definition: HcalMCParam.h:43
uint32_t mParam1
Definition: HcalMCParam.h:51
bool timeSmearing() const
Definition: HcalMCParam.h:44
unsigned int packingScheme() const
Definition: HcalMCParam.h:45
unsigned int param1() const
Definition: HcalMCParam.h:39
bool syncPhase() const
Definition: HcalMCParam.h:41
uint32_t rawId() const
Definition: HcalMCParam.h:37
HcalMCParam(unsigned long fId, unsigned int fParam1)
Definition: HcalMCParam.h:34
unsigned int signalShape() const
Definition: HcalMCParam.h:40
#define COND_SERIALIZABLE
Definition: Serializable.h:37
uint32_t mId
Definition: HcalMCParam.h:50
unsigned int binOfMaximum() const
Definition: HcalMCParam.h:42