GHShapeParameters.h
Go to the documentation of this file.
1 #ifndef _GHShapeParameters_h_
2 #define _GHShapeParameters_h_
3 
4 #include <evt/GaisserHillasTypes.h>
5 #include <utl/Function.h>
6 
7 #include <cmath>
8 
9 namespace utl {
10  class Branch;
11 }
12 
13 /*
14  utility class to handle different GH type fitting
15 */
16 namespace FdEnergyDepositFinderKG {
17 
18  enum EOneTwo {
19  eOne = 0,
21  };
22 
24  public:
26  GHShapeParameters(const utl::Branch& config);
27 
30  { return fGHType; }
31 
32  bool HasEnergyDependence() const { if (fGHType==evt::gh::eUSP) return true; return false; }
33 
35  double Mean(const EOneTwo par, const double E) const
36  { return HasEnergyDependence() ? fConstraint[par](E) : fConstraint[par](); }
37 
39  double Variance(const EOneTwo par, const double E) const
40  { return pow(Sigma(par, E), 2); }
41 
43  double Sigma(const EOneTwo par, const double E) const
44  { return HasEnergyDependence() ? fConstraintVariance[par](E) : fConstraintVariance[par](); }
45 
47  double Min(const EOneTwo par) const
48  { return fRangeMin[par]; }
49 
51  double Max(const EOneTwo par) const
52  { return fRangeMax[par]; }
53 
55  double Step(const EOneTwo par) const
56  { return fStep[par]; }
57 
60  { return fParType[par]; }
61 
63  std::string Name(const EOneTwo par) const
65 
67  std::string UnitName(const EOneTwo par) const
68  { return fUnit[par].GetFunction(); }
69 
71  double Unit(const EOneTwo par) const
72  { return fUnit[par](); }
73 
74  private:
78  double fRangeMin[eTwo+1];
79  double fRangeMax[eTwo+1];
80  double fStep[eTwo+1];
83  };
84 }
85 
86 #endif
std::string Name(const EOneTwo par) const
parameter name
evt::gh::EFunctionType Type() const
function type
double Unit(const EOneTwo par) const
parameter unit value
double Step(const EOneTwo par) const
step size for fit
double pow(const double x, const unsigned int i)
Class representing a document branch.
Definition: Branch.h:107
double Variance(const EOneTwo par, const double E) const
constraint variance
Evaluate functions given in a string. The real work is done by the ExpressionParser class...
Definition: Function.h:27
evt::gh::EShapeParameter Type(const EOneTwo par) const
parameter type
double Sigma(const EOneTwo par, const double E) const
constraint sigma
double Min(const EOneTwo par) const
minimum value for fit
std::string GetShapeParameterName(const EShapeParameter par)
double Mean(const EOneTwo par, const double E) const
constraint mean
const std::string & GetFunction() const
Definition: Function.h:33
double Max(const EOneTwo par) const
maximum value for fit
evt::gh::EShapeParameter fParType[eTwo+1]
std::string UnitName(const EOneTwo par) const
parameter unit name

, generated on Tue Sep 26 2023.