ExponentialFitData.h
Go to the documentation of this file.
1 #ifndef _utl_ExponentialFitData_h_
2 #define _utl_ExponentialFitData_h_
3 
4 #include <utl/ExponentialFitter-fwd.h>
5 
6 #include <cmath>
7 
8 
9 namespace utl {
10 
12  public:
14 
15  double GetStart() const { return fStart; }
16  double GetStop() const { return fStop; }
17  double GetAmplitude() const { return fAmplitude; }
18  double GetAmplitudeError() const { return fAmplitudeError; }
19  double GetSlope() const { return fSlope; }
20  double GetSlopeError() const { return fSlopeError; }
21  double GetOffset() const { return fOffset; }
22  double GetChi2() const { return fChi2; }
23  int GetNdof() const { return fNdof; }
24 
25  double operator()(const double x) const
26  { return fAmplitude * std::exp(fSlope*x); }
27 
28  void SetStart(const double start) { fStart = start; }
29  void SetStop(const double stop) { fStop = stop; }
30  void SetAmplitude(const double amp, const double ampErr)
31  { fAmplitude = amp; fAmplitudeError = ampErr; }
32  void SetSlope(const double slope, const double slopeErr)
33  { fSlope = slope; fSlopeError = slopeErr; }
34  void SetOffset(const double offset)
35  { fOffset = offset; }
36  void SetChi2Ndof(const double chi2, const int ndof)
37  { fChi2 = chi2; fNdof = ndof; }
38 
39  private:
40  double fStart = 0;
41  double fStop = 0;
42  double fAmplitude = 0;
43  double fAmplitudeError = 0;
44  double fSlope = 0;
45  double fSlopeError = 0;
46  double fOffset = 0;
47  double fChi2 = 0;
48  int fNdof = 0;
49 
50  template<class Histogram>
51  friend class utl::ExponentialFitter;
52  };
53 
54 }
55 
56 #endif
void SetSlope(const double slope, const double slopeErr)
void SetChi2Ndof(const double chi2, const int ndof)
void SetAmplitude(const double amp, const double ampErr)
Fit exponential function.
double GetAmplitude() const
void SetOffset(const double offset)
void SetStop(const double stop)
void SetStart(const double start)
double GetSlopeError() const
double GetAmplitudeError() const
double operator()(const double x) const

, generated on Tue Sep 26 2023.