Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EcalZeroSuppressionAlgos_EcalZeroSuppressor_h
0002 #define EcalZeroSuppressionAlgos_EcalZeroSuppressor_h
0003 
0004 /*
0005  * \file EcalZeroSuppressor.h
0006  *
0007  * \author F. Cossutti
0008  *
0009  */
0010 
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/EventSetup.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016 
0017 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h"
0018 #include "CondFormats/EcalObjects/interface/EcalPedestals.h"
0019 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0020 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0021 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0022 
0023 #include "SimCalorimetry/EcalZeroSuppressionAlgos/interface/TrivialAmplitudeAlgo.h"
0024 
0025 #include <vector>
0026 
0027 template <class C>
0028 class EcalZeroSuppressor {
0029 public:
0030   virtual ~EcalZeroSuppressor(){};
0031 
0032   // the threshold has to be expressed in number of noise sigmas for ADC counts
0033   // in the highest gain
0034 
0035   // bool accept(const C& frame, const double & threshold);
0036   bool accept(const C &frame, const double &threshold);
0037 
0038   /// can be fetched every event from the EventSetup
0039   void setPedestals(const EcalPedestals *pedestals) { thePedestals = pedestals; }
0040 
0041 private:
0042   const EcalPedestals *thePedestals;
0043 
0044   void findGain12Pedestal(const DetId &detId, double &pedestal, double &width);
0045 
0046   TrivialAmplitudeAlgo<C> theEnergy_;
0047 };
0048 
0049 #include "EcalZeroSuppressor.icc"
0050 #endif