CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/SimCalorimetry/HcalSimAlgos/interface/HcalSimParameters.h

Go to the documentation of this file.
00001 #ifndef HcalSimAlgos_HcalSimParameters_h
00002 #define HcalSimAlgos_HcalSimParameters_h
00003 
00004 #include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00007 
00008 typedef std::vector<std::pair<double,double> > HcalTimeSmearSettings;
00009 
00010 class HcalSimParameters : public CaloSimParameters
00011 {
00012 public:
00013   HcalSimParameters(double simHitToPhotoelectrons, const std::vector<double> & photoelectronsToAnalog,
00014                  double samplingFactor, double timePhase,
00015                  int readoutFrameSize, int binOfMaximum,
00016                  bool doPhotostatistics, bool syncPhase,
00017                  int firstRing, const std::vector<double> & samplingFactors);
00018   HcalSimParameters(const edm::ParameterSet & p);
00019 
00020   virtual ~HcalSimParameters() {}
00021 
00022   void setDbService(const HcalDbService * service) {theDbService = service;}
00023 
00024   virtual double simHitToPhotoelectrons(const DetId & detId) const;
00025   virtual double photoelectronsToAnalog(const DetId & detId) const;
00026 
00027   double fCtoGeV(const DetId & detId) const;
00028 
00031   virtual double samplingFactor(const DetId & detId) const;
00032 
00033   bool doTimeSmear() const { return doTimeSmear_; }
00034 
00035   double timeSmearRMS(double ampl) const;
00036 
00037   int pixels() const {return thePixels;}
00038 
00039   friend class HcalSimParameterMap;
00040 
00041 private:
00042   void defaultTimeSmearing();
00043   const HcalDbService * theDbService;
00044   int theFirstRing;
00045   std::vector<double> theSamplingFactors;
00046   std::vector<double> thePE2fCByRing;
00047   int thePixels;
00048   bool doTimeSmear_;
00049   HcalTimeSmearSettings theSmearSettings;
00050 };
00051 
00052 #endif
00053