1#ifndef __JASTRONOMY__JASTRONOMYTOOLKIT__
2#define __JASTRONOMY__JASTRONOMYTOOLKIT__
21 template<
class T, const
size_t factor>
48 const size_t numberOfTests,
49 const double precision = 1.0e-3)
64 while (xmax - xmin > precision) {
66 const double x = 0.5 * (xmin + xmax);
74 return 0.5 * (xmin + xmax);
88 const size_t numberOfTests)
94 for (
size_t i = 0; i != numberOfTests; ++i) {
95 this->
put(
px().likelihood);
115 template<
class T, const
size_t factor>
119 const size_t numberOfTests,
120 const double precision = 1.0e-3)
124 return discovery(Q, P, numberOfTests, precision);
double discovery(JPseudoExperiment_t &px, const double Q, const double P, const size_t numberOfTests, const double precision=1.0e-3)
Run pseudo experiments to determine signal strength for which given likelihood is exceeded with given...
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for discovery calculations.
double operator()(const double Q, const double P, const size_t numberOfTests, const double precision=1.0e-3)
Get signal strength for which given likelihood is exceeded with given probability.
JDiscovery(JPseudoExperiment_t &px)
Constructor.
double getProbability(const double fS, const double Q, const size_t numberOfTests)
Run pseudo experiments to get probability corresponding to given minimal likelihood.
Auxiliary container for statistical analysis of a large number of positive (or zero) values.
Auxiliary interface for pseudo experiment.
virtual void set(const double fS, const double fB=1.0)=0
Set scaling factors of signal and background strengths.