Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:34

0001 #ifndef SimCalorimetry_HcalZeroSuppressionProducers_HCALZEROSUPPESSIONALGO_H
0002 #define SimCalorimetry_HcalZeroSuppressionProducers_HCALZEROSUPPESSIONALGO_H 1
0003 
0004 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
0005 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0006 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0007 
0008 /** \class HcalZeroSuppessionAlgo
0009  *
0010  * \author J. Mans - Minnesota
0011  */
0012 
0013 class HcalDbService;
0014 
0015 class HcalZeroSuppressionAlgo {
0016 public:
0017   virtual ~HcalZeroSuppressionAlgo() = default;
0018   void suppress(const HBHEDigiCollection &input, HBHEDigiCollection &output);
0019   void suppress(const HODigiCollection &input, HODigiCollection &output);
0020   void suppress(const HFDigiCollection &input, HFDigiCollection &output);
0021   void suppress(const QIE10DigiCollection &input, QIE10DigiCollection &output);
0022   void suppress(const QIE11DigiCollection &input, QIE11DigiCollection &output);
0023   virtual bool shouldKeep(const HBHEDataFrame &digi) const = 0;
0024   virtual bool shouldKeep(const HODataFrame &digi) const = 0;
0025   virtual bool shouldKeep(const HFDataFrame &digi) const = 0;
0026   virtual bool shouldKeep(const QIE10DataFrame &digi) const = 0;
0027   virtual bool shouldKeep(const QIE11DataFrame &digi) const = 0;
0028   void setDbService(const HcalDbService *db) { m_dbService = db; }
0029   void clearDbService() { m_dbService = nullptr; }
0030   //  template <class DIGI> bool keepMe(const DIGI& inp, int threshold);
0031 
0032 protected:
0033   HcalZeroSuppressionAlgo(bool markAndPass);
0034   const HcalDbService *m_dbService;
0035 
0036 private:
0037   bool m_markAndPass;
0038 };
0039 
0040 #endif