File indexing completed on 2024-09-07 04:34:52
0001 #ifndef CALIBCALORIMETRY_HCALALGOS_HCALTIMESLEW_H
0002 #define CALIBCALORIMETRY_HCALALGOS_HCALTIMESLEW_H 1
0003
0004 #include <vector>
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 class HcalTimeSlew {
0020 public:
0021 class HcalTimeSlewM2Parameters {
0022 public:
0023
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
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
0073
0074
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