1 #ifndef _LDFFinderKG_NKGFermiLDF_h_
2 #define _LDFFinderKG_NKGFermiLDF_h_
9 #include <utl/AugerUnits.h>
12 namespace LDFFinderKG {
20 Value(
const double r,
const std::vector<double>&
shape)
24 const double beta = shape[0];
26 const double mu = shape[2];
27 const double tau = shape[3];
29 return NKG(r, rRef, beta, gamma) * FermiSuppression(r, rRef, mu, tau);
37 const double beta = shape[0];
38 const double gamma = shape[1];
39 const double mu = shape[2];
40 const double tau = shape[3];
43 const double expofunc = std::exp((r - mu)/tau);
44 const double fermi = 1 / (expofunc + 1);
47 NKG(r, rRef, beta, gamma) * (2*beta*r + beta*k700 + gamma*r) / (r * (r + k700));
49 nkgFirstDerivative * (expofunc/tau *
fermi2) +
50 NKG(r, rRef, beta, gamma) * fermi2 / (tau*
tau) * expofunc * (2*fermi + 1);
54 ShapeModel(
const double cosTheta,
const double showerSize)
57 const double lgSRef = std::log10(showerSize);
81 std::vector<double>
shape(4);
82 double& beta = shape[0];
83 double& gamma = shape[1];
84 double& mu = shape[2];
85 double& tau = shape[3];
87 beta = a0 + a1*lgSRef + secTheta*(b0 + b1*lgSRef + secTheta*(c0 + c1*lgSRef));
104 const double lgS = std::log10(showerSize);
112 FermiSuppression(
const double r,
const double rRef,
const double mu,
const double tau)
116 return (
exp((rRef - mu)/tau) + 1) / (
exp((r - mu)/tau) + 1);
120 NKG(
const double r,
const double rRef,
const double beta,
const double gamma)
124 return pow(r/rRef, beta) *
125 pow((k700 + r) / (rRef + k700), beta+gamma);
129 NKGSecondDerivative(
const double r,
const double rRef,
const double beta,
const double gamma)
135 return NKG(r, rRef, beta, gamma) * (
137 (tbg - 1)*(2*k700*beta*r + tbg*
r2)
return fBetaUncertaintyModelVector *[0] exp(fBetaUncertaintyModelVector[1]*lgS)
constexpr T Sqr(const T &x)
const double fReferenceDistance
std::vector< double > fShapeModelVector
return pow(r/rRef, beta)*pow((k700+r)/(rRef+k700)
const double nkgFirstDerivative
virtual double Value(const double r, const std::vector< double > &shape) const =0
virtual double SecondDerivative(const double r, const std::vector< double > &shape) const =0
std::vector< double > fBetaUncertaintyModelVector
return NKG(r, rRef, beta, gamma)*FermiSuppression(r
return NKGSecondDerivative(r, rRef, beta, gamma)*fermi+nkgFirstDerivative *(expofunc/tau *fermi2)+NKG(r
NKGFermiLDF(const double refDistance)
virtual std::vector< double > ShapeModel(const double cosTheta, double showerSize) const =0
unsigned int GetNShapeParameters() const
virtual double BetaUncertainty(const double showerSize) const =0