19int main(
int argc,
char* argv[])
31 JParser<> zap(
"Auxiliary program to determine number of signal events for given background and number of standard deviations.");
40 catch(
const exception &error) {
41 FATAL(error.what() << endl);
45 const double STDEV_MIN = 1.0;
46 const double STDEV_MAX = 7.0;
48 if (stdev < STDEV_MIN || stdev > STDEV_MAX) {
49 FATAL(
"Number of standard deviations out of range [" << STDEV_MIN <<
"," << STDEV_MAX <<
"]" << endl);
52 const double P = getP(stdev);
54 cout <<
"probability (single-sided Gauss): " <<
SCIENTIFIC(12,3) << P << endl;
59 TH1D h0(
"h0", NULL, 500, -2.0, 2.0);
60 TH1D h1(
"h1", NULL, 500, -2.0, 2.0);
62 for (Int_t ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
64 const double x = pow(10.0, h1.GetXaxis()->GetBinCenter(ix));
66 const size_t n = getNs(x, P);
67 const double f = getFs(x, P, precision);
70 <<
" n = " <<
FIXED(7,3) << n - x
71 <<
" f = " <<
FIXED(7,3) << f - x << endl);
73 h0.SetBinContent(ix, n - x);
74 h1.SetBinContent(ix, f - x);
Auxiliary methods for mathematics.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])
Auxiliary program to determine number of signal events for given background and number of standard de...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure for floating point format specification.