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
HcalQIECoder::mSlope10
float mSlope10
Definition: HcalQIECoder.h:60
HcalQIECoder::mSlope02
float mSlope02
Definition: HcalQIECoder.h:58
HcalQIECoder::mOffset00
float mOffset00
Definition: HcalQIECoder.h:40
HcalQIECoder::charge
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
HcalQIECoder::mOffset33
float mOffset33
Definition: HcalQIECoder.h:55
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HcalQIECoder::mOffset21
float mOffset21
Definition: HcalQIECoder.h:49
HcalQIECoder::mOffset11
float mOffset11
Definition: HcalQIECoder.h:45
HcalQIECoder::offset
float offset(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:47
HcalQIECoder::mOffset32
float mOffset32
Definition: HcalQIECoder.h:54
HcalQIECoder::mOffset12
float mOffset12
Definition: HcalQIECoder.h:46
HcalQIECoder::HcalQIECoder
HcalQIECoder(unsigned long fId=0)
Definition: HcalQIECoder.h:22
HcalQIECoder::mSlope20
float mSlope20
Definition: HcalQIECoder.h:64
HcalQIECoder::mSlope03
float mSlope03
Definition: HcalQIECoder.h:59
HcalQIECoder::mSlope22
float mSlope22
Definition: HcalQIECoder.h:66
HcalQIECoder::mSlope21
float mSlope21
Definition: HcalQIECoder.h:65
HcalQIECoder::mSlope12
float mSlope12
Definition: HcalQIECoder.h:62
HcalQIECoder::setOffset
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:51
HcalQIECoder::mOffset30
float mOffset30
Definition: HcalQIECoder.h:52
HcalQIECoder::mSlope23
float mSlope23
Definition: HcalQIECoder.h:67
HcalQIECoder::mOffset22
float mOffset22
Definition: HcalQIECoder.h:50
HcalQIECoder::mOffset03
float mOffset03
Definition: HcalQIECoder.h:43
HcalQIECoder::mSlope01
float mSlope01
Definition: HcalQIECoder.h:57
HcalQIECoder::mSlope32
float mSlope32
Definition: HcalQIECoder.h:70
Serializable.h
HcalQIECoder::mOffset01
float mOffset01
Definition: HcalQIECoder.h:41
HcalQIECoder::mSlope13
float mSlope13
Definition: HcalQIECoder.h:63
HcalQIECoder::mSlope33
float mSlope33
Definition: HcalQIECoder.h:71
HcalQIECoder::mSlope11
float mSlope11
Definition: HcalQIECoder.h:61
HcalQIECoder
Definition: HcalQIECoder.h:20
HcalQIECoder::rawId
uint32_t rawId() const
Definition: HcalQIECoder.h:36
HcalQIECoder::slope
float slope(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:49
HcalQIECoder::setSlope
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:59
HcalQIECoder::mSlope31
float mSlope31
Definition: HcalQIECoder.h:69
HcalQIECoder::mOffset31
float mOffset31
Definition: HcalQIECoder.h:53
HcalQIECoder::mOffset20
float mOffset20
Definition: HcalQIECoder.h:48
HcalQIECoder::mOffset23
float mOffset23
Definition: HcalQIECoder.h:51
HcalQIECoder::mSlope00
float mSlope00
Definition: HcalQIECoder.h:56
HcalQIEShape
Definition: HcalQIEShape.h:17
HcalQIECoder::mOffset13
float mOffset13
Definition: HcalQIECoder.h:47
HcalQIECoder::mOffset10
float mOffset10
Definition: HcalQIECoder.h:44
HcalQIECoder::mId
uint32_t mId
Definition: HcalQIECoder.h:39
HcalQIECoder::adc
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
Definition: HcalQIECoder.cc:25
HcalQIECoder::mSlope30
float mSlope30
Definition: HcalQIECoder.h:68
HcalQIECoder::mOffset02
float mOffset02
Definition: HcalQIECoder.h:42