136{
139
141
147 histogram_type X;
149 double precision;
151
152 try {
153
155
157
159 "douplets of signal and background histograms and doublets of signal and background nuisances, \n"
160 << "\teach of which defined by <file name>:<histogram name> and <type> (values), respectively, \n"
161 <<
"\twhere <type> can be:" <<
get_keys(nuisance_helper));
166 zap[
'x'] =
make_field(X,
"x-axis likelihood histogram") = histogram_type(100, -1.0e3, +1.0e3);
170
172 }
173 catch(const exception& error) {
175 }
176
177
179
180 JExperiment::setSNR(
SNR);
181
182 const double Q = 0.9;
183
185
186 for (const auto& i : setup) {
187
192
194 STATUS(printer(
"Background for generation:",
pB) <<
endl);
195 STATUS(printer(
"Signal for evaluation:", ps) <<
endl);
196 STATUS(printer(
"Background for evaluation:",
pb) <<
endl);
197
199
200 pi.nuisance = i.nuisance;
201
203 }
204
207 }
208
212
213
215
217
218 TH1D h0(
"h0",
NULL, X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
219 TH1D h1(
"h1",
NULL, X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
220
221
222
223
225
227
229
231
232 h0.Fill(aspera(true).signal);
233 }
234
235
237
239
242 }
243
245
247
249
251 }
253
254 for (
const double x :
mu_up) {
255 h1.Fill(x);
256 }
257
259
261
262 out.Write();
263 out.Close();
264}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
TObject * getObject(const JRootObjectID &id)
Get first TObject with given identifier.
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
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.
Auxiliary data structure to fit signal strength using likelihood ratio for multiple pseudo experiment...
virtual stats_type run(JAspera &out) const
Generate pseudo experiment and transfer S/N 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.
void configure(size_t N)
Configure lookup tables.
double getBackground() const
Get total background.
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.
Template definition of random value generator.