File indexing completed on 2023-03-17 11:23:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef HcalSimAlgos_HPDIonFeedbackSim_h
0012 #define HcalSimAlgos_HPDIonFeedbackSim_h
0013
0014 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0015 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0016 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0017 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
0018 #include "DataFormats/DetId/interface/DetId.h"
0019 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVPECorrection.h"
0020
0021 class CaloShapes;
0022
0023 namespace CLHEP {
0024 class HepRandomEngine;
0025 }
0026
0027 class HPDIonFeedbackSim : public CaloVPECorrection {
0028 public:
0029
0030 HPDIonFeedbackSim(const edm::ParameterSet&, const CaloShapes* shapes);
0031 ~HPDIonFeedbackSim() override;
0032
0033
0034 void setDbService(const HcalDbService* service) { theDbService = service; }
0035
0036
0037 double correctPE(const DetId& detId, double npe, CLHEP::HepRandomEngine*) const override;
0038 double getIonFeedback(
0039 DetId detId, double signal, double pedWidth, bool doThermal, bool isInGeV, CLHEP::HepRandomEngine*);
0040
0041 void addThermalNoise(CaloSamples& samples, CLHEP::HepRandomEngine*);
0042
0043 private:
0044 double fCtoGeV(const DetId& detId) const;
0045 const HcalDbService* theDbService;
0046 const CaloShapes* theShapes;
0047 };
0048 #endif