File indexing completed on 2024-04-06 11:58:11
0001 #ifndef CALIBFORMATS_CASTOROBJECTS_CASTORTPGCODER_H
0002 #define CALIBFORMATS_CASTOROBJECTS_CASTORTPGCODER_H 1
0003
0004 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
0005 #include "DataFormats/HcalDigi/interface/CastorDataFrame.h"
0006 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0007
0008
0009 namespace edm {
0010 class EventSetup;
0011 }
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 class CastorTPGCoder {
0024 public:
0025 virtual ~CastorTPGCoder() = default;
0026
0027
0028 virtual unsigned short adc2Linear(HcalQIESample sample, HcalDetId id) const = 0;
0029 unsigned short adc2Linear(unsigned char adc, HcalDetId id) const {
0030 return adc2Linear(HcalQIESample(adc, 0, 0, 0), id);
0031 }
0032 virtual float getLUTPedestal(HcalDetId id) const = 0;
0033 virtual float getLUTGain(HcalDetId id) const = 0;
0034
0035
0036
0037 virtual std::vector<unsigned short> getLinearizationLUT(HcalDetId id) const;
0038 };
0039
0040 #endif