File indexing completed on 2024-04-06 11:58:12
0001 #ifndef CALIBFORMATS_HCALOBJECTS_HCALTPGCODER_H
0002 #define CALIBFORMATS_HCALOBJECTS_HCALTPGCODER_H 1
0003
0004 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
0005 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
0006 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0007 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h"
0008 #include "DataFormats/HcalDigi/interface/QIE10DataFrame.h"
0009 #include "DataFormats/HcalDigi/interface/QIE11DataFrame.h"
0010 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0011
0012
0013 namespace edm {
0014 class EventSetup;
0015 }
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 class HcalTPGCoder {
0028 public:
0029 virtual ~HcalTPGCoder() = default;
0030 virtual void adc2Linear(const HBHEDataFrame& df, IntegerCaloSamples& ics) const = 0;
0031 virtual void adc2Linear(const HFDataFrame& df, IntegerCaloSamples& ics) const = 0;
0032 virtual void adc2Linear(const QIE10DataFrame& df, IntegerCaloSamples& ics, bool ootpu_lut) const = 0;
0033 virtual void adc2Linear(const QIE11DataFrame& df, IntegerCaloSamples& ics) const = 0;
0034 virtual unsigned short adc2Linear(HcalQIESample sample, HcalDetId id) const = 0;
0035 unsigned short adc2Linear(unsigned char adc, HcalDetId id) const {
0036 return adc2Linear(HcalQIESample(adc, 0, 0, 0), id);
0037 }
0038 virtual void compress(const IntegerCaloSamples& ics,
0039 const std::vector<bool>& featureBits,
0040 HcalTriggerPrimitiveDigi& tp) const = 0;
0041 virtual float getLUTPedestal(HcalDetId id) const = 0;
0042 virtual float getLUTGain(HcalDetId id) const = 0;
0043
0044
0045
0046 virtual std::vector<unsigned short> getLinearizationLUT(HcalDetId id) const;
0047 virtual std::vector<unsigned short> getLinearizationLUT(HcalZDCDetId id, bool ootput_lut) const;
0048 };
0049
0050 #endif