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 
14 
15 class HcalDbService;
16 class HPDIonFeedbackSim;
17 class HcalTimeSlewSim;
18 
19 namespace CLHEP {
20  class HepRandomEngine;
21 }
22 
24 public:
25  HcalAmplifier(const CaloVSimParameterMap * parameters, bool addNoise, bool PreMix1, bool PreMix2);
26  virtual ~HcalAmplifier() {}
27 
29  void setDbService(const HcalDbService * service);
30  void setIonFeedbackSim(HPDIonFeedbackSim * feedbackSim) {theIonFeedbackSim = feedbackSim;}
31 
34  void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator * noiseSignalGenerator) {
35  theNoiseSignalGenerator = noiseSignalGenerator;
36  }
37  void setTimeSlewSim(HcalTimeSlewSim * timeSlewSim) {
38  theTimeSlewSim = timeSlewSim;
39  }
40 
41  virtual void amplify(CaloSamples & linearFrame, CLHEP::HepRandomEngine*) const;
42 
43  void setStartingCapId(int capId) {theStartingCapId = capId;}
44  void setHBtuningParameter(double tp);
45  void setHEtuningParameter(double tp);
46  void setHFtuningParameter(double tp);
47  void setHOtuningParameter(double tp);
48  void setUseOldHB(bool useOld);
49  void setUseOldHE(bool useOld);
50  void setUseOldHF(bool useOld);
51  void setUseOldHO(bool useOld);
52  void setCholesky(const HcalCholeskyMatrices * Cholesky) { myCholeskys = Cholesky; }
53  void setADCPeds(const HcalPedestals * ADCPeds) { myADCPeds = ADCPeds; }
54 
55 private:
56 
57  void pe2fC(CaloSamples & frame) const;
58  void addPedestals(CaloSamples & frame, CLHEP::HepRandomEngine*) const;
59  void makeNoiseOld (HcalGenericDetId::HcalGenericSubdetector hcalSubDet, const HcalCalibrationWidths& width, int fFrames, double* fGauss, double* fNoise) const;
60  void makeNoise (const HcalCholeskyMatrix & thisChanCholesky, int fFrames, double* fGauss, double* fNoise, int m) const;
61 
67  unsigned theStartingCapId;
68  bool addNoise_;
70  bool preMixAdd_;
71  bool useOldHB;
72  bool useOldHE;
73  bool useOldHF;
74  bool useOldHO;
75 
76  double HB_ff;
77  double HE_ff;
78  double HF_ff;
79  double HO_ff;
82 };
83 
84 #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:64
dictionary parameters
Definition: Parameters.py:2
const CaloVSimParameterMap * theParameterMap
Definition: HcalAmplifier.h:63
void setStartingCapId(int capId)
Definition: HcalAmplifier.h:43
void setUseOldHF(bool useOld)
void setHFtuningParameter(double tp)
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:53
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:30
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:62
virtual void amplify(CaloSamples &linearFrame, CLHEP::HepRandomEngine *) const
HcalTimeSlewSim * theTimeSlewSim
Definition: HcalAmplifier.h:66
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:34
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:37
void makeNoise(const HcalCholeskyMatrix &thisChanCholesky, int fFrames, double *fGauss, double *fNoise, int m) const
unsigned theStartingCapId
Definition: HcalAmplifier.h:67
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:52
void addPedestals(CaloSamples &frame, CLHEP::HepRandomEngine *) const
void pe2fC(CaloSamples &frame) const
virtual ~HcalAmplifier()
Definition: HcalAmplifier.h:26
HPDIonFeedbackSim * theIonFeedbackSim
Definition: HcalAmplifier.h:65
void setHBtuningParameter(double tp)
const HcalPedestals * myADCPeds
Definition: HcalAmplifier.h:81
const HcalCholeskyMatrices * myCholeskys
Definition: HcalAmplifier.h:80