GaisserHillasParameters_ROOT.cc
Go to the documentation of this file.
1 #include <io/GaisserHillasParameters_ROOT.h>
2 #include <evt/VGaisserHillasParameter.h>
3 #include <evt/GaisserHillas2Parameter.h>
4 #include <evt/GaisserHillas4Parameter.h>
5 #include <evt/GaisserHillas6Parameter.h>
6 #include <evt/GaisserHillasTypes.h>
7 
8 using namespace io;
9 
10 
12 
13 
14 GaisserHillasParameters_ROOT::GaisserHillasParameters_ROOT(const evt::VGaisserHillasParameter& g) :
15  fXMax(g.GetXMax()),
16  fXMaxError(g.GetXMaxError()),
17  fNMax(g.GetNMax()),
18  fNMaxError(g.GetNMaxError()),
19  fRhoNMaxXMax(g.GetNMaxXMaxCorrelation()),
20  fChiSqr(g.GetChiSquare()),
21  fNdof(g.GetNdof()),
22  fGHtype(eUndefined),
23  fGHFunctionType(evt::gh::eClassic),
24  fIsdEdXProfile(g.IsdEdXProfile())
25 {
26  if (dynamic_cast<const evt::GaisserHillas2Parameter*>(&g)) {
27  fGHtype = e2Parameter;
28  } else {
29  const evt::GaisserHillas4Parameter* const gh4 =
30  dynamic_cast<const evt::GaisserHillas4Parameter*>(&g);
31  if (gh4) {
32  fGHFunctionType = gh4->GetFunctionType();
33  fGHtype = e4Parameter;
34 
35  const evt::gh::EShapeParameter lambda =
38  const evt::gh::EShapeParameter x0 =
41 
42  fXZero = gh4->GetShapeParameter(x0);
43  fXZeroError = gh4->GetShapeParameterError(x0);
44  fA = gh4->GetShapeParameter(lambda);
45  fAError = gh4->GetShapeParameterError(lambda);
46 
47  fRhoNMaxX0 = gh4->GetCorrelationNMaxShapeParameter(x0);
48  fRhoNMaxA = gh4->GetCorrelationNMaxShapeParameter(lambda);
49  fRhoXMaxX0 = gh4->GetCorrelationXMaxShapeParameter(x0);
50  fRhoXMaxA = gh4->GetCorrelationXMaxShapeParameter(lambda);
51  fRhoAX0 = gh4->GetCorrelationShapeParameters();
52  } else {
53  const evt::GaisserHillas6Parameter* const gh6 =
54  dynamic_cast<const evt::GaisserHillas6Parameter*>(&g);
55  if (gh6) {
56  fGHtype = e6Parameter;
57  fXZero = gh6->GetXZero();
58  fXZeroError = gh6->GetXZeroError();
59  fA = gh6->GetA();
60  fAError = gh6->GetAError();
61  fB = gh6->GetB();
62  fBError = gh6->GetBError();
63  fC = gh6->GetC();
64  fCError = gh6->GetCError();
65  }
66  }
67  }
68 }
69 
70 
71 void
73  const
74 {
75  switch (fGHtype) {
76  case e2Parameter:
78  break;
79  case e4Parameter:
80  {
81  evt::GaisserHillas4Parameter* const gh4 =
83 
84  const evt::gh::EShapeParameter lambda =
87  const evt::gh::EShapeParameter x0 =
91  gh4->SetShapeParameter(lambda, fA, fAError);
97 
98  g = gh4;
99  break;
100  }
101  case e6Parameter:
102  {
104  gh6->SetXZero(fXZero, fXZeroError);
105  gh6->SetA(fA, fAError);
106  gh6->SetB(fB, fBError);
107  gh6->SetC(fC, fCError);
108  g = gh6;
109  break;
110  }
111  default:
113  }
114 
115  g->SetXMax(fXMax, fXMaxError);
119 }
double GetShapeParameter(const gh::EShapeParameter par) const
access to all variants of shape parameters (see GaisserHillasTypes.h)
double GetCorrelationXMaxShapeParameter(const gh::EShapeParameter par) const
double GetCorrelationNMaxShapeParameter(const gh::EShapeParameter par) const
void SetNMaxXMaxCorrelation(const double rho)
void SetXMax(const double xMax, const double error)
void SetShapeParameter(const gh::EShapeParameter par, const double value, const double error)
Setters.
void operator>>(evt::VGaisserHillasParameter *&g) const
void SetB(const double b, const double error)
void SetXZero(const double xZero, const double error)
void SetC(const double c, const double error)
constexpr double g
Definition: AugerUnits.h:200
void SetChiSquare(const double chi, const unsigned int ndof)
Gaisser Hillas with 4 parameters.
gh::EShapeParameter InternalToExternal(const EInternalShapeParameter) const
void SetNMax(const double nMax, const double error, const bool isEnergyDeposit=false)
void SetA(const double a, const double error)
Interface class for access to the Gaisser-Hillas parameters.
void SetCorrelationNMaxShapeParameter(const gh::EShapeParameter par, const double rho)
double GetShapeParameterError(const gh::EShapeParameter par) const
gh::EFunctionType GetFunctionType() const
Gaisser Hillas with 4 parameters.
void SetCorrelationShapeParameters(const double rho)
Gaisser-Hillas with 6 parameters (CORSIKA)

, generated on Tue Sep 26 2023.