testGaisserHillas4Parameter.cc
Go to the documentation of this file.
1 
7 #include <evt/GaisserHillas4Parameter.h>
9 
10 #include <utl/AugerUnits.h>
11 #include <utl/ErrorLogger.h>
12 
13 #include <tst/Verify.h>
14 #include <cppunit/extensions/HelperMacros.h>
15 #include <vector>
16 
17 #include <iostream>
18 
19 using namespace std;
20 using namespace utl;
21 using namespace evt;
22 using namespace tst;
23 
24 
25 void
27 {
28 
29  const double xMax = 700;
30  const double xMaxError = 30;
31  const double nMax = 1e6;
32  const double nMaxError = 1e5;
33  const double x0 = -150;
34  const double x0Error = 2;
35  const double lambda = 60;
36  const double lambdaError = 6;
37 
39 
40  ghClassic.SetXMax(xMax, xMaxError);
41  ghClassic.SetNMax(nMax, nMaxError);
42  ghClassic.SetShapeParameter(gh::eX0, x0, x0Error);
43  ghClassic.SetShapeParameter(gh::eLambda, lambda,lambdaError);
44  //ghClassic.SetChiSquare(0.1, 1);
45 
47 
48  ghWidth.SetXMax( ghClassic.GetXMax(), ghClassic.GetXMaxError() );
49  ghWidth.SetNMax( ghClassic.GetNMax(), ghClassic.GetXMaxError() );
51  ghClassic.GetShapeParameter(gh::eFWHM),
54  ghClassic.GetShapeParameter(gh::eAsym),
56 
57  CPPUNIT_ASSERT(Verify<Equal>(ghWidth.GetXMax(), xMax));
58  CPPUNIT_ASSERT(Verify<Equal>(ghWidth.GetNMax(), nMax));
59  CPPUNIT_ASSERT(Verify<CloseTo>(ghWidth.GetShapeParameter(gh::eX0), x0));
60  CPPUNIT_ASSERT(Verify<CloseTo>(ghWidth.GetShapeParameter(gh::eLambda), lambda));
61 
62 }
63 
64 void
66 {
67 
68  const double xMax = 700;
69  const double xMaxError = 30;
70  const double nMax = 1e8;
71  const double nMaxError = 1e7;
72  const double fwhm = 550;
73  const double fwhmError = 50;
74  const double asym = 0.45;
75  const double asymError = 0.01;
76 
78 
79  ghWidth.SetXMax(xMax,xMaxError);
80  ghWidth.SetNMax(nMax,nMaxError);
81  ghWidth.SetShapeParameter(gh::eFWHM, fwhm, fwhmError);
82  ghWidth.SetShapeParameter(gh::eAsym, asym, asymError);
83 
85 
86  ghClassic.SetXMax(ghWidth.GetXMax(), ghWidth.GetXMaxError());
87  ghClassic.SetNMax(ghWidth.GetNMax(), ghWidth.GetXMaxError());
88  ghClassic.SetShapeParameter(gh::eX0,
89  ghWidth.GetShapeParameter(gh::eX0),
94 
95  CPPUNIT_ASSERT(Verify<Equal>(ghClassic.GetXMax(), xMax));
96  CPPUNIT_ASSERT(Verify<Equal>(ghClassic.GetNMax(), nMax));
97  CPPUNIT_ASSERT(Verify<CloseTo>(ghClassic.GetShapeParameter(gh::eFWHM), fwhm));
98  CPPUNIT_ASSERT(Verify<CloseTo>(ghClassic.GetShapeParameter(gh::eAsym), asym));
99 
100 }
101 
102 void
104 {
106  ghWidth.SetShapeParameter(gh::eX0, 10, 10);
107 }
108 
109 void
111 {
113  ghClassic.SetShapeParameter(gh::eFWHM, 10, 10);
114 }
115 
116 
double GetShapeParameter(const gh::EShapeParameter par) const
access to all variants of shape parameters (see GaisserHillasTypes.h)
void SetXMax(const double xMax, const double error)
void SetShapeParameter(const gh::EShapeParameter par, const double value, const double error)
Setters.
void SetNMax(const double nMax, const double error, const bool isEnergyDeposit=false)
double GetShapeParameterError(const gh::EShapeParameter par) const
Gaisser Hillas with 4 parameters.

, generated on Tue Sep 26 2023.