36 struct experiment_type {
48 friend inline std::istream&
operator>>(std::istream& in, experiment_type& experiment)
50 return in >> experiment.Hs
62 friend inline std::ostream&
operator<<(std::ostream& out,
const experiment_type& experiment)
64 return out << experiment.Hs <<
' '
80 printer(
const char*
const title,
93 friend inline std::ostream&
operator<<(std::ostream& out,
const printer& printer)
98 out <<
setw(16) << left << printer.title << right;
100 if (printer.ps !=
NULL) {
102 out <<
' ' <<
setw(16) << left << printer.ps->GetName() << right;
104 const TH1* h1 =
dynamic_cast<const TH1*
>(printer.ps);
107 out <<
' ' <<
FIXED(10,3) << h1->GetSumOfWeights();
115 const char*
const title;
150 "douplets of signal and background histograms, "
151 <<
"each of which defined by <file name>:<histogram name>");
154 zap[
'B'] =
make_field(boost,
"boost livetime of experiment") = 1.0;
157 zap[
'x'] =
make_field(X,
"x-axis signal histogram") = histogram_type(100, -1.0e3, +1.0e3);
164 catch(
const exception& error) {
171 JExperiment::setSNR(
SNR);
173 const double Q = 0.9;
177 for (
const auto& i : setup) {
182 dynamic_cast<TH1*
>(ps)->
Scale(boost);
204 TH1D h0(
"h0",
NULL, X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
205 TH1D h1(
"h1",
NULL, X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
218 h0.Fill(aspera(
true).signal);
240 for (
const double x :
mu_up) {
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
Auxiliary methods for mathematics.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
Auxiliary class to handle file name, ROOT directory and object name.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
std::ostream & operator<<(std::ostream &out, const morphology_type &object)
Write morphology to output stream.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure to fit signal strength using likelihood ratio.
double getSignalStrengthForUpperLimit(const JAspera &aspera, const double Q, const size_t numberOfTests, const double precision=1.0e-4)
Get signal strength given result of experiment and probability of upper limit.
Pseudo experiment using CDF for combined generation and likelihood evaluation.
void add(const TObject *ps, const TObject *pb)
Add objects with PDFs of signal and background.
virtual stats_type run(JAspera &out) const
Generate pseudo experiment and transfer values to fit method.
double getSignal() const
Get total signal.
virtual void set(const double fS, const double fB=1.0) override
Set scaling factors of signal and background strengths.
double getBackground() const
Get total background.
void configure(size_t N)
Configure lookup tables.
Template definition of random value generator.