File indexing completed on 2024-04-06 12:30:58
0001 #ifndef Tracker_SiTrivialDigitalConverter_H
0002 #define Tracker_SiTrivialDigitalConverter_H
0003
0004 #include "SimTracker/SiStripDigitizer/interface/SiDigitalConverter.h"
0005
0006
0007
0008 class SiTrivialDigitalConverter final : public SiDigitalConverter {
0009 public:
0010 SiTrivialDigitalConverter(float in, bool PreMix);
0011
0012 DigitalVecType const& convert(const std::vector<float>&, const SiStripGain*, unsigned int detid) override;
0013 DigitalRawVecType const& convertRaw(const std::vector<float>&, const SiStripGain*, unsigned int detid) override;
0014
0015 private:
0016 int convert(float in) const { return truncate(in * ADCperElectron); }
0017 int convertRaw(float in) const { return truncateRaw(in * ADCperElectron); }
0018 int truncate(float in_adc) const;
0019 int truncateRaw(float in_adc) const;
0020
0021 const float ADCperElectron;
0022 SiDigitalConverter::DigitalVecType _temp;
0023 SiDigitalConverter::DigitalRawVecType _tempRaw;
0024 bool PreMixing_;
0025 };
0026
0027 #endif