7 #include "Utils/HistogramUtils.h"
64 virtual double GetWeight(Long64_t jentry,
size_t iSyst,
int iKnot) = 0;
66 virtual double GetWeight(Long64_t jentry,
size_t iSyst,
double Value) = 0;
96 std::unique_ptr<MaCh3Modes>
Modes;
103 std::vector<std::vector<std::vector<std::vector<std::unique_ptr<TSpline3>>>>>
splines;
105 std::vector<std::vector<std::vector<std::vector<std::unique_ptr<TGraph>>>>>
graphs;
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
Contains definitions for spline coefficients and structure used in both CPU and GPU code.
Contains structures and helper functions for handling spline representations of systematic parameters...
Base class for producing binned splines in MaCh3.
BinnedSplineMakerBase(const std::string &Config)
Constructor.
std::vector< std::vector< std::vector< std::vector< std::unique_ptr< TSpline3 > > > > > splines
Cubic spline interpolators for each bin and systematic mode.
virtual void LoadVariables()=0
Hook allowing to load experiment spagyric variables trees etc.
std::vector< std::vector< std::vector< std::vector< std::unique_ptr< TGraph > > > > > graphs
Graphs storing systematic variation ratios at each knot for each bin.
virtual double ReturnKinematicParameter(const int binTypes, const Long64_t jentry) const =0
Return the value of an associated kinematic parameter for an event.
void Initialise()
The main initialiser, has to be called from inherited class :(.
std::map< std::string, int > fSuffixToSplineMode
Suffix -> spline mode index.
virtual Long64_t GetEntries()=0
simple getter for number of entries
int GetSplineModeFromGenerator(const int generatorMode) const
double ReturnKinematicParameter(const std::string &KinematicParameter, Long64_t iEvent) const
Return the value of an associated kinematic parameter for an event.
void FillSystematicProperties()
void SetupBinning()
Set binning and histograms for each spline.
virtual std::vector< double > GetETrueBinning()=0
Way to get binning outside of config.
virtual void GetEntry(Long64_t jentry)=0
Hook allowing to load info for a given entry.
void MakeVariations()
The main function generating spline responses.
void FillSplines()
Fit a spline to each TGraph.
std::string GetSplineSuffix(const int spline_mode) const
std::vector< std::vector< std::unique_ptr< TH3F > > > VariationHistogram
Histograms containing systematic variations at each knot.
virtual double GetWeight(Long64_t jentry, size_t iSyst, double Value)=0
Calculate weight for a given event using value.
std::unique_ptr< MaCh3Modes > Modes
pointer to MaCh3 modes
std::vector< std::string > VariationHistogramName
Names corresponding to the variation histograms.
bool UseKnotForWeight
Whether we use knot for weight calcuation or actual value.
std::map< int, int > fModeToSplineMode
MaCh3 mode index -> spline mode index.
std::unique_ptr< Manager > Setting
pointer to config
std::vector< int > BinningTypes
Enum for binning type to be used.
virtual void LoadKnots()=0
Hook allowing to load knots etc from experiment specific.
void FillGraphs()
Fit a TGraph to each bin.
std::string ReturnStringFromKinematicParameter(const int KinematicVariable) const
ETA function to generically convert a kinematic type from param handler to a string.
const std::unordered_map< int, std::string > * ReversedKinematicParameters
Mapping between kinematic enum and string.
int ReturnKinematicParameterFromString(const std::string &KinematicStr) const
ETA function to generically convert a string from param handler to a kinematic type.
virtual ~BinnedSplineMakerBase()
Destructor.
virtual double GetWeight(Long64_t jentry, size_t iSyst, int iKnot)=0
Calculate weight for a given event using knot.
const std::unordered_map< std::string, int > * KinematicParameters
Mapping between string and kinematic enum.
std::vector< SystematicsStruct > systematicProperties
Struct to contain systematic properties.
std::vector< int > intModes
which interaction modes does this systematic affect?
std::string outputSystName
std::string systName
name of this systematic
int nominalPosition
which element # in the knot array corresponds to this systematics' nominal value?
TArrayF * knotArray
pointers to the arrays we will read in from the weights file