CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDIonFeedbackSim.h
Go to the documentation of this file.
1 
2 // --------------------------------------------------------
3 // A class to simulated HPD ion feedback noise.
4 // The deliverable of the class is the ion feedback noise
5 // for an HcalDetId units of fC or GeV
6 //
7 // Project: HPD ion feedback
8 // Author: T.Yetkin University of Iowa, Feb. 16, 2010
9 // $Id: HPDIonFeedbackSim.h,v 1.1 2010/02/24 01:56:49 rpw Exp $
10 // --------------------------------------------------------
11 
12 #ifndef HcalSimAlgos_HPDIonFeedbackSim_h
13 #define HcalSimAlgos_HPDIonFeedbackSim_h
14 
21 // CLHEP Random numbers
22 #include "CLHEP/Random/RandBinomial.h"
23 #include "CLHEP/Random/RandFlat.h"
24 #include "CLHEP/Random/RandGaussQ.h"
25 #include "CLHEP/Random/RandPoissonQ.h"
26 class CaloVShape;
27 
29 {
30  public:
31  explicit HPDIonFeedbackSim(const edm::ParameterSet&);
33 
34  //copied from HFSimParameters.h
35  void setDbService(const HcalDbService * service) {theDbService = service;}
37  void setShape(const CaloVShape * shape) {theShape = shape;}
38  void setRandomEngine(CLHEP::HepRandomEngine & engine);
39 
40  // in units of fC
41  virtual double correctPE(const DetId & detId, double npe) const;
42  double getIonFeedback(DetId detId, double signal, double pedWidth, bool doThermal, bool isInGeV);
43 
44  void addThermalNoise(CaloSamples & samples);
45 
46  private:
47  double fCtoGeV(const DetId & detId) const;
50 
51  mutable CLHEP::RandBinomial * theRandBinomial;
52  mutable CLHEP::RandFlat* theRandFlat;
53  mutable CLHEP::RandGaussQ * theRandGauss;
54  mutable CLHEP::RandPoissonQ* theRandPoissonQ;
55 
56 };
57 #endif
void addThermalNoise(CaloSamples &samples)
void setShape(const CaloVShape *shape)
need a shaper in order to set thermal noise
CLHEP::RandGaussQ * theRandGauss
double fCtoGeV(const DetId &detId) const
CLHEP::RandFlat * theRandFlat
HPDIonFeedbackSim(const edm::ParameterSet &)
Electronic response of the preamp.
Definition: CaloVShape.h:11
const HcalDbService * theDbService
virtual double correctPE(const DetId &detId, double npe) const
void setRandomEngine(CLHEP::HepRandomEngine &engine)
CLHEP::RandBinomial * theRandBinomial
Definition: DetId.h:20
CLHEP::RandPoissonQ * theRandPoissonQ
const CaloVShape * theShape
void setDbService(const HcalDbService *service)
double getIonFeedback(DetId detId, double signal, double pedWidth, bool doThermal, bool isInGeV)