All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SingleSampleExperiment.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace ana
8 {
9  /// Compare a single data spectrum to the MC + cosmics expectation
11  {
12  public:
13  /// \param pred Source of oscillated MC beam predictions
14  /// \param data Data spectrum to compare to
15  /// \param cosmicInTime In-time cosmic ray background component
16  /// \param cosmicOutOfTime Out-of-time cosmic ray background component
18  const Spectrum& data,
19  const Spectrum& cosmicInTime,
20  const Spectrum& cosmicOutOfTime);
21 
22  /// In MC studies you might not want to bother with cosmics
24  const Spectrum& data)
25  : fMC(pred), fData(data), fCosmicInTime(0, {}, {}, 0, 0), fCosmicOutOfTime(0, {}, {}, 0, 0), fMask(0)
26  {
27  }
28 
29  virtual ~SingleSampleExperiment();
30 
31  virtual double ChiSq(osc::IOscCalcAdjustable* osc,
32  const SystShifts& syst = SystShifts::Nominal()) const override;
33 
34  virtual void SaveTo(TDirectory* dir) const override;
35  static std::unique_ptr<SingleSampleExperiment> LoadFrom(TDirectory* dir);
36 
37  // Didn't make provisions for copying fCosmic or fMC
40 
41  // need to explicitly declare move constructor since copy constructor is deleted
43  : fMC(s.fMC),
44  fData(std::move(s.fData)),
47  {
48  s.fMC = nullptr;
49  };
50 
51  void SetMaskHist(double xmin=0, double xmax=-1,
52  double ymin=0, double ymax=-1);
53 
54  protected:
55  const IPrediction* fMC;
58  TH1* fMask;
59  };
60 }
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
process_name opflashCryoW ana
static SystShifts Nominal()
Definition: SystShifts.h:23
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:30
SingleSampleExperiment(SingleSampleExperiment &&s)
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
SingleSampleExperiment(const IPrediction *pred, const Spectrum &data)
In MC studies you might not want to bother with cosmics.
tuple dir
Definition: dropbox.py:28
SingleSampleExperiment & operator=(const SingleSampleExperiment &)=delete
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
Base class defining interface for experiments.
Definition: IExperiment.h:21
SingleSampleExperiment(const IPrediction *pred, const Spectrum &data, const Spectrum &cosmicInTime, const Spectrum &cosmicOutOfTime)
Standard interface to all prediction techniques.
Definition: IPrediction.h:58
void SetMaskHist(double xmin=0, double xmax=-1, double ymin=0, double ymax=-1)
virtual void SaveTo(TDirectory *dir) const override
static std::unique_ptr< SingleSampleExperiment > LoadFrom(TDirectory *dir)
Compare a single data spectrum to the MC + cosmics expectation.