All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ana::RatioExperiment Class Reference

#include <RatioExperiment.h>

Inheritance diagram for ana::RatioExperiment:
ana::IExperiment

Public Member Functions

 RatioExperiment (const IPrediction *predND, const IPrediction *predFD, const Spectrum &spectND, const Spectrum &spectFD)
 
virtual double ChiSq (osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
 
- Public Member Functions inherited from ana::IExperiment
virtual ~IExperiment ()
 
virtual void SaveTo (TDirectory *dir) const
 

Protected Attributes

const IPredictionfPredND
 
const IPredictionfPredFD
 
Spectrum fSpectND
 
Spectrum fSpectFD
 

Detailed Description

Definition at line 15 of file RatioExperiment.h.

Constructor & Destructor Documentation

ana::RatioExperiment::RatioExperiment ( const IPrediction predND,
const IPrediction predFD,
const Spectrum spectND,
const Spectrum spectFD 
)
inline

Definition at line 18 of file RatioExperiment.h.

22  : fPredND(predND), fPredFD(predFD), fSpectND(spectND), fSpectFD(spectFD)
23  {
24  }
const IPrediction * fPredFD
const IPrediction * fPredND

Member Function Documentation

double ana::RatioExperiment::ChiSq ( osc::IOscCalcAdjustable osc,
const SystShifts syst = SystShifts::Nominal() 
) const
overridevirtual

Implements ana::IExperiment.

Definition at line 19 of file RatioExperiment.cxx.

21  {
22  osc->SetL(kBaselineSBND);
23  Spectrum predND = fPredND->PredictSyst(osc, syst);
24  osc->SetL(kBaselineIcarus);
25  Spectrum predFD = fPredFD->PredictSyst(osc, syst);
26 
27  predFD *= Ratio(fSpectND, predND);
28 
29  TH1D* hpred = predFD.ToTH1(fSpectFD.POT());
30  TH1D* hdata = fSpectFD.ToTH1(fSpectFD.POT());
31 
32  const double ret = LogLikelihood(hpred, hdata);
33 
34  HistCache::Delete(hpred);
35  HistCache::Delete(hdata);
36 
37  return ret;
38  }
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
double LogLikelihood(double e, double o)
The log-likelihood formula for a single bin.
const double kBaselineIcarus
Definition: ExpInfo.h:10
const IPrediction * fPredFD
static void Delete(TH1D *&h)
Definition: HistCache.cxx:92
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:62
double POT() const
Definition: Spectrum.h:289
const IPrediction * fPredND
const double kBaselineSBND
Definition: ExpInfo.h:8

Member Data Documentation

const IPrediction* ana::RatioExperiment::fPredFD
protected

Definition at line 34 of file RatioExperiment.h.

const IPrediction* ana::RatioExperiment::fPredND
protected

Definition at line 33 of file RatioExperiment.h.

Spectrum ana::RatioExperiment::fSpectFD
protected

Definition at line 36 of file RatioExperiment.h.

Spectrum ana::RatioExperiment::fSpectND
protected

Definition at line 35 of file RatioExperiment.h.


The documentation for this class was generated from the following files: