CMS 3D CMS Logo

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