Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:31

0001 
0002 // --------------------------------------------------------
0003 // A class to simulated HPD ion feedback noise.
0004 // The deliverable of the class is the ion feedback noise
0005 // for an HcalDetId units of fC or GeV
0006 //
0007 // Project: HPD ion feedback
0008 // Author: T.Yetkin University of Iowa, Feb. 16, 2010
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   /// need a shaper in order to set thermal noise
0030   HPDIonFeedbackSim(const edm::ParameterSet&, const CaloShapes* shapes);
0031   ~HPDIonFeedbackSim() override;
0032 
0033   //copied from HFSimParameters.h
0034   void setDbService(const HcalDbService* service) { theDbService = service; }
0035 
0036   // in units of fC
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