1#ifndef __OSCILLATOR_BASE_H__
2#define __OSCILLATOR_BASE_H__
7#include "yaml-cpp/yaml.h"
59 std::cerr <<
"DefineParameter function called before OscProbCalcer set!" << std::endl;
60 throw std::runtime_error(
"DefineParameter function called before OscProbCalcer set");
float FLOAT_T
Definition OscillatorConstants.h:16
#define DUMMYVAL
Definition OscillatorConstants.h:4
Oscillation calculation engine (CUDAProb3, ProbGPU, Prob3++, etc.) implementation agnostic base class...
Definition OscProbCalcerBase.h:18
void DefineParameter(const std::string &ParName, FLOAT_T *ParValue)
Function to register an oscillation parameter name and pointer to a value that will be used when calc...
Definition OscProbCalcerBase.cpp:387
Oscillation calculation (binned, unbinned, etc.) implementation agnostic base class.
Definition OscillatorBase.h:20
YAML::Node Config
YAML Config manager.
Definition OscillatorBase.h:312
void DefineParameter(const std::string &ParName_, FLOAT_T *ParValue_)
Define the oscillation parameters with a given name and pointer to a value.
Definition OscillatorBase.h:57
std::vector< FLOAT_T > ReturnEnergyArray()
Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase...
Definition OscillatorBase.cpp:99
void Initialise(YAML::Node Config_)
Initialise OscillatorBase object.
Definition OscillatorBase.cpp:18
void SetCosineZArrayInCalcer(std::vector< FLOAT_T > Array)
Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored...
Definition OscillatorBase.cpp:60
bool fCosineZIgnored
A boolean used for declaring whether the OscillatorBase() object expects to care about the CosineZ di...
Definition OscillatorBase.h:287
OscillatorBase(std::string ConfigName_)
Default constructor.
Definition OscillatorBase.cpp:7
virtual std::vector< FLOAT_T > ReturnBinEdgesForPlotting(bool ReturnEnergy)=0
Return a vector of bin edges which can be used to plot the oscillation probability.
void SetEnergyArrayInCalcer(std::vector< FLOAT_T > Array)
Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored...
Definition OscillatorBase.cpp:48
const FLOAT_T * ReturnPointerToWeightinCalcer(int InitNuFlav, int FinalNuFlav, FLOAT_T EnergyVal, FLOAT_T CosineZVal=DUMMYVAL)
Return a pointer to the oscillation probability memory address in a particular index of #fOscProbCalc...
Definition OscillatorBase.cpp:119
std::string ReturnImplementationName()
Return a string which encapsulates the calculation type along with the calculation engine.
Definition OscillatorBase.cpp:146
int ReturnNCosineZPoints()
Return the number of CosineZ points which are being evaluated in the OscProbCalcerBase::OscProbCalcer...
Definition OscillatorBase.cpp:103
void SanityCheck()
Perform a sanity check which ensures that #fOscProbCalcers have been set correctly.
Definition OscillatorBase.cpp:124
virtual const FLOAT_T * ReturnWeightPointer(int InitNuFlav, int FinalNuFlav, FLOAT_T EnergyVal, FLOAT_T CosineZVal=DUMMYVAL)=0
Return a pointer to the oscillation probability for the requested event attributes.
FLOAT_T ReturnOscillationProbability(int InitNuFlav, int FinalNuFlav, FLOAT_T EnergyVal, FLOAT_T CosineZVal=DUMMYVAL)
Return oscillation probability for a given initial and final flavour, for a given energy and cosineZ.
Definition OscillatorBase.h:192
int ReturnNOscParams()
Return number of expected oscillation parameters for a particular OscProbCalcerBase::OscProbCalcerBas...
Definition OscillatorBase.cpp:91
std::string fCalculationTypeName
A string describing the calculation implementation, e.g. Binned.
Definition OscillatorBase.h:302
void PrintWeights()
Print the oscillation probabilities for a particular OscProbCalcerBase::OscProbCalcerBase() instance ...
Definition OscillatorBase.cpp:142
virtual void PostCalculateProbabilities()
Do follow-up calculations with the oscillation probabilities. E.g.: averages in the SubSampling Calcu...
Definition OscillatorBase.h:274
bool EvalPointsSetInConstructor()
Return flag which describes whether the OscProbCalcerBase::OscProbCalcerBase() has had it's Energy an...
Definition OscillatorBase.h:173
void Setup()
Setup each instance of OscProbCalcerBase::OscProbCalcerBase() instance in fOscProbCalcer.
Definition OscillatorBase.cpp:82
bool ReturnCosineZIgnored()
Return flag which describes whether CosineZ binning is considered in the object.
Definition OscillatorBase.h:180
virtual ~OscillatorBase()
Destructor.
Definition OscillatorBase.cpp:37
std::vector< int > ReturnNeutrinoTypes()
Return the neutrino types the specific implementation expects.
Definition OscillatorBase.cpp:115
virtual void SetupOscillatorImplementation()
Setup specific oscillator implementation.
Definition OscillatorBase.h:279
std::vector< FLOAT_T > ReturnCosineZArray()
Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBas...
Definition OscillatorBase.cpp:107
int ReturnNEnergyPoints()
Return the number of Energy points which are being evaluated in the OscProbCalcerBase::OscProbCalcerB...
Definition OscillatorBase.cpp:95
std::vector< NuOscillator::OscillationChannel > ReturnOscChannels()
Return the oscillation channels the specific implementation expects.
Definition OscillatorBase.cpp:111
bool HasOscProbCalcerGotOscillationChannel(int GeneratedFlavour, int DetectedFlavour)
Check whether a particular OscProbCalcerBase::OscProbCalcerBase() instance has a particular oscillati...
Definition OscillatorBase.cpp:151
OscProbCalcerBase * fOscProbCalcer
The instance of OscProbCalcerBase()
Definition OscillatorBase.h:297
void CalculateProbabilities()
Calculate the oscillation probabilities for the providied oscillation probabilities.
Definition OscillatorBase.cpp:76
int fVerbose
The verbosity level of console output.
Definition OscillatorBase.h:307
void InitialiseOscProbCalcer()
Return an OscProbCalcerBase::OscProbCalcerBase() object from the requested inputs.
Definition OscillatorBase.cpp:41
bool fOscProbCalcerSet
A boolean which declares whether fOscProbCalcer has been initialised.
Definition OscillatorBase.h:339
bool fEvalPointsSetInConstructor
Flad which describes whether the Energy and CosineZ evaluation points where set in the constructor of...
Definition OscillatorBase.h:292