CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/HcalObjects/interface/HcalRecoParam.h

Go to the documentation of this file.
00001 #ifndef HcalRecoParam_h
00002 #define HcalRecoParam_h
00003 
00013 #include <boost/cstdint.hpp>
00014 
00015 class HcalRecoParam {
00016  public:
00017   HcalRecoParam():mId(0), mParam1(0), mParam2(0) {}
00018 
00019   HcalRecoParam(unsigned long fId, unsigned int fParam1, unsigned int fParam2):
00020     mId(fId), mParam1(fParam1), mParam2(fParam2) {}
00021 
00022   uint32_t rawId () const {return mId;}
00023 
00024   unsigned int param1() const {return mParam1;}
00025   unsigned int param2() const {return mParam2;}
00026 
00027   bool correctForPhaseContainment() const {return mParam1&0x1;}
00028   bool correctForLeadingEdge() const {return (mParam1>>1)&0x1;}
00029   float correctionPhaseNS() const {return ((mParam1>>2)&0xFF)/4.-32.;}
00030   unsigned int firstSample() const {return  (mParam1<10)?(mParam1):((mParam1>>10)&0xF);}
00031   unsigned int samplesToAdd() const {return (mParam1<10)?(mParam2):((mParam1>>14)&0xF);}
00032   unsigned int pulseShapeID() const {return (mParam1>>18)&0x1FF;}
00033 
00034   bool useLeakCorrection () const {return mParam2&0x1;}
00035   unsigned int leakCorrectionID () const {return (mParam2>>1)&0xF;}
00036   bool correctForTimeslew () const {return (mParam2>>5)&0x1;}
00037   unsigned int timeslewCorrectionID () const {return (mParam2>>6)&0xF;}
00038   bool correctTiming () const {return (mParam2>>10)&0x1;}
00039   unsigned int firstAuxTS () const { return (mParam2>>11)&0xF;}
00040   unsigned int specialCaseID () const {return (mParam2>>15)&0xF;}
00041   unsigned int noiseFlaggingID () const {return (mParam2>>19)&0xF;}
00042   unsigned int pileupCleaningID () const {return (mParam2>>23)&0xF;}
00043   unsigned int packingScheme () const {return (mParam2>>27)&0xF;}
00044 
00045  private:
00046   uint32_t mId;
00047   uint32_t mParam1;
00048   uint32_t mParam2;
00049 };
00050 
00051 #endif