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 
12 double HcalTimeSlew::delay(double fC, BiasSetting bias) {
13  double rawDelay=tzero[bias]+slope[bias]*log(fC);
14  return (rawDelay<0)?(0):((rawDelay>tmax[bias])?(tmax[bias]):(rawDelay));
15 }
16 
17 double HcalTimeSlew::delay(double fC, ParaSource source, BiasSetting bias, double par0, double par1, double par2) {
18 
19  if (source==TestStand) {
20  return HcalTimeSlew::delay(fC, bias);
21  }
22  else if (source==InputPars) {
23  return std::fmin(cap, par0 + par1*log(fC+par2));
24  }
25  else if (source==Data || source==MC){
26  return std::fmin(cap,tspar0[source-1]+tspar1[source-1]*log(fC+tspar2[source-1]));
27  }
28  return 0;
29 }
static const double tspar2[2]
Definition: HcalTimeSlew.cc:10
static const double cap
Definition: HcalTimeSlew.cc:7
static const double tspar1[2]
Definition: HcalTimeSlew.cc:9
static const double slope[3]
Definition: HcalTimeSlew.cc:5
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:12