FairRoot/PandaRoot
PndSdsFEAmpModelSimple.cxx
Go to the documentation of this file.
1 /*
2  * SdsFEAmpModelSimple.cpp
3  *
4  * Created on: Apr 4, 2011
5  * Author: esch
6  */
7 
9 #include "TMath.h"
10 
12 }
13 
15 }
16 
17 double PndSdsFEAmpModelSimple::Definition(double * x, double *params) {
18 
19  // params[0] = charge time [ns]
20  // params[1] = constant current to discharge the capacitor of the amplifier [e/ns]
21  // params[2] = charge [e]
22 
23  if( *x <= 0 )
24  {
25  return 0;
26  }
27  else if (*x <= params[0])
28  {
29  return *x * params[2] / params[0];
30  }
31  else
32  {
33  return TMath::Max( params[2]- ((*x- params[0])* params[1]),0.0);
34  }
35 }
36 
38 
39  return fModelNumber;
40 }
41 
42 
double Definition(double *x, double *params)
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:36
Double_t x