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