Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:05

0001 #ifndef HcalAlgos_HcalHardcodeParameters_h
0002 #define HcalAlgos_HcalHardcodeParameters_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "CalibCalorimetry/HcalAlgos/interface/HcalSiPMRadiationDamage.h"
0006 
0007 #include <vector>
0008 
0009 class HcalHardcodeParameters {
0010 public:
0011   //default constructor

0012   HcalHardcodeParameters() {}
0013 
0014   //construct from values

0015   HcalHardcodeParameters(double pedestal,
0016                          double pedestalWidth,
0017                          const std::vector<double>& gain,
0018                          const std::vector<double>& gainWidth,
0019                          int zsThreshold,
0020                          int qieType,
0021                          const std::vector<double>& qieOffset,
0022                          const std::vector<double>& qieSlope,
0023                          int mcShape,
0024                          int recoShape,
0025                          double photoelectronsToAnalog,
0026                          const std::vector<double>& darkCurrent,
0027                          const std::vector<double>& noiseCorrelation,
0028                          double noiseThreshold,
0029                          double seedThreshold);
0030 
0031   //construct from pset

0032   HcalHardcodeParameters(const edm::ParameterSet& p);
0033 
0034   //destructor

0035   inline virtual ~HcalHardcodeParameters() {}
0036 
0037   //accessors

0038   //note: all vector accessors use at() in order to throw exceptions for malformed conditions

0039   inline double pedestal() const { return pedestal_; }
0040   inline double pedestalWidth() const { return pedestalWidth_; }
0041   inline double gain(unsigned index) const { return gain_.at(index); }
0042   inline double gainWidth(unsigned index) const { return gainWidth_.at(index); }
0043   inline int zsThreshold() const { return zsThreshold_; }
0044   inline int qieType() const { return qieType_; }
0045   inline double qieOffset(unsigned range) const { return qieOffset_.at(range); }
0046   inline double qieSlope(unsigned range) const { return qieSlope_.at(range); }
0047   inline int mcShape() const { return mcShape_; }
0048   inline int recoShape() const { return recoShape_; }
0049   inline double photoelectronsToAnalog() const { return photoelectronsToAnalog_; }
0050   double darkCurrent(unsigned index, double intlumi) const;
0051   double noiseCorrelation(unsigned index) const;
0052   inline double noiseThreshold() const { return noiseThreshold_; }
0053   inline double seedThreshold() const { return seedThreshold_; }
0054 
0055 private:
0056   //member variables

0057   double pedestal_, pedestalWidth_;
0058   std::vector<double> gain_, gainWidth_;
0059   int zsThreshold_;
0060   int qieType_;
0061   std::vector<double> qieOffset_, qieSlope_;
0062   int mcShape_, recoShape_;
0063   double photoelectronsToAnalog_;
0064   std::vector<double> darkCurrent_;
0065   std::vector<double> noiseCorrelation_;
0066   bool doSipmRadiationDamage_;
0067   HcalSiPMRadiationDamage sipmRadiationDamage_;
0068   double noiseThreshold_, seedThreshold_;
0069 };
0070 
0071 #endif