PredictionSystJoint2018.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace ana
6 {
14  };
15 
16  /// Loads shifted spectra from files
18  {
19  public:
20  /// Nue constructor
23  const std::vector<const ISyst*>& systs,
24  std::string beam = "fhc",
25  bool isFakeData = false,
26  bool mergePeripheral = true,
27  const std::string fname = "",
28  bool minimizeMemory = true);
29 
30  /// Numu constructor
32  osc::IOscCalc* osc,
33  const std::string beam,
34  int WhichQuant,
35  const std::vector<const ISyst*>& systs,
36  const std::string fname,
37  bool minimizeMemory = true);
38 
39  virtual ~PredictionSystJoint2018();
40 
41  /// Method to expose fPredNom
42  ///
43  /// \returns fPredNom Unique ptr to nominal prediction
45  {
46  //std::cout << "GETNOMPRED " << fPredNom.get() << std::endl;
47  return fPredNom.get();
48  };
49 
50  /// Method to expose fPreds
51  ///
52  /// \returns shifted prediction (ShiftedPreds) from fPreds
54  {
55  //for (auto shift:fPreds[syst].preds) { std::cout << "\t Func shift: " << shift << " " << std::endl; }
56  return fPreds[syst];
57  };
58 
59  static std::unique_ptr<PredictionSystJoint2018> LoadFrom(TDirectory* dir, const std::string& name);
60  void SaveTo(TDirectory* dir, const std::string& name) const override;
61 
62  protected:
64 
65  /// Must set fBeam first
66  void AddNormSysts(const std::vector<const ISyst*>& systs);
67 
68  void AddNormSyst(const ISyst* syst,
69  const std::vector<const ISyst*>& systs,
70  double frac);
71 
72  std::string SigmaToString(int sigma) const;
73 
74  /// Interprets fBeam
75  bool IsFHC() const;
76 
78  };
79 }
const XML_Char * name
Definition: expat.h:151
void AddNormSysts(const std::vector< const ISyst * > &systs)
Must set fBeam first.
Implements systematic errors by interpolation between shifted templates.
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
bool mergePeripheral
void SaveTo(TDirectory *dir, const std::string &name) const override
Loads shifted spectra from files.
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
const ShiftedPreds & GetShiftedPrediction(const ISyst *syst)
std::unique_ptr< IPrediction > fPredNom
The nominal prediction.
static std::unique_ptr< PredictionSystJoint2018 > LoadFrom(TDirectory *dir, const std::string &name)
double frac(double x)
Fractional part.
Oscillation probability calculators.
Definition: Calcs.h:5
double sigma(TH1F *hist, double percentile)
bool IsFHC() const
Interprets fBeam.
TDirectory * dir
Definition: macro.C:5
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
std::string SigmaToString(int sigma) const
std::unordered_map< const ISyst *, ShiftedPreds > fPreds
void AddNormSyst(const ISyst *syst, const std::vector< const ISyst * > &systs, double frac)
enum BeamMode string