8 #include "OscLib/IOscCalc.h"
10 #include "TDirectory.h"
11 #include "TObjString.h"
45 TDirectory* tmp =
dir;
48 TObjString(
"CountingExperiment").Write(
"type");
61 TObjString* ptag = (TObjString*)dir->Get(
"type");
63 assert(ptag->GetString() ==
"CountingExperiment");
65 assert(dir->GetDirectory(
"mc"));
66 assert(dir->GetDirectory(
"data"));
73 if(dir->Get(
"cosmic")) cosmic = (TH1*)dir->Get(
"cosmic");
75 auto ret = std::make_unique<CountingExperiment>(mc, *data);
76 if(cosmic) ret->fCosmic =
cosmic;
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir)
virtual void SaveTo(TDirectory *dir) const
double LogLikelihood(double e, double o)
The log-likelihood formula for a single bin.
Simple record of shifts applied to systematic parameters.
CountingExperiment(const IPrediction *p, const Spectrum &d, const Spectrum &cosmic)
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
process_name opflashCryoW ana
virtual void SaveTo(TDirectory *dir) const override
double Integral(double exposure, double *err=0, EExposureType expotype=kPOT) const
Return total number of events scaled to pot.
Representation of a spectrum in any variable, with associated POT.
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
std::unique_ptr< IPrediction > LoadFrom< IPrediction >(TDirectory *dir)
Standard interface to all prediction techniques.
static std::unique_ptr< CountingExperiment > LoadFrom(TDirectory *dir)
void SaveTo(TDirectory *dir) const