CMS 3D CMS Logo

CastorQIECoder.h
Go to the documentation of this file.
1 #ifndef CastorQIECoder_h
2 #define CastorQIECoder_h
3 
14 
15 #include <vector>
16 #include <algorithm>
17 #include <cstdint>
18 
19 class CastorQIEShape;
20 
22 public:
23  CastorQIECoder(unsigned long fId = 0)
24  : mId(fId),
25  mOffset00(0),
26  mOffset01(0),
27  mOffset02(0),
28  mOffset03(0),
29  mOffset10(0),
30  mOffset11(0),
31  mOffset12(0),
32  mOffset13(0),
33  mOffset20(0),
34  mOffset21(0),
35  mOffset22(0),
36  mOffset23(0),
37  mOffset30(0),
38  mOffset31(0),
39  mOffset32(0),
40  mOffset33(0),
41  mSlope00(0),
42  mSlope01(0),
43  mSlope02(0),
44  mSlope03(0),
45  mSlope10(0),
46  mSlope11(0),
47  mSlope12(0),
48  mSlope13(0),
49  mSlope20(0),
50  mSlope21(0),
51  mSlope22(0),
52  mSlope23(0),
53  mSlope30(0),
54  mSlope31(0),
55  mSlope32(0),
56  mSlope33(0){};
57 
59  float charge(const CastorQIEShape& fShape, unsigned fAdc, unsigned fCapId) const;
61  unsigned adc(const CastorQIEShape& fShape, float fCharge, unsigned fCapId) const;
62 
63  // following methods are not for use by consumers
64  float offset(unsigned fCapId, unsigned fRange) const;
65  float slope(unsigned fCapId, unsigned fRange) const;
66 
67  void setOffset(unsigned fCapId, unsigned fRange, float fValue);
68  void setSlope(unsigned fCapId, unsigned fRange, float fValue);
69 
70  uint32_t rawId() const { return mId; }
71 
72 private:
73  uint32_t mId;
74  float mOffset00;
75  float mOffset01;
76  float mOffset02;
77  float mOffset03;
78  float mOffset10;
79  float mOffset11;
80  float mOffset12;
81  float mOffset13;
82  float mOffset20;
83  float mOffset21;
84  float mOffset22;
85  float mOffset23;
86  float mOffset30;
87  float mOffset31;
88  float mOffset32;
89  float mOffset33;
90  float mSlope00;
91  float mSlope01;
92  float mSlope02;
93  float mSlope03;
94  float mSlope10;
95  float mSlope11;
96  float mSlope12;
97  float mSlope13;
98  float mSlope20;
99  float mSlope21;
100  float mSlope22;
101  float mSlope23;
102  float mSlope30;
103  float mSlope31;
104  float mSlope32;
105  float mSlope33;
106 
108 };
109 
110 #endif
CastorQIECoder::rawId
uint32_t rawId() const
Definition: CastorQIECoder.h:70
CastorQIECoder::mOffset11
float mOffset11
Definition: CastorQIECoder.h:79
CastorQIECoder::mSlope01
float mSlope01
Definition: CastorQIECoder.h:91
CastorQIECoder::slope
float slope(unsigned fCapId, unsigned fRange) const
Definition: CastorQIECoder.cc:44
CastorQIECoder::mSlope22
float mSlope22
Definition: CastorQIECoder.h:100
CastorQIECoder::setOffset
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
Definition: CastorQIECoder.cc:46
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
CastorQIECoder::mSlope23
float mSlope23
Definition: CastorQIECoder.h:101
CastorQIECoder::mSlope32
float mSlope32
Definition: CastorQIECoder.h:104
CastorQIECoder::mSlope02
float mSlope02
Definition: CastorQIECoder.h:92
CastorQIECoder::mOffset22
float mOffset22
Definition: CastorQIECoder.h:84
CastorQIECoder::mOffset31
float mOffset31
Definition: CastorQIECoder.h:87
CastorQIECoder::mOffset33
float mOffset33
Definition: CastorQIECoder.h:89
CastorQIECoder::mId
uint32_t mId
Definition: CastorQIECoder.h:73
CastorQIECoder::CastorQIECoder
CastorQIECoder(unsigned long fId=0)
Definition: CastorQIECoder.h:23
CastorQIECoder::mOffset01
float mOffset01
Definition: CastorQIECoder.h:75
CastorQIECoder::mSlope21
float mSlope21
Definition: CastorQIECoder.h:99
CastorQIECoder::mOffset20
float mOffset20
Definition: CastorQIECoder.h:82
CastorQIECoder::mOffset13
float mOffset13
Definition: CastorQIECoder.h:81
CastorQIECoder::mSlope20
float mSlope20
Definition: CastorQIECoder.h:98
CastorQIECoder::mSlope31
float mSlope31
Definition: CastorQIECoder.h:103
CastorQIECoder::mSlope10
float mSlope10
Definition: CastorQIECoder.h:94
CastorQIECoder::charge
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: CastorQIECoder.cc:17
CastorQIECoder::mSlope11
float mSlope11
Definition: CastorQIECoder.h:95
CastorQIECoder::mOffset12
float mOffset12
Definition: CastorQIECoder.h:80
CastorQIECoder::mOffset32
float mOffset32
Definition: CastorQIECoder.h:88
Serializable.h
CastorQIECoder::mSlope33
float mSlope33
Definition: CastorQIECoder.h:105
CastorQIECoder::mSlope30
float mSlope30
Definition: CastorQIECoder.h:102
CastorQIECoder::mSlope12
float mSlope12
Definition: CastorQIECoder.h:96
CastorQIECoder::mOffset00
float mOffset00
Definition: CastorQIECoder.h:74
CastorQIECoder::setSlope
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
Definition: CastorQIECoder.cc:54
CastorQIECoder::adc
unsigned adc(const CastorQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -> ADC conversion
Definition: CastorQIECoder.cc:22
CastorQIECoder::mSlope03
float mSlope03
Definition: CastorQIECoder.h:93
CastorQIECoder::mOffset23
float mOffset23
Definition: CastorQIECoder.h:85
CastorQIECoder::mSlope13
float mSlope13
Definition: CastorQIECoder.h:97
CastorQIECoder::mOffset02
float mOffset02
Definition: CastorQIECoder.h:76
CastorQIECoder::mOffset21
float mOffset21
Definition: CastorQIECoder.h:83
CastorQIECoder
Definition: CastorQIECoder.h:21
CastorQIECoder::offset
float offset(unsigned fCapId, unsigned fRange) const
Definition: CastorQIECoder.cc:42
CastorQIECoder::mOffset03
float mOffset03
Definition: CastorQIECoder.h:77
CastorQIECoder::mOffset10
float mOffset10
Definition: CastorQIECoder.h:78
CastorQIECoder::mSlope00
float mSlope00
Definition: CastorQIECoder.h:90
CastorQIECoder::mOffset30
float mOffset30
Definition: CastorQIECoder.h:86
CastorQIEShape
Definition: CastorQIEShape.h:14