PredictionExtrapSum.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace ana
7 {
8  class IExtrap;
9 
10  /// Class to sum a set of PredictionExtraps
12  {
13  public:
14 
15  // Load PredictionExtraps with a set of paths from a single file
16  PredictionExtrapSum( TFile* fin, const std::vector<std::string>& paths );
17 
18  // Load PredictionExtraps with a common path from a set of files
19  PredictionExtrapSum( std::vector<TFile*> fins, const std::string& path );
20 
21  virtual ~PredictionExtrapSum();
22 
23  // un-hide inherited method stubs so we don't get warnings from the compiler
25 
26  virtual Spectrum Predict(osc::IOscCalc* calc) const override;
27  virtual Spectrum Predict(osc::IOscCalcStan* calc) const override;
28 
30  Flavors::Flavors_t flav,
32  Sign::Sign_t sign) const override;
34  Flavors::Flavors_t flav,
35  Current::Current_t curr,
36  Sign::Sign_t sign) const override;
37 
38  OscillatableSpectrum ComponentCC(int from, int to) const override;
39  //nc
40  Spectrum ComponentNCTotal() const override;
41  Spectrum ComponentNC() const override;
42  Spectrum ComponentNCAnti() const override;
43  //end nc
44 
45  // Work in progress:
46  //virtual void SaveTo(TDirectory* dir) const override;
47  //static std::unique_ptr<PredictionExtrapSum> LoadFrom(TDirectory* dir);
48 
49  PredictionExtrapSum() = delete;
50 
51  unsigned int NPredictions() const { return fPreds.size(); }
52  const PredictionExtrap* GetPrediction( unsigned int i ) const { return fPreds[i]; }
53 
54  protected:
55  // where the actual work is done
56  template <typename T>
58  Flavors::Flavors_t flav,
59  Current::Current_t curr,
60  Sign::Sign_t sign) const;
61 
62  std::vector<const PredictionExtrap*> fPreds;
63 
64  };
65 }
TString fin
Definition: Style.C:24
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const PredictionExtrap * GetPrediction(unsigned int i) const
virtual Spectrum Predict(osc::IOscCalc *calc) const override
Spectrum ComponentNCTotal() const override
osc::OscCalcDumb calc
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:39
Spectrum ComponentNCAnti() const override
Class to sum a set of PredictionExtraps.
Spectrum ComponentNC() const override
Spectrum _PredictComponent(osc::_IOscCalc< T > *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:49
std::vector< const PredictionExtrap * > fPreds
OscillatableSpectrum ComponentCC(int from, int to) const override
const std::string path
Definition: plot_BEN.C:43
unsigned int NPredictions() const
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
Take the output of an extrapolation and oscillate it as required.
Spectrum with true energy information, allowing it to be oscillated
def sign(x)
Definition: canMan.py:197
enum BeamMode string