CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/CondFormats/HcalObjects/interface/HcalMCParam.h

Go to the documentation of this file.
00001 #ifndef HcalMCParam_h
00002 #define HcalMCParam_h
00003 
00010 #include <boost/cstdint.hpp>
00011 
00012 // definition 8.Feb.2011
00013 // MC signal shape integer variable assigned to each readout this way:
00014 // 0 - regular HPD  HB/HE/HO shape
00015 // 1 - "special" HB shape
00016 // 2 - SiPMs shape (HO, possibly also in HB/HE)
00017 // 3 - HF Shape
00018 // 4 - ZDC shape 
00019 // 
00020 // change in definition  28.Oct.2011  sk
00021 // mParam1 is now packed word.
00022 //   pulseShapeID                              [0,500]          9 bits  (use this as phot0 detetor ID as well)
00023 //   syncPhase = cms.bool(True),               bool             1 bit   (use this for QPLL unlocked channel)
00024 //   binOfMaximum = cms.int32(5)               [1-10]           4 bits
00025 //   timePhase = cms.double(5.0),              [-30.0,30.0]     8 bits  (0.25ns step)
00026 //   timeSmearing = cms.bool(False)            bool             1 bit  
00027 //   packingScheme                                              4 bits
00028 class HcalMCParam {
00029  public:
00030   HcalMCParam():mId(0), mParam1(0) {}
00031 
00032   HcalMCParam(unsigned long fId, unsigned int fParam1):
00033     mId(fId), mParam1(fParam1) {}
00034 
00035   uint32_t rawId () const {return mId;}
00036 
00037   unsigned int param1() const {return mParam1;}
00038   unsigned int signalShape() const {return mParam1&0x1FF;}
00039   bool         syncPhase() const {return (mParam1>>9)&0x1;}
00040   unsigned int binOfMaximum() const {return (mParam1>>10)&0xF;}
00041   float        timePhase() const {return ((mParam1>>14)&0xFF)/4.0-32.0;}
00042   bool         timeSmearing() const {return (mParam1>>22)&0x1;}
00043   unsigned int packingScheme() const {return (mParam1>>27)&0xF;}
00044 
00045 
00046  private:
00047 
00048   uint32_t mId;
00049   uint32_t mParam1;
00050 };
00051 
00052 #endif