CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalAmplifier.h
Go to the documentation of this file.
1 #ifndef HcalSimAlgos_HcalAmplifier_h
2 #define HcalSimAlgos_HcalAmplifier_h
3 
9 #include "CLHEP/Random/RandGaussQ.h"
10 #include "CLHEP/Random/RandFlat.h"
16 
17 class HcalDbService;
18 class HPDIonFeedbackSim;
19 class HcalTimeSlewSim;
20 
22 public:
23  HcalAmplifier(const CaloVSimParameterMap * parameters, bool addNoise, bool PreMix1, bool PreMix2);
24  virtual ~HcalAmplifier(){ delete theRandGaussQ; }
25 
27  void setDbService(const HcalDbService * service);
28  void setRandomEngine(CLHEP::HepRandomEngine & engine);
29  void setIonFeedbackSim(HPDIonFeedbackSim * feedbackSim) {theIonFeedbackSim = feedbackSim;}
30 
33  void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator * noiseSignalGenerator) {
34  theNoiseSignalGenerator = noiseSignalGenerator;
35  }
36  void setTimeSlewSim(HcalTimeSlewSim * timeSlewSim) {
37  theTimeSlewSim = timeSlewSim;
38  }
39 
40  virtual void amplify(CaloSamples & linearFrame) const;
41 
42  void setStartingCapId(int capId) {theStartingCapId = capId;}
43  void setHBtuningParameter(double tp);
44  void setHEtuningParameter(double tp);
45  void setHFtuningParameter(double tp);
46  void setHOtuningParameter(double tp);
47  void setUseOldHB(bool useOld);
48  void setUseOldHE(bool useOld);
49  void setUseOldHF(bool useOld);
50  void setUseOldHO(bool useOld);
51  void setCholesky(const HcalCholeskyMatrices * Cholesky) { myCholeskys = Cholesky; }
52  void setADCPeds(const HcalPedestals * ADCPeds) { myADCPeds = ADCPeds; }
53 
54 private:
55 
56  void pe2fC(CaloSamples & frame) const;
57  void addPedestals(CaloSamples & frame) const;
58  void makeNoiseOld (HcalGenericDetId::HcalGenericSubdetector hcalSubDet, const HcalCalibrationWidths& width, int fFrames, double* fGauss, double* fNoise) const;
59  void makeNoise (const HcalCholeskyMatrix & thisChanCholesky, int fFrames, double* fGauss, double* fNoise, int m) const;
60 
62  CLHEP::RandGaussQ * theRandGaussQ;
63  CLHEP::RandFlat * theRandFlat;
68  unsigned theStartingCapId;
69  bool addNoise_;
71  bool preMixAdd_;
72  bool useOldHB;
73  bool useOldHE;
74  bool useOldHF;
75  bool useOldHO;
76 
77  double HB_ff;
78  double HE_ff;
79  double HF_ff;
80  double HO_ff;
83 };
84 
85 #endif
void setUseOldHB(bool useOld)
void setHOtuningParameter(double tp)
void makeNoiseOld(HcalGenericDetId::HcalGenericSubdetector hcalSubDet, const HcalCalibrationWidths &width, int fFrames, double *fGauss, double *fNoise) const
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
const CaloVNoiseSignalGenerator * theNoiseSignalGenerator
Definition: HcalAmplifier.h:65
dictionary parameters
Definition: Parameters.py:2
const CaloVSimParameterMap * theParameterMap
Definition: HcalAmplifier.h:64
void setStartingCapId(int capId)
Definition: HcalAmplifier.h:42
void setUseOldHF(bool useOld)
void setHFtuningParameter(double tp)
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:52
CLHEP::RandGaussQ * theRandGaussQ
Definition: HcalAmplifier.h:62
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:29
HcalAmplifier(const CaloVSimParameterMap *parameters, bool addNoise, bool PreMix1, bool PreMix2)
void setUseOldHO(bool useOld)
void setHEtuningParameter(double tp)
void setUseOldHE(bool useOld)
const HcalDbService * theDbService
Definition: HcalAmplifier.h:61
void setRandomEngine(CLHEP::HepRandomEngine &engine)
HcalTimeSlewSim * theTimeSlewSim
Definition: HcalAmplifier.h:67
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:36
virtual void amplify(CaloSamples &linearFrame) const
void makeNoise(const HcalCholeskyMatrix &thisChanCholesky, int fFrames, double *fGauss, double *fNoise, int m) const
unsigned theStartingCapId
Definition: HcalAmplifier.h:68
void addPedestals(CaloSamples &frame) const
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:51
void pe2fC(CaloSamples &frame) const
virtual ~HcalAmplifier()
Definition: HcalAmplifier.h:24
CLHEP::RandFlat * theRandFlat
Definition: HcalAmplifier.h:63
HPDIonFeedbackSim * theIonFeedbackSim
Definition: HcalAmplifier.h:66
void setHBtuningParameter(double tp)
const HcalPedestals * myADCPeds
Definition: HcalAmplifier.h:82
const HcalCholeskyMatrices * myCholeskys
Definition: HcalAmplifier.h:81