CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripPulseShape.cc
Go to the documentation of this file.
2 #include <TF1.h>
3 #include <TMath.h>
4 
5 double fpeak(double *x, double *par)
6  {
7  if(x[0]+par[1]<0) return par[0];
8  return par[0]+par[2]*(x[0]+par[1])*TMath::Exp(-(x[0]+par[1])/par[3]);
9  }
10 
11 double fdeconv(double *x, double *par)
12  {
13  double xm = par[4]*(x[0]-25);
14  double xp = par[4]*(x[0]+25);
15  double xz = par[4]*x[0];
16  return 1.2131*fpeak(&xp,par)-1.4715*fpeak(&xz,par)+0.4463*fpeak(&xm,par);
17  }
18 
19 double fpeak_convoluted(double *x, double *par)
20  {
21  TF1 f("peak_convoluted",fpeak,0,200,4);
22  return f.Integral(x[0]-par[4]/2.,x[0]+par[4]/2.,par,1.)/(par[4]);
23  }
24 
25 double fdeconv_convoluted(double *x, double *par)
26  {
27  double xm = (x[0]-25);
28  double xp = (x[0]+25);
29  double xz = x[0];
30  return 1.2131*fpeak_convoluted(&xp,par)-1.4715*fpeak_convoluted(&xz,par)+0.4463*fpeak_convoluted(&xm,par);
31  }
32 
double fdeconv_convoluted(double *x, double *par)
double fpeak_convoluted(double *x, double *par)
double f[11][100]
double fdeconv(double *x, double *par)
double fpeak(double *x, double *par)
x
Definition: VDTMath.h:216