Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:34

0001 #ifndef CASTORDATAFRAMEFILTER_H
0002 #define CASTORDATAFRAMEFILTER_H 1
0003 
0004 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0005 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
0006 
0007 /** \class CastorDataFrameFilter
0008     
0009     Utility algorithm for filtering out digis from testbeam, etc where
0010     no zero-suppression was applied.  The digis can be required to
0011     have correct form (capid rotation, error bit off, data-valid bit
0012     on).  It can also be filtered by simple amplitude requirements.
0013     As these are applied in units proportional to energy, rather than
0014     transverse energy, and no calibration is applied, care should be used.
0015    
0016    \author J. Mans - Minnesota
0017 */
0018 class CastorDataFrameFilter {
0019 public:
0020   CastorDataFrameFilter(bool requireCapid,
0021                         bool requireDVER,
0022                         bool energyFilter,
0023                         int firstSample = -1,
0024                         int lastSample = -1,
0025                         double minAmpl = -1);
0026   /// filter Castor data frames
0027   CastorDigiCollection filter(const CastorDigiCollection& incol, HcalUnpackerReport& r);
0028   /// whether any filters are on
0029   bool active() const;
0030 
0031 private:
0032   bool requireCapid_;
0033   bool requireDVER_;
0034   bool energyFilter_;
0035   int firstSample_, lastSample_;
0036   double minimumAmplitude_;
0037 };
0038 
0039 #endif