![]() |
NuOscillator
|
Oscillation calculation (binned, unbinned, etc.) implementation agnostic base class. More...
#include <OscillatorBase.h>
Public Member Functions | |
| virtual | ~OscillatorBase () |
| Destructor. | |
| void | SanityCheck () |
| Perform a sanity check which ensures that #fOscProbCalcers have been set correctly. | |
| void | CalculateProbabilities (const std::vector< FLOAT_T > &OscParams) |
| Calculate the oscillation probabilities for the providied oscillation probabilities. | |
| void | CalculateProbabilities () |
| Calculate the oscillation probabilities for the providied oscillation probabilities. | |
| void | DefineParameter (const std::string &ParName_, FLOAT_T *ParValue_) |
| Define the oscillation parameters with a given name and pointer to a value. | |
| int | ReturnNOscParams () |
| Return number of expected oscillation parameters for a particular OscProbCalcerBase::OscProbCalcerBase() instance in #fOscProbCalcers. | |
| void | PrintWeights () |
| Print the oscillation probabilities for a particular OscProbCalcerBase::OscProbCalcerBase() instance in fOscProbCalcer. | |
| void | Setup () |
| Setup each instance of OscProbCalcerBase::OscProbCalcerBase() instance in fOscProbCalcer. | |
| std::string | ReturnImplementationName () |
| Return a string which encapsulates the calculation type along with the calculation engine. | |
| int | ReturnNEnergyPoints () |
| Return the number of Energy points which are being evaluated in the OscProbCalcerBase::OscProbCalcerBase() object. | |
| std::vector< FLOAT_T > | ReturnEnergyArray () |
| Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase() contained in this instance of OscillatorBase::OscillatorBase() | |
| int | ReturnNCosineZPoints () |
| Return the number of CosineZ points which are being evaluated in the OscProbCalcerBase::OscProbCalcerBase() object. | |
| std::vector< FLOAT_T > | ReturnCosineZArray () |
| Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase() contained in this instance of OscillatorBase::OscillatorBase() | |
| std::vector< NuOscillator::OscillationChannel > | ReturnOscChannels () |
| Return the oscillation channels the specific implementation expects. | |
| std::vector< int > | ReturnNeutrinoTypes () |
| Return the neutrino types the specific implementation expects. | |
| bool | HasOscProbCalcerGotOscillationChannel (int GeneratedFlavour, int DetectedFlavour) |
| Check whether a particular OscProbCalcerBase::OscProbCalcerBase() instance has a particular oscillation channel. | |
| void | SetEnergyArrayInCalcer (std::vector< FLOAT_T > Array) |
| Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored in a particular index in #fOscProbCalcers. | |
| void | SetCosineZArrayInCalcer (std::vector< FLOAT_T > Array) |
| Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored in fOscProbCalcer. | |
| bool | EvalPointsSetInConstructor () |
| Return flag which describes whether the OscProbCalcerBase::OscProbCalcerBase() has had it's Energy and CosineZ evaluation points set in the constructor of the derived OscillatorBase::OscillatorBase() object. | |
| bool | ReturnCosineZIgnored () |
| Return flag which describes whether CosineZ binning is considered in the object. | |
| 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. | |
| 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. | |
| virtual std::vector< FLOAT_T > | ReturnBinEdgesForPlotting (bool ReturnEnergy)=0 |
| Return a vector of bin edges which can be used to plot the oscillation probability. | |
Protected Member Functions | |
| OscillatorBase (std::string ConfigName_) | |
| Default constructor. | |
| OscillatorBase (YAML::Node Config_) | |
| Default constructor. | |
| 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 #fOscProbCalcers for a particular event. | |
| virtual void | PostCalculateProbabilities () |
| Do follow-up calculations with the oscillation probabilities. E.g.: averages in the SubSampling CalculationType. | |
| virtual void | SetupOscillatorImplementation () |
| Setup specific oscillator implementation. | |
Protected Attributes | |
| bool | fCosineZIgnored |
| A boolean used for declaring whether the OscillatorBase() object expects to care about the CosineZ dimension. | |
| bool | fEvalPointsSetInConstructor |
| Flad which describes whether the Energy and CosineZ evaluation points where set in the constructor of the OscillatorBase() derived object. | |
| OscProbCalcerBase * | fOscProbCalcer |
| The instance of OscProbCalcerBase() | |
| std::string | fCalculationTypeName |
| A string describing the calculation implementation, e.g. Binned. | |
| int | fVerbose |
| The verbosity level of console output. | |
| YAML::Node | Config |
| YAML Config manager. | |
Private Member Functions | |
| void | InitialiseOscProbCalcer () |
| Return an OscProbCalcerBase::OscProbCalcerBase() object from the requested inputs. | |
| void | Initialise (YAML::Node Config_) |
| Initialise OscillatorBase object. | |
Private Attributes | |
| bool | fOscProbCalcerSet |
| A boolean which declares whether fOscProbCalcer has been initialised. | |
Oscillation calculation (binned, unbinned, etc.) implementation agnostic base class.
The base class which controls the calculation of neutrino oscillation probabilities through various calculation techniques. There are oscillation calculation techniques which can be implemented (e.g. binned, unbinned) which are expected to be derived classes of this base function.
|
virtual |
Destructor.
|
protected |
Default constructor.
It is protected to prevent initialisation of base class
| ConfigName_ | YAML config file used to set runtime constants |
|
protected |
Default constructor.
It is protected to prevent initialisation of base class
| ConfigName_ | YAML config file used to set runtime constants |
| void OscillatorBase::CalculateProbabilities | ( | ) |
Calculate the oscillation probabilities for the providied oscillation probabilities.
| void OscillatorBase::CalculateProbabilities | ( | const std::vector< FLOAT_T > & | OscParams | ) |
Calculate the oscillation probabilities for the providied oscillation probabilities.
| OscParams | Vector of oscillation parameters to calculate probabities at. |
|
inline |
Define the oscillation parameters with a given name and pointer to a value.
| ParName_ | Oscillation parameter name |
| ParValue_ | Point to oscillation parameter value |
|
inline |
Return flag which describes whether the OscProbCalcerBase::OscProbCalcerBase() has had it's Energy and CosineZ evaluation points set in the constructor of the derived OscillatorBase::OscillatorBase() object.
| bool OscillatorBase::HasOscProbCalcerGotOscillationChannel | ( | int | GeneratedFlavour, |
| int | DetectedFlavour ) |
Check whether a particular OscProbCalcerBase::OscProbCalcerBase() instance has a particular oscillation channel.
| GeneratedFlavour | The oscillation channel generated neutrino flavour to check for |
| DetectedFlavour | The oscillation channel detected neutrino flavour to check for |
|
private |
Initialise OscillatorBase object.
Define everything which is needed for the OscillatorBase object to function
| Config_ | YAML Node to be initialised from |
|
private |
Return an OscProbCalcerBase::OscProbCalcerBase() object from the requested inputs.
Create and initialise fOscProbCalcer to be an instance of OscProbCalcerBase::OscProbCalcerBase() associated with a particular implementation denoted by
| OscProbCalcerImplementationToCreate | and config path |
| OscProbCalcerConfigname,recast | it to a base object OscProbCalcerBase::OscProbCalcerBase() and returns it. |
|
inlineprotectedvirtual |
Do follow-up calculations with the oscillation probabilities. E.g.: averages in the SubSampling CalculationType.
Reimplemented in OscillatorSubSampling.
| void OscillatorBase::PrintWeights | ( | ) |
Print the oscillation probabilities for a particular OscProbCalcerBase::OscProbCalcerBase() instance in fOscProbCalcer.
Print the calculated oscillation probability values for a particular OscProbCalcerBase::OscProbCalcerBase() instance in #fOscProbCalcers. This is typically performed after a call to CalculateProbabilities()
|
pure virtual |
Return a vector of bin edges which can be used to plot the oscillation probability.
If we want to plot the oscillation probabilties, we need to define a binning which can be used to create the histogram. This is implementation dependent because the binned implementation should return the binning used to define the probability binning, but event-by-event needs to return a binning such that a single evaluation point falls in a single bin
| ReturnEnergy | Flag to return the binning for Energy or CosineZ |
Implemented in OscillatorBinned, OscillatorSubSampling, and OscillatorUnbinned.
| std::vector< FLOAT_T > OscillatorBase::ReturnCosineZArray | ( | ) |
Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase() contained in this instance of OscillatorBase::OscillatorBase()
|
inline |
Return flag which describes whether CosineZ binning is considered in the object.
| std::vector< FLOAT_T > OscillatorBase::ReturnEnergyArray | ( | ) |
Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase() contained in this instance of OscillatorBase::OscillatorBase()
| std::string OscillatorBase::ReturnImplementationName | ( | ) |
Return a string which encapsulates the calculation type along with the calculation engine.
| int OscillatorBase::ReturnNCosineZPoints | ( | ) |
Return the number of CosineZ points which are being evaluated in the OscProbCalcerBase::OscProbCalcerBase() object.
| int OscillatorBase::ReturnNEnergyPoints | ( | ) |
Return the number of Energy points which are being evaluated in the OscProbCalcerBase::OscProbCalcerBase() object.
| std::vector< int > OscillatorBase::ReturnNeutrinoTypes | ( | ) |
Return the neutrino types the specific implementation expects.
| int OscillatorBase::ReturnNOscParams | ( | ) |
Return number of expected oscillation parameters for a particular OscProbCalcerBase::OscProbCalcerBase() instance in #fOscProbCalcers.
Each instance of OscProbCalcerBase::OscProbCalcerBase expects a particular number of oscillation parameters. This function returns this value for an OscProbCalcerBase::OscProbCalcerBase instance in fOscProbCalcer.
| std::vector< NuOscillator::OscillationChannel > OscillatorBase::ReturnOscChannels | ( | ) |
Return the oscillation channels the specific implementation expects.
|
inline |
Return oscillation probability for a given initial and final flavour, for a given energy and cosineZ.
| InitNuFlav | Initial neutrino flavour of the neutrino |
| FinalNuFlav | Final neutrino flavour of the neutrino |
| EnergyVal | True energy of the neutrino |
| CosineZVal | True direction of the neutrino in CosineZ |
|
protected |
Return a pointer to the oscillation probability memory address in a particular index of #fOscProbCalcers for a particular event.
Return the memory address for the oscillation probability which is calculated for neutrinos of a particular initial and final flavour, energy and cosine value. This is a memory address for a particular OscProbCalcerBase::OscProbCalcerBase() instance stored in a particular index in #fOscProbCalcers.
| CalcerIndex | The index in #fOscProbCalcers. |
| InitNuFlav | Initial neutrino flavour of event |
| FinalNuFlav | Final neutrino flavour of event |
| EnergyVal | Neutrino energy of event |
| CosineZVal | Netrino cosine zenith direction of event |
|
pure virtual |
Return a pointer to the oscillation probability for the requested event attributes.
Determine the memory address address where the calculated oscillation probability for events of the specific requested type will be stored. This will be different depending on the calculation implementation. For the binned approach, the particular bin in which the requested energy and cosine falls will need to be determined. For unbinned approach, the exact neutrino energy and cosine are expected to be used. Alternative approachs which smear the oscillation probability will be able to use this function to apply the smear.
| InitNuFlav | Initial neutrino flavour of the neutrino |
| FinalNuFlav | Final neutrino flavour of the neutrino |
| EnergyVal | True energy of the neutrino |
| CosineZVal | True direction of the neutrino in CosineZ |
Implemented in OscillatorBinned, OscillatorSubSampling, and OscillatorUnbinned.
| void OscillatorBase::SanityCheck | ( | ) |
Perform a sanity check which ensures that #fOscProbCalcers have been set correctly.
Ensure that: the #fOscProbCalcers has been initialised with atleast one OscProbCalcerBase::OscProbCalcerBase() instance, each OscProbCalcerBase::OscProbCalcerBase() instance passes the sanity check, and that each OscProbCalcerBase::OscProbCalcerBase() instance has the same CosineZ treatement as the OscillatorBase() instance expects.
| void OscillatorBase::SetCosineZArrayInCalcer | ( | std::vector< FLOAT_T > | Array | ) |
Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored in fOscProbCalcer.
Each instance of OscProbCalcerBase::OscProbCalcerBase() needs an energy array which will be used to calculate the oscillation probabilities. This function sets that array
| Array | The energy array which will be passed to the OscProbCalcerBase::OscProbCalcerBase() instance |
| void OscillatorBase::SetEnergyArrayInCalcer | ( | std::vector< FLOAT_T > | Array | ) |
Set the energy array which will be used by the OscProbCalcerBase::OscProbCalcerBase() instance stored in a particular index in #fOscProbCalcers.
Each instance of OscProbCalcerBase::OscProbCalcerBase() needs an energy array which will be used to calculate the oscillation probabilities. This function sets that array
| Array | The energy array which will be passed to the OscProbCalcerBase::OscProbCalcerBase() instance |
| void OscillatorBase::Setup | ( | ) |
Setup each instance of OscProbCalcerBase::OscProbCalcerBase() instance in fOscProbCalcer.
Setup function is public so that OscProbCalcerBase::OscProbCalcerBase() instances, when using the unbinned calculation implementation, can be setup. The unbinned implementation assumes that the Energy and CosineZ arrays will be set after the OscillatorBase() object has been initialised.
|
inlineprotectedvirtual |
Setup specific oscillator implementation.
Reimplemented in OscillatorSubSampling.
|
protected |
YAML Config manager.
|
protected |
A string describing the calculation implementation, e.g. Binned.
|
protected |
A boolean used for declaring whether the OscillatorBase() object expects to care about the CosineZ dimension.
|
protected |
Flad which describes whether the Energy and CosineZ evaluation points where set in the constructor of the OscillatorBase() derived object.
|
protected |
The instance of OscProbCalcerBase()
|
private |
A boolean which declares whether fOscProbCalcer has been initialised.
|
protected |
The verbosity level of console output.