2 #include <evt/GaisserHillas4Parameter.h>
3 #include <utl/Branch.h>
4 #include <utl/UnitGrammar.h>
9 using namespace evt::gh;
12 namespace FdEnergyDepositFinderKG {
21 else if (name ==
"eLambda")
23 else if (name ==
"eFWHM")
25 else if (name ==
"eAsym")
27 else if (name ==
"eUspL")
29 else if (name ==
"eUspR")
33 errMsg <<
"string to enum conversion not implemented for parameter "
42 errMsg <<
"incompatible shape parameter "
44 <<
", from XML name " << name
53 GHShapeParameters::GHShapeParameters(
const Branch& config)
55 const string ghType = config.
GetChild(
"gaisserHillasType").
Get<
string>();
56 if (ghType ==
"eClassic")
58 else if (ghType ==
"eWidth")
60 else if (ghType ==
"eUSP")
65 const Branch ghParB = config.
GetChild(
"gaisserHillasShapeParameters",
69 for (
int index = 0; index < 2; ++index) {
71 ostringstream attribute;
72 attribute <<
"id=" << index + 1;
78 const vector<double> range = par.
GetChild(
"range").
Get<vector<double> >();
79 fRangeMin[i] = range[0];
80 fRangeMax[i] = range[1];
86 errMsg <<
"no configuration found for GH type "
92 GHShapeParameters::GHShapeParameters() :
95 for (
unsigned int i = 0; i <
eTwo + 1; ++i) {
EShapeParameter nameToGHEnum(const string name, const EFunctionType ghType)
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Exception for errors encountered when parsing XML.
std::string GetFunctionTypeName(const EFunctionType type)
Class representing a document branch.
bool IsInternal(const gh::EShapeParameter par) const
check if parameter "par" is one of the internal shape parameters
Evaluate functions given in a string. The real work is done by the ExpressionParser class...
std::string GetShapeParameterName(const EShapeParameter par)
Gaisser Hillas with 4 parameters.