File indexing completed on 2024-04-06 11:58:11
0001 #ifndef CASTOR_CHANNEL_CODER_H
0002 #define CASTOR_CHANNEL_CODER_H
0003
0004
0005
0006
0007
0008
0009
0010 namespace reco {
0011 namespace castor {
0012 class QieShape;
0013 }
0014 }
0015
0016 class CastorChannelCoder {
0017 public:
0018 CastorChannelCoder(const float fOffset[16], const float fSlope[16]);
0019
0020 double charge(const reco::castor::QieShape& fShape, int fAdc, int fCapId) const;
0021
0022 int adc(const reco::castor::QieShape& fShape, double fCharge, int fCapId) const;
0023 int index(int fCapId, int Range) { return fCapId * 4 + Range; }
0024
0025 private:
0026 double mOffset[4][4];
0027 double mSlope[4][4];
0028 };
0029
0030 #endif