Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-01 06:57:35

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