CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimCalorimetry/HcalSimAlgos/interface/HPDIonFeedbackSim.h

Go to the documentation of this file.
00001 
00002 // --------------------------------------------------------
00003 // A class to simulated HPD ion feedback noise.
00004 // The deliverable of the class is the ion feedback noise
00005 // for an HcalDetId units of fC or GeV
00006 //
00007 // Project: HPD ion feedback
00008 // Author: T.Yetkin University of Iowa, Feb. 16, 2010
00009 // $Id: HPDIonFeedbackSim.h,v 1.2 2010/02/27 00:35:48 rpw Exp $
00010 // --------------------------------------------------------
00011 
00012 #ifndef HcalSimAlgos_HPDIonFeedbackSim_h
00013 #define HcalSimAlgos_HPDIonFeedbackSim_h
00014 
00015 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
00016 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00017 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00018 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
00019 #include "DataFormats/DetId/interface/DetId.h"
00020 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVPECorrection.h"
00021 // CLHEP Random numbers
00022 #include "CLHEP/Random/RandBinomial.h"
00023 #include "CLHEP/Random/RandFlat.h"
00024 #include "CLHEP/Random/RandGaussQ.h"
00025 #include "CLHEP/Random/RandPoissonQ.h"
00026 class CaloVShape;
00027 
00028 class HPDIonFeedbackSim: public CaloVPECorrection
00029 {
00030   public:
00031     explicit HPDIonFeedbackSim(const edm::ParameterSet&);
00032     ~HPDIonFeedbackSim();
00033     
00034     //copied from HFSimParameters.h
00035     void setDbService(const HcalDbService * service) {theDbService = service;}
00037     void setShape(const CaloVShape * shape) {theShape = shape;}
00038     void setRandomEngine(CLHEP::HepRandomEngine & engine);
00039 
00040     // in units of fC
00041     virtual double correctPE(const DetId & detId, double npe) const;
00042     double getIonFeedback(DetId detId, double signal, double pedWidth, bool doThermal, bool isInGeV);
00043 
00044     void addThermalNoise(CaloSamples & samples);
00045 
00046   private:
00047     double fCtoGeV(const DetId & detId) const;
00048     const HcalDbService * theDbService;
00049     const CaloVShape * theShape;
00050     
00051     mutable CLHEP::RandBinomial * theRandBinomial;
00052     mutable CLHEP::RandFlat*      theRandFlat;
00053     mutable CLHEP::RandGaussQ *   theRandGauss;
00054     mutable CLHEP::RandPoissonQ*  theRandPoissonQ; 
00055 
00056 };
00057 #endif