Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:38

0001 #ifndef HcalSimAlgos_HcalSimParameters_h
0002 #define HcalSimAlgos_HcalSimParameters_h
0003 
0004 #include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0007 
0008 typedef std::vector<std::pair<double, double> > HcalTimeSmearSettings;
0009 
0010 class HcalSimParameters : public CaloSimParameters {
0011 public:
0012   HcalSimParameters(double simHitToPhotoelectrons,
0013                     double samplingFactor,
0014                     double timePhase,
0015                     int readoutFrameSize,
0016                     int binOfMaximum,
0017                     bool doPhotostatistics,
0018                     bool syncPhase,
0019                     int firstRing,
0020                     const std::vector<double>& samplingFactors,
0021                     double sipmTau);
0022   HcalSimParameters(const edm::ParameterSet& p);
0023 
0024   ~HcalSimParameters() override {}
0025 
0026   void setDbService(const HcalDbService* service);
0027 
0028   double simHitToPhotoelectrons(const DetId& detId) const override;
0029   double photoelectronsToAnalog(const DetId& detId) const override;
0030 
0031   double fCtoGeV(const DetId& detId) const;
0032 
0033   /// the ratio of actual incident energy to deposited energy
0034   /// in the SimHit
0035   virtual double samplingFactor(const DetId& detId) const;
0036 
0037   bool doTimeSmear() const { return doTimeSmear_; }
0038 
0039   double timeSmearRMS(double ampl) const;
0040 
0041   int pixels(const DetId& detId) const;
0042   bool doSiPMSmearing() const { return theSiPMSmearing; }
0043   int delayQIE() const { return delayQIE_; }
0044   double threshold_currentTDC() const { return threshold_currentTDC_; }
0045   double sipmTau() const { return theSiPMTau; }
0046   double sipmDarkCurrentuA(const DetId& detId) const;
0047   double sipmCrossTalk(const DetId& detId) const;
0048   std::vector<float> sipmNonlinearity(const DetId& detId) const;
0049   unsigned int signalShape(const DetId& detId) const;
0050 
0051   friend class HcalSimParameterMap;
0052 
0053 private:
0054   void defaultTimeSmearing();
0055   const HcalDbService* theDbService;
0056   const HcalSiPMCharacteristics* theSiPMcharacteristics;
0057   int theFirstRing;
0058   std::vector<double> theSamplingFactors;
0059   bool theSiPMSmearing;
0060   bool doTimeSmear_;
0061   HcalTimeSmearSettings theSmearSettings;
0062   double theSiPMTau;
0063   double threshold_currentTDC_;
0064   int delayQIE_;
0065 };
0066 
0067 #endif