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 
8 double HcalTimeSlew::delay(double fC, BiasSetting bias) {
9  double rawDelay=tzero[bias]+slope[bias]*log(fC);
10  return (rawDelay<0)?(0):((rawDelay>tmax[bias])?(tmax[bias]):(rawDelay));
11 }
12 
14 
15  if (source==TestStand) {
16  return HcalTimeSlew::delay(fC, bias);
17  }
18  else if (source==Data) {
19  //from john 2/20 talk: indico.cern.ch/event/375365/contribution/9/material/slides/5.pdf
20  return 13.98-3.20*log(fC+32)-2.82965+10;
21  }
22  else if (source==MC) {
23  // from Xinmei
24  //return 10.491-2.25495*log(fC+7.95067);
25 
26  //FCN=1075.01 FROM MIGRAD STATUS=CONVERGED 34 CALLS 35 TOTAL
27  //EDM=1.84101e-19 STRATEGY= 1 ERROR MATRIX ACCURATE
28  //EXT PARAMETER STEP FIRST
29  //NO. NAME VALUE ERROR SIZE DERIVATIVE
30  //1 p0 9.27638e+00 3.45586e-02 1.17592e-04 8.21769e-08
31  //2 p1 -2.05585e+00 1.10061e-02 3.74505e-05 2.58031e-07
32 
33  return std::min(6.0,9.27638-2.05585*log(fC));
34 
35  }
36  return 0;
37 }
static const double slope[3]
Definition: HcalTimeSlew.cc:5
static const double tzero[3]
Definition: HcalTimeSlew.cc:4
T min(T a, T b)
Definition: MathUtil.h:58
static const double tmax[3]
Definition: HcalTimeSlew.cc:6
static std::string const source
Definition: EdmProvDump.cc:42
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:8
tuple log
Definition: cmsBatch.py:347