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