CMS 3D CMS Logo

HcalRecoParam.h
Go to the documentation of this file.
1 #ifndef HcalRecoParam_h
2 #define HcalRecoParam_h
3 
14 
15 #include <boost/cstdint.hpp>
16 
18  public:
20 
21  constexpr HcalRecoParam(unsigned long fId, unsigned int fParam1, unsigned int fParam2):
22  mId(fId), mParam1(fParam1), mParam2(fParam2) {}
23 
24  constexpr uint32_t rawId () const {return mId;}
25 
26  constexpr unsigned int param1() const {return mParam1;}
27  constexpr unsigned int param2() const {return mParam2;}
28 
29  constexpr bool correctForPhaseContainment() const {return mParam1&0x1;}
30  constexpr bool correctForLeadingEdge() const {return (mParam1>>1)&0x1;}
31  constexpr float correctionPhaseNS() const {return ((mParam1>>2)&0xFF)/4.-32.;}
32  constexpr unsigned int firstSample() const {return (mParam1<10)?(mParam1):((mParam1>>10)&0xF);}
33  constexpr unsigned int samplesToAdd() const {return (mParam1<10)?(mParam2):((mParam1>>14)&0xF);}
34  constexpr unsigned int pulseShapeID() const {return (mParam1>>18)&0x1FF;}
35 
36  constexpr bool useLeakCorrection () const {return mParam2&0x1;}
37  constexpr unsigned int leakCorrectionID () const {return (mParam2>>1)&0xF;}
38  constexpr bool correctForTimeslew () const {return (mParam2>>5)&0x1;}
39  constexpr unsigned int timeslewCorrectionID () const {return (mParam2>>6)&0xF;}
40  constexpr bool correctTiming () const {return (mParam2>>10)&0x1;}
41  constexpr unsigned int firstAuxTS () const { return (mParam2>>11)&0xF;}
42  constexpr unsigned int specialCaseID () const {return (mParam2>>15)&0xF;}
43  constexpr unsigned int noiseFlaggingID () const {return (mParam2>>19)&0xF;}
44  constexpr unsigned int pileupCleaningID () const {return (mParam2>>23)&0xF;}
45  constexpr unsigned int packingScheme () const {return (mParam2>>27)&0xF;}
46 
47  private:
48  uint32_t mId;
49  uint32_t mParam1;
50  uint32_t mParam2;
51 
53 };
54 
55 #endif
constexpr unsigned int pulseShapeID() const
Definition: HcalRecoParam.h:34
constexpr unsigned int param2() const
Definition: HcalRecoParam.h:27
constexpr unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:33
constexpr HcalRecoParam()
Definition: HcalRecoParam.h:19
constexpr unsigned int pileupCleaningID() const
Definition: HcalRecoParam.h:44
uint32_t mId
Definition: HcalRecoParam.h:48
constexpr uint32_t rawId() const
Definition: HcalRecoParam.h:24
constexpr unsigned int timeslewCorrectionID() const
Definition: HcalRecoParam.h:39
uint32_t mParam2
Definition: HcalRecoParam.h:50
constexpr unsigned int noiseFlaggingID() const
Definition: HcalRecoParam.h:43
constexpr float correctionPhaseNS() const
Definition: HcalRecoParam.h:31
constexpr unsigned int firstAuxTS() const
Definition: HcalRecoParam.h:41
constexpr bool correctTiming() const
Definition: HcalRecoParam.h:40
constexpr bool useLeakCorrection() const
Definition: HcalRecoParam.h:36
constexpr bool correctForPhaseContainment() const
Definition: HcalRecoParam.h:29
constexpr bool correctForTimeslew() const
Definition: HcalRecoParam.h:38
constexpr HcalRecoParam(unsigned long fId, unsigned int fParam1, unsigned int fParam2)
Definition: HcalRecoParam.h:21
constexpr bool correctForLeadingEdge() const
Definition: HcalRecoParam.h:30
#define COND_SERIALIZABLE
Definition: Serializable.h:38
constexpr unsigned int param1() const
Definition: HcalRecoParam.h:26
constexpr unsigned int leakCorrectionID() const
Definition: HcalRecoParam.h:37
constexpr unsigned int packingScheme() const
Definition: HcalRecoParam.h:45
constexpr unsigned int specialCaseID() const
Definition: HcalRecoParam.h:42
#define constexpr
constexpr unsigned int firstSample() const
Definition: HcalRecoParam.h:32
uint32_t mParam1
Definition: HcalRecoParam.h:49