CMS 3D CMS Logo

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