CountingExperiment.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "CAFAna/Core/Spectrum.h"
5 
6 
7 namespace ana
8 {
9  class IPrediction;
10 
11  /// Compare a data spectrum to MC expectation using only the event count
13  {
14  public:
15  CountingExperiment(const IPrediction* p, const Spectrum& d, const Spectrum& cosmic);
16  /// Version without cosmics may be wanted for MC studies
17  CountingExperiment(const IPrediction* p, const Spectrum& d) : fMC(p), fData(d), fCosmic(0) {}
19  virtual double ChiSq(osc::IOscCalcAdjustable* osc,
20  const SystShifts& syst = SystShifts::Nominal()) const override;
21 
22  virtual void SaveTo(TDirectory* dir, const std::string& name) const override;
23  static std::unique_ptr<CountingExperiment> LoadFrom(TDirectory* dir, const std::string& name);
24  protected:
25  const IPrediction* fMC;
27  TH1* fCosmic;
28  };
29 }
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
CountingExperiment(const IPrediction *p, const Spectrum &d, const Spectrum &cosmic)
const char * p
Definition: xmltok.h:285
static SystShifts Nominal()
Definition: SystShifts.h:34
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
Sum up livetimes from individual cosmic triggers.
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
static std::unique_ptr< CountingExperiment > LoadFrom(TDirectory *dir, const std::string &name)
Float_t d
Definition: plot.C:236
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
Oscillation probability calculators.
Definition: Calcs.h:5
CountingExperiment(const IPrediction *p, const Spectrum &d)
Version without cosmics may be wanted for MC studies.
const IPrediction * fMC
TDirectory * dir
Definition: macro.C:5
Base class defining interface for experiments.
Definition: IExperiment.h:14
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
Compare a data spectrum to MC expectation using only the event count.
enum BeamMode string