CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/SimCalorimetry/EcalZeroSuppressionAlgos/interface/EcalZeroSuppressor.h

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