1 #ifndef _ScintillatorLDFFinderKG_LDF_h_
2 #define _ScintillatorLDFFinderKG_LDF_h_
10 #include <utl/AugerException.h>
11 #include <boost/shared_ptr.hpp>
14 namespace ScintillatorLDFFinderKG {
21 LDF(
const std::string& type,
23 const std::vector<double>& pars,
24 const std::vector<double>& uncPars) :
29 else if (type ==
"NKGScintillator")
34 if (pars.size() !=
fPtr->fShapeModelVector.size()) {
35 const std::string err =
36 "number of required parameters does not match XML data vector (shape model)";
39 fPtr->fShapeModelVector = pars;
41 if (uncPars.size() !=
fPtr->fBetaUncertaintyModelVector.size()) {
42 const std::string err =
43 "number of required parameters does not match XML data vector (shape uncertainty model)";
46 fPtr->fBetaUncertaintyModelVector = uncPars;
51 double operator()(
const double r,
const std::vector<double>& shape)
const
52 {
return fPtr->Value(r, shape); }
55 {
return fPtr->FirstDerivative(r, shape); }
58 {
return fPtr->SecondDerivative(r, shape); }
60 std::vector<double>
ShapeModel(
const double cosTheta,
const double showerSize)
const
61 {
return fPtr->ShapeModel(cosTheta, showerSize); }
64 {
return fPtr->BetaUncertainty(showerSize); }
72 {
return fPtr->GetNShapeParameters(); }
75 {
return fPtr->fReferenceDistance; }
79 boost::shared_ptr<VLDF>
fPtr;
double SecondDerivative(const double r, const std::vector< double > &shape) const
double BetaUncertainty(const double showerSize) const
std::vector< double > ShapeModel(const double cosTheta, const double showerSize) const
Base class for exceptions trying to access non-existing components.
double GetReferenceDistance() const
double operator()(const double r, const std::vector< double > &shape) const
LDF(const std::string &type, const double rRef, const std::vector< double > &pars, const std::vector< double > &uncPars)
unsigned int GetNShapeParameters() const
double FirstDerivative(const double r, const std::vector< double > &shape) const
boost::shared_ptr< VLDF > fPtr
const std::string & GetType() const