Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CALIBCALORIMETRY_HCALALGOS_HCALTIMESLEW_H
0002 #define CALIBCALORIMETRY_HCALALGOS_HCALTIMESLEW_H 1
0003 
0004 #include <vector>
0005 
0006 /** \class HcalTimeSlew
0007   * 
0008   * Provides pulse delay as a function of amplitude for three choices
0009   * of QIE bias setting.  The "Medium" setting is used in HB and HE,
0010   * while the "Slow" (and lower noise) setting is used in HO.  All
0011   * data taken from bench measurements of the QIE and plotted in
0012   * Physics TDR Vol 1.
0013   * 
0014   * Not to be used for HF at this time (unlikely to have much effect)
0015   *
0016   * \original author        J. Mans   - Minnesota
0017   * \upgraded 2017          C. Madrid - Baylor
0018   */
0019 class HcalTimeSlew {
0020 public:
0021   class HcalTimeSlewM2Parameters {
0022   public:
0023     //M2 Parameters
0024     float tzero;
0025     float slope;
0026     float tmax;
0027 
0028     HcalTimeSlewM2Parameters(float t0, float m, float tmaximum) : tzero(t0), slope(m), tmax(tmaximum) {}
0029   };
0030 
0031   class HcalTimeSlewM3Parameters {
0032   public:
0033     //M3 Parameters
0034     double cap;
0035     double tspar0;
0036     double tspar1;
0037     double tspar2;
0038     double tspar0_siPM;
0039     double tspar1_siPM;
0040     double tspar2_siPM;
0041 
0042     HcalTimeSlewM3Parameters(double capCon,
0043                              double tspar0Con,
0044                              double tspar1Con,
0045                              double tspar2Con,
0046                              double tspar0_siPMCon,
0047                              double tspar1_siPMCon,
0048                              double tspar2_siPMCon)
0049         : cap(capCon),
0050           tspar0(tspar0Con),
0051           tspar1(tspar1Con),
0052           tspar2(tspar2Con),
0053           tspar0_siPM(tspar0_siPMCon),
0054           tspar1_siPM(tspar1_siPMCon),
0055           tspar2_siPM(tspar2_siPMCon) {}
0056   };
0057 
0058   HcalTimeSlew(){};
0059   ~HcalTimeSlew() {}
0060 
0061   void addM2ParameterSet(float tzero, float slope, float tmax);
0062   void addM3ParameterSet(double cap,
0063                          double tspar0,
0064                          double tspar1,
0065                          double tspar2,
0066                          double tspar0_siPM,
0067                          double tspar1_siPM,
0068                          double tspar2_siPM);
0069 
0070   enum ParaSource { TestStand = 0, Data = 1, MC = 2, HBHE = 3 };
0071   enum BiasSetting { Slow = 0, Medium = 1, Fast = 2 };
0072   /** \brief Returns the amount (ns) by which a pulse of the given
0073    number of fC will be delayed by the timeslew effect, for the
0074    specified bias setting. */
0075   float delay(float fC, BiasSetting bias = Medium) const;
0076   double delay(double fC, ParaSource source = HBHE, BiasSetting bias = Medium, bool isHPD = true) const;
0077 
0078 private:
0079   std::vector<HcalTimeSlewM2Parameters> parametersM2_;
0080   std::vector<HcalTimeSlewM3Parameters> parametersM3_;
0081 };
0082 
0083 #endif