180{
183
185
194 histogram_type X;
197
198 try {
199
202
204 "inputs for 1st data period: signal and background histograms for generation and evaluation,\n"
205 << "\texposure boost, and signal and background nuisances, provided as\n"
206 << "\t'<file>:<hgen_s name> <file>:<hgen_b name> <file>:<heval_s name> <file>:<heval_b name> <boost> <type_s> (values) <type_b> (values)' \n"
207 <<
"\twhere <type> can be:" <<
get_keys(nuisance_helper) <<
"\n."
208 << "\t Can be called repeatedly to add multiple datasets to this period");
210 "inputs for 2nd data period: signal and background histograms for generation and evaluation,\n"
211 << "\texposure boost, and signal and background nuisances, provided as\n"
212 << "\t'<file>:<hgen_s name> <file>:<hgen_b name> <file>:<heval_s name> <file>:<heval_b name> <boost> <type_s> (values) <type_b> (values)' \n"
213 <<
"\twhere <type> can be:" <<
get_keys(nuisance_helper) <<
"\n."
214 << "\t Can be called repeatedly to add multiple datasets to this period");
221 zap[
'x'] =
make_field(X,
"x-axis for likelihood histogram") = histogram_type(200, 0, +20.0);
224
226 }
227 catch(const exception& error) {
229 }
230
231
233 JExperiment::setSNR(
SNR);
234
235
236 cout <<
"**Setting up 1st period**" <<
endl;
238 cout <<
"**Setting up 2nd period**" <<
endl;
240
242
243 TH2D h2d_nllr(
"h2d_nllr",
"Negative Log-Likelihood Ratio; NLLR 1st period; NLLR total",
244 X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit(),
245 X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
246 TH2D h2d_nllr_constr(
"h2d_nllr_constr",
"Negative Log-Likelihood Ratio (filtered); NLLR 1st period; NLLR total",
247 X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit(),
248 X.getNumberOfBins(), X.getLowerLimit(), X.getUpperLimit());
249
252 if (
nexp%100000 == 0) {
254 }
255
259
260 for (
const auto& px :
pxg_1.px_vec) { px.
run(aspera); }
262
263 for (
const auto& px :
pxg_2.px_vec) { px.
run(aspera); }
265
270 }
273 }
274
279 }
280
281 }
282
284
287 out.Write();
288 out.Close();
289}
#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.
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 to fit signal strength using likelihood ratio.
Pseudo experiment using CDF for combined generation and likelihood evaluation.
virtual stats_type run(JAspera &out) const
Generate pseudo experiment and transfer values to fit method.
Template definition of random value generator.