Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:14

0001 #ifndef RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPTT6COMMONMODENOISESUBTRACTION_H
0002 #define RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPTT6COMMONMODENOISESUBTRACTION_H
0003 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripCommonModeNoiseSubtractor.h"
0004 #include "CondFormats/DataRecord/interface/SiStripNoisesRcd.h"
0005 #include "CalibTracker/Records/interface/SiStripQualityRcd.h"
0006 
0007 #include "FWCore/Framework/interface/ESWatcher.h"
0008 #include "FWCore/Framework/interface/ConsumesCollector.h"
0009 class SiStripNoises;
0010 class SiStripQuality;
0011 
0012 class TT6CMNSubtractor : public SiStripCommonModeNoiseSubtractor {
0013   friend class SiStripRawProcessingFactory;
0014 
0015 public:
0016   void init(const edm::EventSetup& es) override;
0017   void subtract(uint32_t detId, uint16_t firstAPV, std::vector<int16_t>& digis) override;
0018   void subtract(uint32_t detId, uint16_t firstAPV, std::vector<float>& digis) override;
0019 
0020 private:
0021   template <typename T>
0022   void subtract_(uint32_t detId, uint16_t firstAPV, std::vector<T>& digis);
0023 
0024   TT6CMNSubtractor(double in, edm::ConsumesCollector iC)
0025       : cut_to_avoid_signal_(in),
0026         noiseToken_(iC.esConsumes<SiStripNoises, SiStripNoisesRcd>()),
0027         qualityToken_(iC.esConsumes<SiStripQuality, SiStripQualityRcd>()) {}
0028   double cut_to_avoid_signal_;
0029   edm::ESGetToken<SiStripNoises, SiStripNoisesRcd> noiseToken_;
0030   edm::ESGetToken<SiStripQuality, SiStripQualityRcd> qualityToken_;
0031   const SiStripNoises* noiseHandle;
0032   const SiStripQuality* qualityHandle;
0033   edm::ESWatcher<SiStripNoisesRcd> noiseWatcher_;
0034   edm::ESWatcher<SiStripQualityRcd> qualityWatcher_;
0035 };
0036 #endif