Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:10

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   //construct from values

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

0028   HcalHardcodeParameters(const edm::ParameterSet& p);
0029 
0030   //destructor

0031   virtual ~HcalHardcodeParameters() {}
0032 
0033   //accessors

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

0035   const double pedestal() const { return pedestal_; }
0036   const double pedestalWidth() const { return pedestalWidth_; }
0037   const double gain(unsigned index) const { return gain_.at(index); }
0038   const double gainWidth(unsigned index) const { return gainWidth_.at(index); }
0039   const int zsThreshold() const { return zsThreshold_; }
0040   const int qieType() const { return qieType_; }
0041   const double qieOffset(unsigned range) const { return qieOffset_.at(range); }
0042   const double qieSlope(unsigned range) const { return qieSlope_.at(range); }
0043   const int mcShape() const { return mcShape_; }
0044   const int recoShape() const { return recoShape_; }
0045   const double photoelectronsToAnalog() const { return photoelectronsToAnalog_; }
0046   const double darkCurrent(unsigned index, double intlumi) const;
0047   const double noiseCorrelation(unsigned index) const;
0048 
0049 private:
0050   //member variables

0051   double pedestal_, pedestalWidth_;
0052   std::vector<double> gain_, gainWidth_;
0053   int zsThreshold_;
0054   int qieType_;
0055   std::vector<double> qieOffset_, qieSlope_;
0056   int mcShape_, recoShape_;
0057   double photoelectronsToAnalog_;
0058   std::vector<double> darkCurrent_;
0059   std::vector<double> noiseCorrelation_;
0060   bool doSipmRadiationDamage_;
0061   HcalSiPMRadiationDamage sipmRadiationDamage_;
0062 };
0063 
0064 #endif