PredictionXSecTuning.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace ana
7 {
8  class Loaders;
9 
10  /// Prediction that wraps a simple Spectrum
12  {
13  public:
15  const HistAxis& axis,
16  const Cut& cut,
17  const SystShifts& shift = kNoShift,
18  const Var& wei = kUnweighted);
19 
20  static std::unique_ptr<PredictionXSecTuning> LoadFrom( TDirectory* dir, const std::string& name );
21  virtual void SaveTo( TDirectory* dir, const std::string& name ) const override;
22 
23  // un-hide inherited method stubs so we don't get warnings from the compiler
27 
28  virtual Spectrum Predict( osc::IOscCalc* /*calc*/ ) const override
29  {
30  return fSpectrum;
31  }
32 
34  Flavors::Flavors_t flav,
36  Sign::Sign_t sign ) const override;
37 
38  protected:
40  : fSpectrum( s )
41  {}
42 
44  };
45 
47  {
48  public:
50  const Cut cut,
51  const Var wei = kUnweighted )
52  : fAxis( axis ), fCut( cut ), fWei( wei )
53  {
54  }
55 
56  virtual std::unique_ptr<IPrediction>
57  Generate( Loaders& loaders, const SystShifts& shiftMC = kNoShift ) const override
58  {
59  return std::unique_ptr<IPrediction>( new PredictionXSecTuning(
60  loaders, fAxis, fCut, shiftMC, fWei ) );
61  }
62  protected:
63  const HistAxis fAxis;
64  const Cut fCut;
65  const Var fWei;
66  };
67 
68 }
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const =0
virtual Spectrum Predict(osc::IOscCalc *calc) const =0
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
static std::unique_ptr< PredictionXSecTuning > LoadFrom(TDirectory *dir, const std::string &name)
osc::OscCalcDumb calc
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
virtual Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
const XML_Char * s
Definition: expat.h:262
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:49
PredictionXSecTuning(Loaders &loaders, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
const SystShifts kNoShift
Definition: SystShifts.cxx:22
const Cut cut
Definition: exporter_fd.C:30
Prediction that wraps a simple Spectrum.
TDirectory * dir
Definition: macro.C:5
std::vector< Loaders * > loaders
Definition: syst_header.h:386
virtual Spectrum Predict(osc::IOscCalc *) const override
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
XSecTuningPredGenerator(const HistAxis axis, const Cut cut, const Var wei=kUnweighted)
Given loaders and an MC shift, Generate() generates an IPrediction.
virtual std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
PredictionXSecTuning(const Spectrum &s)
def sign(x)
Definition: canMan.py:197
enum BeamMode string