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