1 #include "UnivTimeKGConfig.h"
3 #include <tls/UnivTimeKGLogNormal.h>
5 #include <Math/PdfFuncMathCore.h>
6 #include <Math/ProbFuncMathCore.h>
7 #include <Math/QuantFuncMathCore.h>
17 namespace UnivTimeKG {
23 LogNormalTimeModel::LogNormalTimeModel()
24 :
m(0),
s(0), moff(0), soff(0) { }
36 for (
int ilnpar = 0; ilnpar <= 1; ++ilnpar) {
37 for (
int ipar = 0; ipar <= 1; ++ipar) {
38 std::ostringstream stringStream;
39 std::string baseDir = DATA_DIR;
40 stringStream << baseDir <<
"/LogNormal/parameters/pars_"
41 <<
icomp <<
"_" << ilnpar <<
"_" << ipar;
52 const double g1 = pars[0];
53 const double g2 = pars[1];
54 return 1e6 *
pow((1 +
pow((0.888889 + 0.000222222 * DX), 2.0)), (-0.5 * g2)) *
pow((4000.0 + DX), (-g1));
55 }
else if (ipar == 1) {
56 const double a = pars[2];
57 const double b = pars[3];
60 cout <<
"bad parameter number!" << endl;
68 const double ,
const double )
70 vector<double> params;
98 return ROOT::Math::lognormal_pdf(t,
m,
s, 0);
108 return ROOT::Math::lognormal_cdf(t,
m,
s, 0);
117 return ROOT::Math::lognormal_quantile(quantile,
m,
s);
void interpolateParameters(const double DX, const double r, const double psi, std::vector< double > &output)
void setParameterOffsets(const double m, const double s)
void setShapeParameters(const double DX, const double r, const double psi, const double theta, const double lgE)
double pow(const double x, const unsigned int i)
double getShapeParameter(const unsigned int ipar, const std::vector< double > &pars, const double DX)
double invcdf(const double)
void addInterpolationTable(const std::vector< double > &xs, const std::vector< double > &ys, const std::vector< std::vector< double > > &data)
void setShapeParametersDirectly(const double mm, const double ss)