test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDeterministicFit.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <cmath>
3 #include <climits>
5 
10 
11 using namespace std;
12 
14 }
15 
17 }
18 
19 void HcalDeterministicFit::init(HcalTimeSlew::ParaSource tsParam, HcalTimeSlew::BiasSetting bias, NegStrategy nStrat, PedestalSub pedSubFxn_, std::vector<double> pars, double respCorr) {
20  for(int fi=0; fi<9; fi++){
21  fpars[fi] = pars.at(fi);
22  }
23 
24  fTimeSlew=tsParam;
25  fTimeSlewBias=bias;
26  fNegStrat=nStrat;
27  fPedestalSubFxn_=pedSubFxn_;
28  frespCorr=respCorr;
29 }
30 
32 // Landau function integrated in 1 ns intervals
33 //Landau pulse shape from https://indico.cern.ch/event/345283/contribution/3/material/slides/0.pdf
34 //Landau turn on by default at left edge of time slice
35 // normalized to 1 on [0,10000]
36 void HcalDeterministicFit::getLandauFrac(float tStart, float tEnd, float &sum) const{
37 
38  if (std::abs(tStart-tEnd-tsWidth)<0.1) {
39  sum=0;
40  return;
41  }
42  sum= landauFrac[int(ceil(tStart+tsWidth))];
43  return;
44 }
void init(HcalTimeSlew::ParaSource tsParam, HcalTimeSlew::BiasSetting bias, NegStrategy nStrat, PedestalSub pedSubFxn_, std::vector< double > pars, double respCorr)
#define constexpr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void getLandauFrac(float tStart, float tEnd, float &sum) const