CMS 3D CMS Logo

HcalTimeSlew.cc
Go to the documentation of this file.
2 #include <cmath>
3 
4 static const double tzero[3]= {23.960177, 13.307784, 9.109694};
5 static const double slope[3] = {-3.178648, -1.556668, -1.075824 };
6 static const double tmax[3] = {16.00, 10.00, 6.25 };
7 static const double cap = 6.0;
8 static const double tspar0[2] = {15.5, 12.2999};
9 static const double tspar1[2] = {-3.2,-2.19142};
10 static const double tspar2[2] = {32, 0};
11 static const double tspar0_siPM[2] = {0., 0.}; // 0ns delay for MC and DATA, recheck later for data
12 static const double tspar1_siPM[2] = {0, 0};
13 static const double tspar2_siPM[2] = {0, 0};
14 
15 // used by M2
16 double HcalTimeSlew::delay(double fC, BiasSetting bias) {
17  double rawDelay=tzero[bias]+slope[bias]*log(fC);
18  return (rawDelay<0)?(0):((rawDelay>tmax[bias])?(tmax[bias]):(rawDelay));
19 }
20 
21 // used by M3
22 double HcalTimeSlew::delay(double fC, ParaSource source, BiasSetting bias, double par0, double par1, double par2, bool isHPD) {
23 
24  if (source==TestStand) {
25  return HcalTimeSlew::delay(fC, bias);
26  }
27  else if (source==InputPars) {
28  if(isHPD) return std::fmin(cap, par0 + par1*log(fC+par2));
29  return cap+tspar0_siPM[0];
30  }
31  else if (source==Data || source==MC){
32  if(isHPD) return std::fmin(cap,tspar0[source-1]+tspar1[source-1]*log(fC+tspar2[source-1]));
33  return cap+tspar0_siPM[source-1];
34  }
35  return 0;
36 }
static const double tspar2[2]
Definition: HcalTimeSlew.cc:10
static const double cap
Definition: HcalTimeSlew.cc:7
static const double tspar1_siPM[2]
Definition: HcalTimeSlew.cc:12
static const double tspar1[2]
Definition: HcalTimeSlew.cc:9
static const double slope[3]
Definition: HcalTimeSlew.cc:5
static const double tspar0_siPM[2]
Definition: HcalTimeSlew.cc:11
static const double tzero[3]
Definition: HcalTimeSlew.cc:4
static const double tspar0[2]
Definition: HcalTimeSlew.cc:8
static const double tmax[3]
Definition: HcalTimeSlew.cc:6
static std::string const source
Definition: EdmProvDump.cc:43
static double delay(double fC, BiasSetting bias=Medium)
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
Definition: HcalTimeSlew.cc:16
static const double tspar2_siPM[2]
Definition: HcalTimeSlew.cc:13