GaisserHillas6Parameter.cc
Go to the documentation of this file.
1 #include <evt/GaisserHillas6Parameter.h>
2 #include <utl/ErrorLogger.h>
3 #include <utl/AugerUnits.h>
4 #include <utl/Math.h>
5 
6 #include <cmath>
7 
8 using namespace evt;
9 using namespace utl;
10 using namespace std;
11 
12 
14  fXZero(0),
15  fXZeroError(0),
16  fA(0),
17  fAError(0),
18  fB(0),
19  fBError(0),
20  fC(0),
21  fCError(0)
22 { }
23 
24 
25 double
26 GaisserHillas6Parameter::Eval(const double depth)
27  const
28 {
29  if (depth <= fXZero)
30  return 0;
31 
32  const double dx = fXMax - fXZero;
33  const double lambda = fA + depth*fB + Sqr(depth)*fC;
34 
35  return fNMax * pow((depth - fXZero) / dx, dx / lambda) *
36  exp((fXMax - depth) / lambda);
37 }
38 
39 
40 void
42  const
43 {
44  os << "GH function with 6 parameters\n"
45  " X_0 = " << fXZero/(g/cm2) << " g/cm2 (sigma = " << fXZeroError/(g/cm2) << ")\n"
46  " X_max = " << fXMax/(g/cm2) << " g/cm2 (sigma = " << fXMaxError/(g/cm2) << ")\n"
47  " N_max = " << fNMax << " (sigma = " << fNMaxError << ")\n"
48  " a = " << fA/(g/cm2) << " (sigma = " << fAError/(g/cm2) << ")\n"
49  " b = " << fB << " (sigma = " << fBError << ")\n"
50  " c = " << fC*(g/cm2) << " (sigma = " << fCError*(g/cm2) << ")\n";
51 }
52 
53 
54 double
56  const
57 {
58  WARNING("not implemented!");
59  return 0;
60 }
61 
62 
63 double
65  const
66 {
67  WARNING("not implemented!");
68  return 0;
69 }
constexpr T Sqr(const T &x)
double pow(const double x, const unsigned int i)
double Eval(const double depth) const
constexpr double g
Definition: AugerUnits.h:200
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
void Dump(std::ostream &os=std::cout) const
double GetIntegralError() const
return relative error of integral
constexpr double cm2
Definition: AugerUnits.h:118

, generated on Tue Sep 26 2023.