CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/SimCalorimetry/EcalElectronicsEmulation/interface/EcalSimpleProducer.h

Go to the documentation of this file.
00001 #ifndef SimCalorimetry_EcalElectronicsEmulationEcalSimpleProducer_h
00002 #define SimCalorimetry_EcalElectronicsEmulationEcalSimpleProducer_h
00003 
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005 #include <memory>
00006 #include <TFormula.h>
00007 #include <string>
00008 
00038 class EcalSimpleProducer: public edm::EDProducer {
00039 
00040   //constructor(s) and destructor(s)
00041 public:
00046   EcalSimpleProducer(const edm::ParameterSet& pset);
00047 
00050   virtual ~EcalSimpleProducer(){};
00051 
00055   void beginJob(){};
00056 
00060   virtual void produce(edm::Event& evt, const edm::EventSetup&);
00061   
00062   //method(s)
00063 public:
00064 private:
00071   void replaceAll(std::string& s, const std::string& from,
00072                   const std::string& to) const;
00073 
00079   int cIndex2iEta(int iEta0) const{
00080     return (iEta0<85)?iEta0-85:iEta0-84;
00081   }
00082   
00088   int cIndex2iPhi(int iPhi0) const{
00089     return (iPhi0+10)%360+1;
00090   }
00091   
00097   int cIndex2iTtEta(int iEta0) const{
00098     return (iEta0<28)?iEta0-28:iEta0-27;
00099   }
00100   
00106   int cIndex2iTtPhi(int iPhi0) const{
00107     return iPhi0+1;
00108   }
00109   
00110   //attribute(s)
00111 protected:
00112 private:
00115   std::auto_ptr<TFormula> formula_;
00116 
00119   std::auto_ptr<TFormula> tpFormula_;
00120 
00123   std::auto_ptr<TFormula> simHitFormula_;
00124   
00127   bool verbose_;
00128 };
00129 
00130 #endif