![]() |
MaCh3 2.2.1
Reference Guide
|
Class responsible for handling implementation of samples used in analysis, reweighting and returning LLH. More...
#include <Samples/SampleHandlerFD.h>
Public Member Functions | |
SampleHandlerFD (std::string ConfigFileName, ParameterHandlerGeneric *xsec_cov, const std::shared_ptr< OscillationHandler > &OscillatorObj_=nullptr) | |
Constructor. | |
virtual | ~SampleHandlerFD () |
destructor | |
int | GetNDim () const |
DB Function to differentiate 1D or 2D binning. | |
std::string | GetSampleName (int iSample=0) const override |
std::string | GetTitle () const override |
std::string | GetXBinVarName () |
std::string | GetYBinVarName () |
void | PrintIntegral (TString OutputName="/dev/null", int WeightStyle=0, TString OutputCSVName="/dev/null") |
void | AddData (TH1D *Data) |
void | AddData (TH2D *Data) |
void | AddData (std::vector< double > &data) |
void | AddData (std::vector< std::vector< double > > &data) |
double | GetLikelihood () override |
DB Multi-threaded GetLikelihood. | |
TH1 * | GetMCHist (const int Dimension) |
Get MC histogram. | |
TH1 * | GetW2Hist (const int Dimension) |
Get W2 histogram. | |
TH1 * | GetDataHist (const int Dimension) |
Get Data histogram. | |
void | Reweight () override |
M3::float_t | GetEventWeight (const int iEntry) const |
void | InitialiseNuOscillatorObjects () |
including Dan's magic NuOscillator | |
void | SetupNuOscillatorPointers () |
void | ReadSampleConfig () |
int | GetNOscChannels () override |
std::string | GetFlavourName (const int iChannel) |
TH1 * | Get1DVarHist (const std::string &ProjectionVar, const std::vector< KinematicCut > &EventSelectionVec=std::vector< KinematicCut >(), int WeightStyle=0, TAxis *Axis=nullptr, const std::vector< KinematicCut > &SubEventSelectionVec=std::vector< KinematicCut >()) |
TH2 * | Get2DVarHist (const std::string &ProjectionVarX, const std::string &ProjectionVarY, const std::vector< KinematicCut > &EventSelectionVec=std::vector< KinematicCut >(), int WeightStyle=0, TAxis *AxisX=nullptr, TAxis *AxisY=nullptr, const std::vector< KinematicCut > &SubEventSelectionVec=std::vector< KinematicCut >()) |
void | Fill1DSubEventHist (TH1D *_h1DVar, const std::string &ProjectionVar, const std::vector< KinematicCut > &SubEventSelectionVec=std::vector< KinematicCut >(), int WeightStyle=0) |
void | Fill2DSubEventHist (TH2D *_h2DVar, const std::string &ProjectionVarX, const std::string &ProjectionVarY, const std::vector< KinematicCut > &SubEventSelectionVec=std::vector< KinematicCut >(), int WeightStyle=0) |
TH1 * | Get1DVarHistByModeAndChannel (const std::string &ProjectionVar_Str, int kModeToFill=-1, int kChannelToFill=-1, int WeightStyle=0, TAxis *Axis=nullptr) |
TH2 * | Get2DVarHistByModeAndChannel (const std::string &ProjectionVar_StrX, const std::string &ProjectionVar_StrY, int kModeToFill=-1, int kChannelToFill=-1, int WeightStyle=0, TAxis *AxisX=nullptr, TAxis *AxisY=nullptr) |
TH1 * | GetModeHist1D (int s, int m, int style=0) |
TH2 * | GetModeHist2D (int s, int m, int style=0) |
std::vector< TH1 * > | ReturnHistsBySelection1D (std::string KinematicProjection, int Selection1, int Selection2=-1, int WeightStyle=0, TAxis *Axis=0) |
std::vector< TH2 * > | ReturnHistsBySelection2D (std::string KinematicProjectionX, std::string KinematicProjectionY, int Selection1, int Selection2=-1, int WeightStyle=0, TAxis *XAxis=0, TAxis *YAxis=0) |
THStack * | ReturnStackedHistBySelection1D (std::string KinematicProjection, int Selection1, int Selection2=-1, int WeightStyle=0, TAxis *Axis=0) |
TLegend * | ReturnStackHistLegend () |
int | ReturnKinematicParameterFromString (const std::string &KinematicStr) const |
ETA function to generically convert a string from xsec cov to a kinematic type. | |
std::string | ReturnStringFromKinematicParameter (const int KinematicVariable) const |
ETA function to generically convert a kinematic type from xsec cov to a string. | |
void | SaveAdditionalInfo (TDirectory *Dir) override |
Store additional info in a chan. | |
int | ReturnKinematicVectorFromString (const std::string &KinematicStr) const |
std::string | ReturnStringFromKinematicVector (const int KinematicVariable) const |
bool | IsSubEventVarString (const std::string &VarStr) |
JM Check if a kinematic parameter string corresponds to a subevent-level variable. | |
![]() | |
SampleHandlerBase () | |
The main constructor. | |
virtual | ~SampleHandlerBase () |
destructor | |
virtual M3::int_t | GetNsamples () |
virtual std::string | GetTitle () const |
virtual std::string | GetSampleName (int Sample) const =0 |
virtual double | GetSampleLikelihood (const int isample) |
virtual void | CleanMemoryBeforeFit ()=0 |
Allow to clean not used memory before fit starts. | |
virtual void | SaveAdditionalInfo (TDirectory *Dir) |
Store additional info in a chan. | |
MaCh3Modes * | GetMaCh3Modes () const |
Return pointer to MaCh3 modes. | |
virtual void | Reweight ()=0 |
virtual double | GetLikelihood ()=0 |
unsigned int | GetNEvents () const |
virtual int | GetNMCSamples () |
virtual int | GetNOscChannels () |
virtual void | SetupBinning (const M3::int_t Selection, std::vector< double > &BinningX, std::vector< double > &BinningY) |
virtual TH1 * | GetData (const int Selection) |
virtual TH2Poly * | GetW2 (const int Selection) |
virtual TH1 * | GetPDF (const int Selection) |
virtual TH1 * | GetPDFMode (const int Selection, const int Mode) |
virtual std::string | GetKinVarLabel (const int sample, const int Dimension) |
double | GetTestStatLLH (double data, double mc) const |
Calculate test statistic for a single bin using Poisson. | |
double | GetTestStatLLH (const double data, const double mc, const double w2) const |
Calculate test statistic for a single bin. Calculation depends on setting of fTestStatistic. Data and mc -> 0 cut-offs are defined in M3::LOW_MC_BOUND. | |
void | SetTestStatistic (TestStatistic testStat) |
Set the test statistic to be used when calculating the binned likelihoods. | |
Protected Member Functions | |
virtual void | SetupWeightPointers ()=0 |
DB Function to determine which weights apply to which types of samples pure virtual!! | |
void | SetupKinematicMap () |
Ensure Kinematic Map is setup and make sure it is initialised correctly. | |
virtual void | SetupSplines ()=0 |
initialise your splineXX object and then use InitialiseSplineObject to conviently setup everything up | |
virtual void | Init ()=0 |
Initialise any variables that your experiment specific SampleHandler needs. | |
virtual int | SetupExperimentMC ()=0 |
Experiment specific setup, returns the number of events which were loaded. | |
virtual void | SetupFDMC ()=0 |
Function which translates experiment struct into core struct. | |
void | Initialise () |
Function which does a lot of the lifting regarding the workflow in creating different MC objects. | |
void | FillSplineBins () |
Finds the binned spline that an event should apply to and stored them in a a vector for easy evaluation in the fillArray() function. | |
void | FindNominalBinAndEdges1D () |
void | FindNominalBinAndEdges2D () |
void | Set1DBinning (size_t nbins, double *boundaries) |
sets the binning used for the likelihood calculation, used for both data and MC | |
void | Set2DBinning (size_t nbins1, double *boundaries1, size_t nbins2, double *boundaries2) |
set the binning for 2D sample used for the likelihood calculation | |
void | Set1DBinning (std::vector< double > &XVec) |
set the binning for 1D sample used for the likelihood calculation | |
void | Set2DBinning (std::vector< double > &XVec, std::vector< double > &YVec) |
set the binning for 2D sample used for the likelihood calculation | |
void | SetupSampleBinning () |
wrapper to call set binning functions based on sample config info | |
void | SetupReweightArrays (const size_t numberXBins, const size_t numberYBins) |
Initialise data, MC and W2 histograms. | |
virtual void | SetupFunctionalParameters () |
ETA - a function to setup and pass values to functional parameters where you need to pass a value to some custom reweight calc or engine. | |
void | RegisterIndividualFunctionalParameter (const std::string &fpName, int fpEnum, FuncParFuncType fpFunc) |
HH - a helper function for RegisterFunctionalParameter. | |
virtual void | RegisterFunctionalParameters ()=0 |
HH - a experiment-specific function where the maps to actual functions are set up. | |
virtual void | PrepFunctionalParameters () |
Update the functional parameter values to the latest proposed values. Needs to be called before every new reweight so is called in fillArray. | |
virtual void | ApplyShifts (int iEvent) |
ETA - generic function applying shifts. | |
bool | IsEventSelected (const int iEvent) |
DB Function which determines if an event is selected, where Selection double looks like {{ND280KinematicTypes Var1, douuble LowBound}. | |
bool | IsSubEventSelected (const std::vector< KinematicCut > &SubEventCuts, const int iEvent, unsigned const int iSubEvent, size_t nsubevents) |
JM Function which determines if a subevent is selected. | |
virtual void | resetShifts (int iEvent) |
HH - reset the shifted values to the original values. | |
void | CalcNormsBins (std::vector< NormParameter > &norm_parameters, std::vector< std::vector< int > > &xsec_norms_bins) |
Check whether a normalisation systematic affects an event or not. | |
M3::float_t | CalcWeightSpline (const FarDetectorCoreInfo *MCEvent) const |
Calculate the spline weight for a given event. | |
M3::float_t | CalcWeightNorm (const FarDetectorCoreInfo *MCEvent) const |
Calculate the norm weight for a given event. | |
virtual void | CalcWeightFunc (int iEvent) |
Calculate weights for function parameters. | |
virtual double | ReturnKinematicParameter (std::string KinematicParamter, int iEvent)=0 |
Return the value of an assocaited kinematic parameter for an event. | |
virtual double | ReturnKinematicParameter (int KinematicVariable, int iEvent)=0 |
virtual std::vector< double > | ReturnKinematicVector (std::string KinematicParameter, int iEvent) |
virtual std::vector< double > | ReturnKinematicVector (int KinematicVariable, int iEvent) |
std::vector< double > | ReturnKinematicParameterBinning (const std::string &KinematicParameter) |
Return the binning used to draw a kinematic parameter. | |
virtual const double * | GetPointerToKinematicParameter (std::string KinematicParamter, int iEvent)=0 |
virtual const double * | GetPointerToKinematicParameter (double KinematicVariable, int iEvent)=0 |
const double * | GetPointerToOscChannel (const int iEvent) const |
Get pointer to oscillation channel associated with given event. Osc channel is const. | |
void | SetupNormParameters () |
Setup the norm parameters by assigning each event with bin. | |
void | Fill1DHist () |
Fill a 1D histogram with the event-level information used in the fit. | |
void | Fill2DHist () |
Fill a 2D histogram with the event-level information used in the fit. | |
void | FillArray () |
DB Nice new multi-threaded function which calculates the event weights and fills the relevant bins of an array. | |
void | ResetHistograms () |
Helper function to reset histograms. | |
void | InitialiseSingleFDMCObject () |
function to create the member of the FarDetectorInfo struct so they are the appropriate size. | |
void | InitialiseSplineObject () |
NuPDG | GetInitPDGFromFileName (const std::string &FileName) const |
Retrieve the initial neutrino PDG code associated with a given input file name. | |
NuPDG | GetFinalPDGFromFileName (const std::string &FileName) const |
Retrieve the final neutrino PDG code associated with a given input file name. | |
![]() | |
void | QuietPlease () |
CW: Redirect std::cout to silence some experiment specific libraries. | |
void | NowTalk () |
CW: Redirect std::cout to silence some experiment specific libraries. | |
template<typename T > | |
bool | MatchCondition (const std::vector< T > &allowedValues, const T &value) |
check if event is affected by following conditions, for example pdg, or modes etc | |
Protected Attributes | |
std::unique_ptr< BinnedSplineHandler > | SplineHandler |
Contains all your binned splines and handles the setup and the returning of weights from spline evaluations. | |
std::shared_ptr< OscillationHandler > | Oscillator |
Contains all your binned splines and handles the setup and the returning of weights from spline evaluations. | |
std::string | XVarStr |
the strings associated with the variables used for the binning e.g. "RecoNeutrinoEnergy" | |
std::string | YVarStr |
std::vector< FunctionalParameter > | funcParsVec |
HH - a vector that stores all the FuncPars struct. | |
std::unordered_map< std::string, int > | funcParsNamesMap |
HH - a map that relates the name of the functional parameter to funcpar enum. | |
std::vector< FunctionalParameter * > | funcParsMap |
HH - a map that relates the funcpar enum to pointer of FuncPars struct HH - Changed to a vector of pointers since it's faster than unordered_map and we are using ints as keys. | |
std::unordered_map< int, FuncParFuncType > | funcParsFuncMap |
HH - a map that relates the funcpar enum to pointer of the actual function. | |
std::vector< std::vector< int > > | funcParsGrid |
HH - a grid of vectors of enums for each sample and event. | |
std::vector< std::string > | funcParsNamesVec = {} |
HH - a vector of string names for each functional parameter. | |
SampleBinningInfo | Binning |
KS: This stores binning information, in future could be come vector to store binning for every used sample. | |
double ** | SampleHandlerFD_array |
DB Array to be filled after reweighting. | |
double ** | SampleHandlerFD_array_w2 |
KS Array used for MC stat. | |
double ** | SampleHandlerFD_data |
DB Array to be filled in AddData. | |
std::vector< FarDetectorCoreInfo > | MCSamples |
std::vector< OscChannelInfo > | OscChannels |
ParameterHandlerGeneric * | ParHandler = nullptr |
int | nDimensions = M3::_BAD_INT_ |
Keep track of the dimensions of the sample binning. | |
std::string | SampleName |
A unique ID for each sample based on powers of two for quick binary operator comparisons. | |
std::string | SampleTitle |
the name of this sample e.g."muon-like" | |
std::vector< KinematicCut > | StoredSelection |
What gets pulled from config options, these are constant after loading in this is of length 3: 0th index is the value, 1st is lower bound, 2nd is upper bound. | |
std::vector< KinematicCut > | Selection |
a way to store selection cuts which you may push back in the get1DVar functions most of the time this is just the same as StoredSelection | |
const std::unordered_map< std::string, int > * | KinematicParameters |
Mapping between string and kinematic enum. | |
const std::unordered_map< int, std::string > * | ReversedKinematicParameters |
Mapping between kinematic enum and string. | |
const std::unordered_map< std::string, int > * | KinematicVectors |
const std::unordered_map< int, std::string > * | ReversedKinematicVectors |
std::unique_ptr< manager > | SampleManager |
The manager object used to read the sample yaml file. | |
std::vector< std::string > | mc_files |
names of mc files associated associated with this object | |
std::vector< std::string > | spline_files |
names of spline files associated associated with this object | |
std::unordered_map< std::string, double > | _modeNomWeightMap |
TLegend * | THStackLeg = nullptr |
DB Miscellaneous Variables. | |
bool | FirstTimeW2 |
KS:Super hacky to update W2 or not. | |
bool | UpdateW2 |
KS:Super hacky to update W2 or not. | |
TH1D * | dathist |
TH2D * | dathist2d |
TH1D * | _hPDF1D |
TH2D * | _hPDF2D |
![]() | |
TestStatistic | fTestStatistic |
Test statistic tells what kind of likelihood sample is using. | |
std::streambuf * | buf |
Keep the cout buffer. | |
std::streambuf * | errbuf |
Keep the cerr buffer. | |
M3::int_t | nSamples |
Contains how many samples we've got. | |
unsigned int | nEvents |
Number of MC events are there. | |
std::unique_ptr< MaCh3Modes > | Modes |
Holds information about used Generator and MaCh3 modes. | |
Private Attributes | |
std::unordered_map< std::string, NuPDG > | FileToInitPDGMap |
std::unordered_map< std::string, NuPDG > | FileToFinalPDGMap |
Class responsible for handling implementation of samples used in analysis, reweighting and returning LLH.
Definition at line 18 of file SampleHandlerFD.h.
SampleHandlerFD::SampleHandlerFD | ( | std::string | ConfigFileName, |
ParameterHandlerGeneric * | xsec_cov, | ||
const std::shared_ptr< OscillationHandler > & | OscillatorObj_ = nullptr |
||
) |
Constructor.
ConfigFileName | Name of config to initialise the sample object |
Definition at line 10 of file SampleHandlerFD.cpp.
|
virtual |
destructor
Definition at line 50 of file SampleHandlerFD.cpp.
void SampleHandlerFD::AddData | ( | std::vector< double > & | data | ) |
Definition at line 1148 of file SampleHandlerFD.cpp.
void SampleHandlerFD::AddData | ( | std::vector< std::vector< double > > & | data | ) |
Definition at line 1173 of file SampleHandlerFD.cpp.
void SampleHandlerFD::AddData | ( | TH1D * | Data | ) |
Definition at line 1203 of file SampleHandlerFD.cpp.
void SampleHandlerFD::AddData | ( | TH2D * | Data | ) |
Definition at line 1227 of file SampleHandlerFD.cpp.
|
protectedvirtual |
ETA - generic function applying shifts.
Definition at line 714 of file SampleHandlerFD.cpp.
|
protected |
Check whether a normalisation systematic affects an event or not.
Definition at line 806 of file SampleHandlerFD.cpp.
|
inlineprotectedvirtual |
Calculate weights for function parameters.
First you need to setup additional pointers in you experiment code in SetupWeightPointers Then in this function you can calculate whatever fancy function you want by filling weight to which you have pointer This way func weight shall be used in GetEventWeight
Definition at line 259 of file SampleHandlerFD.h.
|
protected |
Calculate the norm weight for a given event.
Definition at line 754 of file SampleHandlerFD.cpp.
|
protected |
Calculate the spline weight for a given event.
Definition at line 737 of file SampleHandlerFD.cpp.
|
protected |
Fill a 1D histogram with the event-level information used in the fit.
Definition at line 277 of file SampleHandlerFD.cpp.
|
protected |
Fill a 2D histogram with the event-level information used in the fit.
Definition at line 289 of file SampleHandlerFD.cpp.
void SampleHandlerFD::Fill2DSubEventHist | ( | TH2D * | _h2DVar, |
const std::string & | ProjectionVarX, | ||
const std::string & | ProjectionVarY, | ||
const std::vector< KinematicCut > & | SubEventSelectionVec = std::vector< KinematicCut >() , |
||
int | WeightStyle = 0 |
||
) |
Definition at line 1634 of file SampleHandlerFD.cpp.
|
protected |
DB Nice new multi-threaded function which calculates the event weights and fills the relevant bins of an array.
fills the SampleHandlerFD_array vector with the weight calculated from reweighting
@function SampleHandlerFD::fillArray() Function which does the core reweighting. This assumes that oscillation weights have already been calculated and stored in SampleHandlerFD.osc_w[iEvent]. This function takes advantage of most of the things called in setupSKMC to reduce reweighting time. It also follows the ND code reweighting pretty closely. This function fills the SampleHandlerFD array array which is binned to match the sample binning, such that bin[1][1] is the equivalent of _hPDF2D->GetBinContent(2,2) {Noticing the offset}
Definition at line 427 of file SampleHandlerFD.cpp.
|
protected |
Finds the binned spline that an event should apply to and stored them in a a vector for easy evaluation in the fillArray() function.
@func fillSplineBins()
Definition at line 1371 of file SampleHandlerFD.cpp.
|
protected |
Definition at line 963 of file SampleHandlerFD.cpp.
|
protected |
Definition at line 1031 of file SampleHandlerFD.cpp.
TH2 * SampleHandlerFD::Get2DVarHist | ( | const std::string & | ProjectionVarX, |
const std::string & | ProjectionVarY, | ||
const std::vector< KinematicCut > & | EventSelectionVec = std::vector< KinematicCut >() , |
||
int | WeightStyle = 0 , |
||
TAxis * | AxisX = nullptr , |
||
TAxis * | AxisY = nullptr , |
||
const std::vector< KinematicCut > & | SubEventSelectionVec = std::vector< KinematicCut >() |
||
) |
Definition at line 1577 of file SampleHandlerFD.cpp.
M3::float_t SampleHandlerFD::GetEventWeight | ( | const int | iEntry | ) | const |
Definition at line 1355 of file SampleHandlerFD.cpp.
|
inlineprotected |
Retrieve the final neutrino PDG code associated with a given input file name.
Definition at line 392 of file SampleHandlerFD.h.
|
inlineprotected |
Retrieve the initial neutrino PDG code associated with a given input file name.
Definition at line 390 of file SampleHandlerFD.h.
|
overridevirtual |
DB Multi-threaded GetLikelihood.
Implements SampleHandlerBase.
Definition at line 1407 of file SampleHandlerFD.cpp.
|
protectedpure virtual |
Implemented in PySampleHandlerFD.
|
protectedpure virtual |
Implemented in PySampleHandlerFD.
|
protected |
Get pointer to oscillation channel associated with given event. Osc channel is const.
Definition at line 2106 of file SampleHandlerFD.cpp.
|
protectedpure virtual |
Initialise any variables that your experiment specific SampleHandler needs.
Implemented in PySampleHandlerFD.
|
protected |
Function which does a lot of the lifting regarding the workflow in creating different MC objects.
Definition at line 202 of file SampleHandlerFD.cpp.
void SampleHandlerFD::InitialiseNuOscillatorObjects | ( | ) |
including Dan's magic NuOscillator
Definition at line 1250 of file SampleHandlerFD.cpp.
|
protected |
function to create the member of the FarDetectorInfo struct so they are the appropriate size.
Definition at line 1433 of file SampleHandlerFD.cpp.
|
protected |
Definition at line 1472 of file SampleHandlerFD.cpp.
|
protected |
DB Function which determines if an event is selected, where Selection double looks like {{ND280KinematicTypes Var1, douuble LowBound}.
Definition at line 362 of file SampleHandlerFD.cpp.
|
protected |
JM Function which determines if a subevent is selected.
Definition at line 377 of file SampleHandlerFD.cpp.
bool SampleHandlerFD::IsSubEventVarString | ( | const std::string & | VarStr | ) |
JM Check if a kinematic parameter string corresponds to a subevent-level variable.
Definition at line 1776 of file SampleHandlerFD.cpp.
|
inlineprotectedvirtual |
Update the functional parameter values to the latest proposed values. Needs to be called before every new reweight so is called in fillArray.
Definition at line 219 of file SampleHandlerFD.h.
void SampleHandlerFD::PrintIntegral | ( | TString | OutputName = "/dev/null" , |
int | WeightStyle = 0 , |
||
TString | OutputCSVName = "/dev/null" |
||
) |
Definition at line 1890 of file SampleHandlerFD.cpp.
void SampleHandlerFD::ReadSampleConfig | ( | ) |
Definition at line 73 of file SampleHandlerFD.cpp.
|
protectedpure virtual |
HH - a experiment-specific function where the maps to actual functions are set up.
Implemented in PySampleHandlerFD.
|
protected |
HH - a helper function for RegisterFunctionalParameter.
Definition at line 620 of file SampleHandlerFD.cpp.
|
inlineprotected |
Helper function to reset histograms.
Definition at line 605 of file SampleHandlerFD.cpp.
|
inlineprotectedvirtual |
HH - reset the shifted values to the original values.
Definition at line 228 of file SampleHandlerFD.h.
|
protectedpure virtual |
Implemented in PySampleHandlerFD.
|
protectedpure virtual |
Return the value of an assocaited kinematic parameter for an event.
Implemented in PySampleHandlerFD.
|
protected |
Return the binning used to draw a kinematic parameter.
Definition at line 1742 of file SampleHandlerFD.cpp.
|
inlineprotectedvirtual |
Definition at line 267 of file SampleHandlerFD.h.
|
inlineprotectedvirtual |
Definition at line 266 of file SampleHandlerFD.h.
int SampleHandlerFD::ReturnKinematicVectorFromString | ( | const std::string & | KinematicStr | ) | const |
Definition at line 1716 of file SampleHandlerFD.cpp.
std::string SampleHandlerFD::ReturnStringFromKinematicVector | ( | const int | KinematicVariable | ) | const |
Definition at line 1728 of file SampleHandlerFD.cpp.
|
overridevirtual |
Implements SampleHandlerBase.
Definition at line 396 of file SampleHandlerFD.cpp.
|
overridevirtual |
Store additional info in a chan.
Reimplemented from SampleHandlerBase.
Definition at line 1439 of file SampleHandlerFD.cpp.
|
protected |
sets the binning used for the likelihood calculation, used for both data and MC
nbins | number of total bins |
boundaries | the bin edges e.g. 0, 0.1, 0.2, 0.3 |
Definition at line 939 of file SampleHandlerFD.cpp.
|
inlineprotected |
set the binning for 1D sample used for the likelihood calculation
XVec | vector containing the binning in axis 1 (the x-axis) |
Definition at line 197 of file SampleHandlerFD.h.
|
protected |
set the binning for 2D sample used for the likelihood calculation
nbins1 | number of bins in axis 1 (the x-axis) |
nbins2 | number of bins in axis 2 (the y-axis) |
boundaries1 | the bin boundaries used in axis 1 (the x-axis) |
boundaries2 | the bin boundaries used in axis 2 (the y-axis) |
Definition at line 1014 of file SampleHandlerFD.cpp.
|
inlineprotected |
set the binning for 2D sample used for the likelihood calculation
XVec | vector containing the binning in axis 1 (the x-axis) |
YVec | vector containing the binning in axis 2 (the y-axis) |
Definition at line 201 of file SampleHandlerFD.h.
|
protectedpure virtual |
Experiment specific setup, returns the number of events which were loaded.
Implemented in PySampleHandlerFD.
|
protectedpure virtual |
Function which translates experiment struct into core struct.
Implemented in PySampleHandlerFD.
|
protectedvirtual |
ETA - a function to setup and pass values to functional parameters where you need to pass a value to some custom reweight calc or engine.
Definition at line 639 of file SampleHandlerFD.cpp.
|
protected |
Ensure Kinematic Map is setup and make sure it is initialised correctly.
Definition at line 257 of file SampleHandlerFD.cpp.
|
protected |
Setup the norm parameters by assigning each event with bin.
Definition at line 777 of file SampleHandlerFD.cpp.
void SampleHandlerFD::SetupNuOscillatorPointers | ( | ) |
Definition at line 1303 of file SampleHandlerFD.cpp.
|
protected |
Initialise data, MC and W2 histograms.
Definition at line 913 of file SampleHandlerFD.cpp.
|
protected |
wrapper to call set binning functions based on sample config info
Function to setup the binning of your sample histograms and the underlying arrays that get handled in fillArray() and fillArray_MP(). The Binning.XBinEdges are filled in the daughter class from the sample config file. This "passing" can be removed.
@function SampleHandlerFD::SetupSampleBinning()
Definition at line 307 of file SampleHandlerFD.cpp.
|
protectedpure virtual |
initialise your splineXX object and then use InitialiseSplineObject to conviently setup everything up
Implemented in PySampleHandlerFD.
|
protectedpure virtual |
DB Function to determine which weights apply to which types of samples pure virtual!!
Implemented in PySampleHandlerFD.
|
protected |
Definition at line 386 of file SampleHandlerFD.h.
|
protected |
Definition at line 387 of file SampleHandlerFD.h.
|
protected |
Definition at line 370 of file SampleHandlerFD.h.
|
protected |
KS: This stores binning information, in future could be come vector to store binning for every used sample.
Definition at line 302 of file SampleHandlerFD.h.
|
protected |
Definition at line 382 of file SampleHandlerFD.h.
|
protected |
Definition at line 383 of file SampleHandlerFD.h.
|
private |
Definition at line 396 of file SampleHandlerFD.h.
|
private |
Definition at line 395 of file SampleHandlerFD.h.
|
protected |
KS:Super hacky to update W2 or not.
Definition at line 378 of file SampleHandlerFD.h.
|
protected |
HH - a map that relates the funcpar enum to pointer of the actual function.
Definition at line 241 of file SampleHandlerFD.h.
|
protected |
HH - a grid of vectors of enums for each sample and event.
Definition at line 243 of file SampleHandlerFD.h.
|
protected |
HH - a map that relates the funcpar enum to pointer of FuncPars struct HH - Changed to a vector of pointers since it's faster than unordered_map and we are using ints as keys.
Definition at line 238 of file SampleHandlerFD.h.
|
protected |
HH - a map that relates the name of the functional parameter to funcpar enum.
Definition at line 233 of file SampleHandlerFD.h.
|
protected |
HH - a vector of string names for each functional parameter.
Definition at line 245 of file SampleHandlerFD.h.
|
protected |
HH - a vector that stores all the FuncPars struct.
Definition at line 230 of file SampleHandlerFD.h.
|
protected |
Mapping between string and kinematic enum.
Definition at line 349 of file SampleHandlerFD.h.
|
protected |
Definition at line 354 of file SampleHandlerFD.h.
|
protected |
names of mc files associated associated with this object
Definition at line 366 of file SampleHandlerFD.h.
|
protected |
Definition at line 314 of file SampleHandlerFD.h.
|
protected |
Keep track of the dimensions of the sample binning.
Definition at line 327 of file SampleHandlerFD.h.
|
protected |
Definition at line 315 of file SampleHandlerFD.h.
|
protected |
Contains all your binned splines and handles the setup and the returning of weights from spline evaluations.
Definition at line 173 of file SampleHandlerFD.h.
|
protected |
Definition at line 322 of file SampleHandlerFD.h.
|
protected |
Mapping between kinematic enum and string.
Definition at line 351 of file SampleHandlerFD.h.
|
protected |
Definition at line 355 of file SampleHandlerFD.h.
|
protected |
DB Array to be filled after reweighting.
Definition at line 305 of file SampleHandlerFD.h.
|
protected |
KS Array used for MC stat.
Definition at line 307 of file SampleHandlerFD.h.
|
protected |
DB Array to be filled in AddData.
Definition at line 309 of file SampleHandlerFD.h.
|
protected |
The manager object used to read the sample yaml file.
Definition at line 359 of file SampleHandlerFD.h.
|
protected |
A unique ID for each sample based on powers of two for quick binary operator comparisons.
Definition at line 329 of file SampleHandlerFD.h.
|
protected |
the name of this sample e.g."muon-like"
Definition at line 332 of file SampleHandlerFD.h.
|
protected |
a way to store selection cuts which you may push back in the get1DVar functions most of the time this is just the same as StoredSelection
Definition at line 345 of file SampleHandlerFD.h.
|
protected |
names of spline files associated associated with this object
Definition at line 368 of file SampleHandlerFD.h.
|
protected |
Contains all your binned splines and handles the setup and the returning of weights from spline evaluations.
Definition at line 170 of file SampleHandlerFD.h.
|
protected |
What gets pulled from config options, these are constant after loading in this is of length 3: 0th index is the value, 1st is lower bound, 2nd is upper bound.
Definition at line 342 of file SampleHandlerFD.h.
|
protected |
DB Miscellaneous Variables.
Definition at line 374 of file SampleHandlerFD.h.
|
protected |
KS:Super hacky to update W2 or not.
Definition at line 380 of file SampleHandlerFD.h.
|
protected |
the strings associated with the variables used for the binning e.g. "RecoNeutrinoEnergy"
Definition at line 208 of file SampleHandlerFD.h.
|
protected |
Definition at line 208 of file SampleHandlerFD.h.