120{
123
125 double SNR;
127
128 try {
129
131
133 "triplets of data, signal and background histograms, "\
134 "each of which defined by <file name>:<histogram name>");
135 zap[
'R'] =
make_field(SNR,
"signal-to-noise ratio") = 0.0;
137
138 zap(argc, argv);
139 }
140 catch(const exception& error) {
141 FATAL(error.what() << endl);
142 }
143
144
145 JExperiment::setSNR(SNR);
146
148
149 for (const auto& i : setup) {
150
154
155 STATUS(printer(
"Data:", pd) << endl);
156 STATUS(printer(
"Signal:", ps) << endl);
157 STATUS(printer(
"Background:", pb) << endl);
158
160 }
161
162
163 const JRealExperiment::fit_type
result = rx();
164
165
166 cout <<
"signal: " <<
FIXED(9,3) << rx.
getSignal() <<
"/" << setw(6) << rx.size() << endl;
168
169 if (
debug >= debug_t) {
170
172
173 for (double x : rx) {
174
175 cout <<
SCIENTIFIC(12,3) << 1.0/
x << ((
n + 1)%10 == 0 ?
"\n" :
" ");
176
178 }
179 cout << endl;
180 }
181
182 cout << "result: "
185}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
TObject * getObject(const JRootObjectID &id)
Get first TObject with given identifier.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
double getSignal() const
Get total signal strength.
double getDerivative(const double p) const
Get derivative of likelihood for given signal strength.
Real experiment using PDF of signal and background.
void add(const TObject *pd, const TObject *ps, const TObject *pb)
Add objects with data and PDFs of signal and background.
Auxiliary data structure for floating point format specification.