CMS 3D CMS Logo

HcalQIECoder.h
Go to the documentation of this file.
1 #ifndef HcalQIECoder_h
2 #define HcalQIECoder_h
3 
13 
14 #include <vector>
15 #include <algorithm>
16 #include <cstdint>
17 
18 class HcalQIEShape;
19 
20 class HcalQIECoder {
21 public:
22  HcalQIECoder(unsigned long fId = 0) : mId(fId) {}
23 
25  float charge(const HcalQIEShape& fShape, unsigned fAdc, unsigned fCapId) const;
27  unsigned adc(const HcalQIEShape& fShape, float fCharge, unsigned fCapId) const;
28 
29  // following methods are not for use by consumers
30  float offset(unsigned fCapId, unsigned fRange) const;
31  float slope(unsigned fCapId, unsigned fRange) const;
32 
33  void setOffset(unsigned fCapId, unsigned fRange, float fValue);
34  void setSlope(unsigned fCapId, unsigned fRange, float fValue);
35 
36  uint32_t rawId() const { return mId; }
37 
38 private:
39  uint32_t mId;
40  float mOffset00;
41  float mOffset01;
42  float mOffset02;
43  float mOffset03;
44  float mOffset10;
45  float mOffset11;
46  float mOffset12;
47  float mOffset13;
48  float mOffset20;
49  float mOffset21;
50  float mOffset22;
51  float mOffset23;
52  float mOffset30;
53  float mOffset31;
54  float mOffset32;
55  float mOffset33;
56  float mSlope00;
57  float mSlope01;
58  float mSlope02;
59  float mSlope03;
60  float mSlope10;
61  float mSlope11;
62  float mSlope12;
63  float mSlope13;
64  float mSlope20;
65  float mSlope21;
66  float mSlope22;
67  float mSlope23;
68  float mSlope30;
69  float mSlope31;
70  float mSlope32;
71  float mSlope33;
72 
74 };
75 
76 #endif
float mOffset21
Definition: HcalQIECoder.h:49
float mOffset10
Definition: HcalQIECoder.h:44
float mSlope30
Definition: HcalQIECoder.h:68
float mOffset12
Definition: HcalQIECoder.h:46
float mOffset11
Definition: HcalQIECoder.h:45
float mOffset32
Definition: HcalQIECoder.h:54
float mSlope20
Definition: HcalQIECoder.h:64
float mSlope12
Definition: HcalQIECoder.h:62
float mSlope22
Definition: HcalQIECoder.h:66
float mSlope21
Definition: HcalQIECoder.h:65
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:51
float mSlope23
Definition: HcalQIECoder.h:67
float mOffset22
Definition: HcalQIECoder.h:50
float mSlope13
Definition: HcalQIECoder.h:63
float offset(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:47
float mSlope33
Definition: HcalQIECoder.h:71
HcalQIECoder(unsigned long fId=0)
Definition: HcalQIECoder.h:22
float mSlope03
Definition: HcalQIECoder.h:59
float slope(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:49
float mOffset31
Definition: HcalQIECoder.h:53
float mOffset03
Definition: HcalQIECoder.h:43
float mOffset30
Definition: HcalQIECoder.h:52
uint32_t mId
Definition: HcalQIECoder.h:39
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
Definition: HcalQIECoder.cc:25
float mOffset13
Definition: HcalQIECoder.h:47
#define COND_SERIALIZABLE
Definition: Serializable.h:39
float mSlope01
Definition: HcalQIECoder.h:57
float mOffset02
Definition: HcalQIECoder.h:42
float mSlope32
Definition: HcalQIECoder.h:70
float mOffset01
Definition: HcalQIECoder.h:41
float mSlope11
Definition: HcalQIECoder.h:61
float mSlope31
Definition: HcalQIECoder.h:69
float mSlope10
Definition: HcalQIECoder.h:60
uint32_t rawId() const
Definition: HcalQIECoder.h:36
float mOffset33
Definition: HcalQIECoder.h:55
float mOffset23
Definition: HcalQIECoder.h:51
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:59
float mOffset20
Definition: HcalQIECoder.h:48
float mSlope02
Definition: HcalQIECoder.h:58
float mOffset00
Definition: HcalQIECoder.h:40
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
float mSlope00
Definition: HcalQIECoder.h:56