CMS 3D CMS Logo

HcalTimeSlew.cc
Go to the documentation of this file.
2 #include <cmath>
3 #include <iostream>
4 
5 void HcalTimeSlew::addM2ParameterSet(float tzero, float slope, float tmax) {
6  parametersM2_.emplace_back(tzero, slope, tmax);
7 }
8 
10  double tspar0,
11  double tspar1,
12  double tspar2,
13  double tspar0_siPM,
14  double tspar1_siPM,
15  double tspar2_siPM) {
17 }
18 
19 // Used by M2/Simulation
20 float HcalTimeSlew::delay(float fC, BiasSetting bias) const {
21  float rawDelay = parametersM2_[bias].tzero + parametersM2_[bias].slope * std::log(fC);
22  return (rawDelay < 0) ? (0) : ((rawDelay > parametersM2_[bias].tmax) ? (parametersM2_[bias].tmax) : (rawDelay));
23 }
24 
25 // Used by M3
26 double HcalTimeSlew::delay(double fC, ParaSource source, BiasSetting bias, bool isHPD) const {
27  double rawDelay = 0.0;
28  if (source == TestStand) {
29  return HcalTimeSlew::delay(fC, bias);
30  } else if (isHPD) {
31  rawDelay = std::fmin(
34  } else {
35  rawDelay = parametersM3_[source].cap + parametersM3_[source].tspar0_siPM;
36  }
37  return rawDelay;
38 }
void addM2ParameterSet(float tzero, float slope, float tmax)
Definition: HcalTimeSlew.cc:5
static const double slope[3]
void addM3ParameterSet(double cap, double tspar0, double tspar1, double tspar2, double tspar0_siPM, double tspar1_siPM, double tspar2_siPM)
Definition: HcalTimeSlew.cc:9
float delay(float fC, BiasSetting bias=Medium) const
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
Definition: HcalTimeSlew.cc:20
static const double tmax[3]
std::vector< HcalTimeSlewM3Parameters > parametersM3_
Definition: HcalTimeSlew.h:80
static const double tzero[3]
std::vector< HcalTimeSlewM2Parameters > parametersM2_
Definition: HcalTimeSlew.h:79
static std::string const source
Definition: EdmProvDump.cc:46