CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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] = {3., 3.}; // 3ns 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 double HcalTimeSlew::delay(double fC, BiasSetting bias) {
16  double rawDelay=tzero[bias]+slope[bias]*log(fC);
17  return (rawDelay<0)?(0):((rawDelay>tmax[bias])?(tmax[bias]):(rawDelay));
18 }
19 
20 double HcalTimeSlew::delay(double fC, ParaSource source, BiasSetting bias, double par0, double par1, double par2, bool isHPD) {
21 
22  if (source==TestStand) {
23  return HcalTimeSlew::delay(fC, bias);
24  }
25  else if (source==InputPars) {
26  return std::fmin(cap, par0 + par1*log(fC+par2));
27  }
28  else if (source==Data || source==MC){
29  if(isHPD) return std::fmin(cap,tspar0[source-1]+tspar1[source-1]*log(fC+tspar2[source-1]));
30  return cap+tspar0_siPM[source-1];
31  }
32  return 0;
33 }
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
tuple par0
Definition: fitWZ.py:51
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:15
static const double tspar2_siPM[2]
Definition: HcalTimeSlew.cc:13