1 #ifndef _LDFFinderKG_LDF_h_
2 #define _LDFFinderKG_LDF_h_
15 #include <utl/AugerException.h>
16 #include <boost/shared_ptr.hpp>
19 namespace LDFFinderKG {
26 LDF(
const std::string& type,
28 const std::vector<double>& pars,
29 const std::vector<double>& uncPars) :
34 else if (type ==
"NKGAS")
36 else if (type ==
"NKGFermi")
38 else if (type ==
"NKGBetaOnly")
40 else if (type ==
"PowerLaw")
42 else if (type ==
"ExpSqrtPoly")
44 else if (type ==
"NKGAG")
49 if (pars.size() !=
fPtr->fShapeModelVector.size()) {
50 const std::string err =
51 "number of required parameters does not match XML data vector (shape model)";
54 fPtr->fShapeModelVector = pars;
56 if (uncPars.size() !=
fPtr->fBetaUncertaintyModelVector.size()) {
57 const std::string err =
58 "number of required parameters does not match XML data vector (shape uncertainty model)";
61 fPtr->fBetaUncertaintyModelVector = uncPars;
66 double operator()(
const double r,
const std::vector<double>& shape)
const
67 {
return fPtr->Value(r, shape); }
70 {
return fPtr->SecondDerivative(r, shape); }
72 std::vector<double>
ShapeModel(
const double cosTheta,
const double showerSize)
const
73 {
return fPtr->ShapeModel(cosTheta, showerSize); }
76 {
return fPtr->BetaUncertainty(showerSize); }
84 {
return fPtr->GetNShapeParameters(); }
87 {
return fPtr->fReferenceDistance; }
91 boost::shared_ptr<VLDF>
fPtr;
LDF(const std::string &type, const double rRef, const std::vector< double > &pars, const std::vector< double > &uncPars)
Base class for exceptions trying to access non-existing components.
double BetaUncertainty(const double showerSize) const
std::vector< double > ShapeModel(const double cosTheta, const double showerSize) const
double SecondDerivative(const double r, const std::vector< double > &shape) const
boost::shared_ptr< VLDF > fPtr
double operator()(const double r, const std::vector< double > &shape) const
const std::string & GetType() const
double GetReferenceDistance() const
unsigned int GetNShapeParameters() const