00001 #ifndef EcalZeroSuppressionAlgos_EcalZeroSuppressor_h 00002 #define EcalZeroSuppressionAlgos_EcalZeroSuppressor_h 00003 00004 /* 00005 * \file EcalZeroSuppressor.h 00006 * 00007 * $Date: 2007/09/28 10:02:04 $ 00008 * $Revision: 1.4 $ 00009 * \author F. Cossutti 00010 * 00011 */ 00012 00013 #include "FWCore/Framework/interface/EDProducer.h" 00014 #include "DataFormats/Common/interface/EDProduct.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00017 #include "FWCore/Framework/interface/ESHandle.h" 00018 #include "FWCore/Framework/interface/EventSetup.h" 00019 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00020 00021 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h" 00022 #include "CondFormats/EcalObjects/interface/EcalPedestals.h" 00023 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00024 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" 00025 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" 00026 00027 #include "SimCalorimetry/EcalZeroSuppressionAlgos/interface/TrivialAmplitudeAlgo.h" 00028 00029 #include <vector> 00030 00031 template<class C> class EcalZeroSuppressor 00032 { 00033 public: 00034 00035 virtual ~EcalZeroSuppressor(){}; 00036 00037 // the threshold has to be expressed in number of noise sigmas for ADC counts in the highest gain 00038 00039 // bool accept(const C& frame, const double & threshold); 00040 bool accept(const C& frame, const double & threshold); 00041 00043 void setPedestals(const EcalPedestals * pedestals) {thePedestals = pedestals;} 00044 00045 private: 00046 00047 const EcalPedestals * thePedestals; 00048 00049 void findGain12Pedestal(const DetId & detId, 00050 double & pedestal, double & width); 00051 00052 TrivialAmplitudeAlgo<C> theEnergy_; 00053 00054 }; 00055 00056 #include "EcalZeroSuppressor.icc" 00057 #endif