BCMath.h
53 double LogSplitGaus(double x, double mode, double sigma_below, double sigma_above, bool norm = false);
165 double CorrectPValue(const double& pvalue, const unsigned& npar, const unsigned& nobservations);
double LogApproxBinomial(unsigned n, unsigned k, double p)
Calculates natural logarithm of the Binomial probability using approximations for factorial calculati...
Definition: BCMath.cxx:79
double LogFact(unsigned n)
Calculates natural logarithm of the n-factorial (n!)
Definition: BCMath.cxx:141
double LogBinomFactorExact(unsigned n, unsigned k)
Calculates natural logarithm of the Binomial factor "n over k".
Definition: BCMath.cxx:191
double FastPValue(const std::vector< unsigned > &observed, const std::vector< double > &expected, unsigned nIterations=1e5, unsigned seed=0)
Calculate the p value using fast MCMC for a histogram and the likelihood as test statistic.
Definition: BCMath.cxx:310
double LogBreitWignerNonRel(double x, double mean, double Gamma, bool norm=false)
Calculates the logarithm of the nonrelativistic Breit-Wigner distribution.
Definition: BCMath.cxx:214
double LogBreitWignerRel(double x, double mean, double Gamma)
Calculates the logarithm of the relativistic Breit-Wigner distribution.
Definition: BCMath.cxx:226
double LogBinomFactor(unsigned n, unsigned k)
Calculates natural logarithm of the Binomial factor "n over k" using approximations for factorial cal...
Definition: BCMath.cxx:111
double LogLogNormal(double x, double mean=0, double sigma=1)
Return the log of the log normal distribution.
Definition: BCMath.cxx:268
double LogChi2(double x, int n)
Calculates the logarithm of chi square function: chi2(double x; size_t n)
Definition: BCMath.cxx:233
double LogGammaPDF(double x, double alpha, double beta)
Returns the log of the Gamma PDF.
Definition: BCMath.cxx:262
double CorrectPValue(const double &pvalue, const unsigned &npar, const unsigned &nobservations)
Correct a p value by transforming to a chi^2 with dof=nobservations, then back to a pvalue with dof r...
Definition: BCMath.cxx:285
double ApproxLogFact(double x)
Calculates natural logarithm of the n-factorial (n!) using Srinivasa Ramanujan approximation log(n!) ...
Definition: BCMath.cxx:130
double LogVoigtian(double x, double sigma, double gamma)
Calculates the logarithm of normalized voigtian function: voigtian(double x, double sigma...
Definition: BCMath.cxx:251
double LogSplitGaus(double x, double mode, double sigma_below, double sigma_above, bool norm=false)
Calculate the natural logarithm of a normal distribution function with different variances below and ...
Definition: BCMath.cxx:44
double LogGaus(double x, double mean=0, double sigma=1, bool norm=false)
Calculate the natural logarithm of a normal distribution function.
Definition: BCMath.cxx:24
double ApproxBinomial(unsigned n, unsigned k, double p)
Calculates Binomial probability using approximations for factorial calculations if calculation for nu...
Definition: BCMath.cxx:97
double LogPoisson(double x, double lambda)
Calculate the natural logarithm of a poisson distribution.
Definition: BCMath.cxx:53