NuOscillator
Loading...
Searching...
No Matches
OscProbCalcerBase Class Referenceabstract

Oscillation calculation engine (CUDAProb3, ProbGPU, Prob3++, etc.) implementation agnostic base class. More...

#include <OscProbCalcerBase.h>

Inheritance diagram for OscProbCalcerBase:
[legend]
Collaboration diagram for OscProbCalcerBase:
[legend]

Public Member Functions

virtual ~OscProbCalcerBase ()
 Destructor.
 
void SetEnergyArray (std::vector< FLOAT_T > EnergyArray)
 Define the Energy which will be used when calculating the oscillation probabilities.
 
void SetCosineZArray (std::vector< FLOAT_T > CosineZArray)
 Define the CosineZ which will be used when calculating the oscillation probabilities.
 
const FLOAT_T * ReturnPointerToWeight (int InitNuFlav, int FinalNuFlav, FLOAT_T Energy, FLOAT_T CosineZ=DUMMYVAL)
 Return pointer to the weight array for a specific Energy and CosineZ.
 
void Reweight ()
 General function used to call the oscillation probability calculation.
 
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 calculating the oscillation probabilities.
 
void Reweight (const std::vector< FLOAT_T > &OscParams_)
 Legacy implementation function of Reweight()
 
void Setup ()
 General function used to setup all variables used within the reweighting.
 
bool SanityCheck ()
 Ensures that the specific implementation has been correctly initialised.
 
void PrintWeights ()
 Print the calculated oscillation probabilities.
 
void PrintKnownOscillationChannels ()
 Print the oscillation channels which a particular instance has been configured with.
 
bool HasOscillationChannel (int GeneratedFlavour, int DetectedFlavour)
 Check whether a particular oscillation channel has been configured in a particular instance of OscProbCalcerBase::OscProbCalcerBase()
 
int ReturnNOscParams ()
 Return the number of oscillation parameters the specific implementation expects.
 
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.
 
std::vector< FLOAT_T > ReturnOscParamsCurr ()
 Return the oscillation parameters which were used for the last calculation.
 
int ReturnNEnergyPoints ()
 Return the number of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()
 
int ReturnNCosineZPoints ()
 Return the number of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()
 
std::vector< FLOAT_T > ReturnEnergyArray ()
 Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()
 
std::vector< FLOAT_T > ReturnCosineZArray ()
 Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()
 
std::string ReturnImplementationName ()
 Return the specific implementation name.
 
bool ReturnCosineZIgnored ()
 Return a boolean which describes whether the specific implementation cares about CosineZ.
 
int ReturnNWeights ()
 Return the number of oscillation probabilities that are being calculated.
 
std::vector< FLOAT_T > ReturnWeightArray ()
 Return the vector of oscillation probabilites which have been calculated.
 
std::vector< NuOscillator::OscillationProbability > ReturnProbabilities ()
 Return vector of oscillation probabilities with associated neutrin type, oscillation channel, Energy and CosineZ.
 
bool ReturnHasSetEnergyArray ()
 Return whether the instance of OscProbCalcerBase() has already been assigned the Energy binning.
 
bool ReturnHasSetCosineZArray ()
 Return whether the instance of OscProbCalcerBase() has already been assigned the CosineZ binning.
 
int ReturnNuTypeFromFlavour (int NuFlav)
 Return the index in fNeutrinoTypes for a particular neutrino flavour (neutrino or antineutrino)
 
void PrintOscParamsCurr ()
 Print current oscillation parameters.
 

Protected Member Functions

 OscProbCalcerBase (YAML::Node InputConfig_)
 Default constructor.
 
 OscProbCalcerBase (std::string ConfigName_)
 Wrapper Construct.
 
void IgnoreCosineZBinning (bool Ignore)
 Some implementations don't care about the CosineZ values, so this is a method to set fCosineZArraySet to true in those cases.
 
bool AreOscParamsChanged ()
 Check whether the oscillation parameters have changed since their previous value.
 
void SetCurrOscParams ()
 Save the oscillation parameters which have been requested.
 
void ResetCurrOscParams ()
 (Re-)Initialise the saved oscillation parameters in fOscParamsCurr
 
void InitialiseNeutrinoTypesArray (int Size)
 Initialise the fNeutrinoTypes mapping array to a particular size with dummy values.
 
void InitialiseOscillationChannelMapping ()
 Read the [OscProbCalcerSetup][Implementation][OscChannelMapping] YAML node and configure fOscillationChannels.
 
void CheckNuFlavourMapping ()
 Check that the NuType/NuFlav mapping is set correctly based on the inputs from the particular implementation.
 
void IntialiseWeightArray ()
 Initialise the array in which the oscillation probabilities will be stored with dummy values.
 
void SanitiseProbabilities ()
 Ensure that the oscillation probabilities are within [0.,1.] range, if not throw error.
 
int ReturnCosineZIndexFromValue (FLOAT_T CosineZVal)
 Return the index in fCosineZArray for a particular value of CosineZ. If it's not found, throws an error.
 
int ReturnEnergyIndexFromValue (FLOAT_T EnergyVal)
 Return the index in fEnergyArray for a particular value of Energy. If it's not found, throws an error.
 
int ReturnOscChannelIndexFromFlavours (int InitNuFlav, int FinalNuFlav)
 Loop through fOscillationChannels and determine which index corresponds to the requested flavours.
 
void SetExpectedParameterNames (const std::vector< std::string > &ExpectedOscParNames_)
 Define the list of parameter names that a particular instance of OscProbCalcer expects.
 
void PrintExpectedParameterNames ()
 Print the expected parameter names.
 
FLOAT_T GetOscillationParameter (int Index)
 Return the value of the oscillation parameter associated with the index.
 
void CheckOscillationParametersDefined ()
 Check that all the expected oscillation parameters have been assigned a value.
 
virtual void CalculateProbabilities ()=0
 Calculate some oscillation probabilities for a particular oscillation parameter set.
 
virtual void SetupPropagator ()=0
 Setup any implementation specific variables/functions.
 
virtual int ReturnWeightArrayIndex (int NuTypeIndex, int OscChanIndex, int EnergyIndex, int CosineZIndex=-1)=0
 Return the index in the weight array for a specific combination of neutrino oscillation channel, energy and cosine zenith.
 
virtual long DefineWeightArraySize ()=0
 Define the size of fWeightArray.
 

Protected Attributes

int fNNeutrinoTypes
 The number of neutrino types (neutrino and antineutrino)
 
std::vector< int > fNeutrinoTypes
 The mapping of neutrino types to uniquely defined integers (i.e. index)
 
int fNOscillationChannels
 The number of oscillation channels which have been configured.
 
std::vector< NuOscillator::OscillationChannel > fOscillationChannels
 The mapping of oscillation channels which have been requested from the YAML config.
 
int fNEnergyPoints
 The number of Energy points which are being evaluated by the oscillation probability engine.
 
int fNCosineZPoints
 The number of CosineZ points which are being evaluated by the oscillation probability engine.
 
std::vector< FLOAT_T > fEnergyArray
 The vector of Energy values being evaluated by the oscillation probability engine.
 
std::vector< FLOAT_T > fCosineZArray
 The vector of CosineZ values being evaluated by the oscillation probability engine.
 
int fNWeights
 The number of oscillation probabilities being calculated.
 
std::vector< FLOAT_T > fWeightArray
 Vector which stores the oscillation probabilities.
 
int fVerbose
 Define the verbosity of the console output.
 
std::string fImplementationName
 Define the implementation name - Can be used for recasting later (similar to TObject::InheritsFrom() etc.)
 
bool fCosineZIgnored
 Flag to define whether the CosineZ binning has been ignored in the specific implementation.
 
YAML::Node Config
 YAML Config object used to get runtime specific variables.
 

Private Attributes

bool fEnergyArraySet
 Boolean declaring whether the Energy array has been set.
 
bool fCosineZArraySet
 Boolean declaring whether the CosineZ array has been set.
 
bool fPropagatorSet
 Boolean declaring whether the specific propagator SetupPropagator() function has been called.
 
bool fWeightArrayInit
 Boolean declaring whether fWeightArray has been initialised correctly.
 
bool fNuMappingSet
 Boolean declaring whether fNeutrinoTypes and fOscillationChannels have been initialised correctly.
 
FLOAT_T PrecisionLimit
 Precision limit which allows a slight unphysical probability to pass the SanitiseProbabilities check.
 
int fNOscParams
 Store the oscillation parameter set used to calculate the previous and current probabilities.
 
std::vector< FLOAT_T > fOscParamsCurr
 Vector which stores the saved oscillation probabilities.
 
std::vector< FLOAT_T * > fOscParams
 Vector of pointers to oscillation parameter values.
 
std::vector< std::string > fExpectedOscillationParameterNames
 Vector of expected oscillation parameter names.
 
std::vector< bool > fOscillationParametersSetCheck
 Check to determine which of the expected oscillation parameters have been registered.
 
bool fUseLegacyMode
 Check to determine if LegacyMode has been requested.
 
bool fUseLegacyMode_OscParsSet
 Check to determine in Reweight(std::vector<FLOAT_T> OscParams) has been called.
 
bool fNoSanity
 Boolean declaring whether the SanitiseProbabilities function should be called in the Reweight function. This should only be used for performance sensitive applications as when this is false, oscillation probabilities could be returned which are <0, >1, or nan.
 

Detailed Description

Oscillation calculation engine (CUDAProb3, ProbGPU, Prob3++, etc.) implementation agnostic base class.

Constructor & Destructor Documentation

◆ ~OscProbCalcerBase()

OscProbCalcerBase::~OscProbCalcerBase ( )
virtual

Destructor.

◆ OscProbCalcerBase() [1/2]

OscProbCalcerBase::OscProbCalcerBase ( YAML::Node InputConfig_)
protected

Default constructor.

It is protected to prevent initialisation of base class

Parameters
Config_YAML::Node used to define the object

◆ OscProbCalcerBase() [2/2]

OscProbCalcerBase::OscProbCalcerBase ( std::string ConfigName_)
inlineprotected

Wrapper Construct.

If only a file path of a config has been specified, create a YAML::Node and then continue with the default constructor

Parameters
ConfigName_Name of YAML config used to set runtime variables

Member Function Documentation

◆ AreOscParamsChanged()

bool OscProbCalcerBase::AreOscParamsChanged ( )
protected

Check whether the oscillation parameters have changed since their previous value.

We can save a fairly expensive calculation by checking whether the oscillation parameters have been updated since the last call to CalculateProbabilities() , for the price of a couple of if statements. Whilst in normal MCMC running, this will almost always return true, for sigma variations of systematics, this will almost always return false

Returns
Boolean whether the OscParamsToCheck match those saved from the last calculation

◆ CalculateProbabilities()

virtual void OscProbCalcerBase::CalculateProbabilities ( )
protectedpure virtual

Calculate some oscillation probabilities for a particular oscillation parameter set.

Calculator engine specific implementation to calculate the oscillation probabilties for the given oscillation parameters. This function both calculates and stores the oscillation probabilities in fWeightArray.

Parameters
OscParamsThe parameter set to calculate oscillation probabilities at

Implemented in OscProbCalcerCHIC, OscProbCalcerCUDAProb3, OscProbCalcerCUDAProb3Linear, OscProbCalcerGLoBESLinear, OscProbCalcerNuFASTEarth, OscProbCalcerNuFASTLinear, OscProbCalcerNuSQUIDSLinear, OscProbCalcerOscLibLinear, OscProbCalcerOscProb, OscProbCalcerProb3pp, and OscProbCalcerProbGPULinear.

◆ CheckNuFlavourMapping()

void OscProbCalcerBase::CheckNuFlavourMapping ( )
protected

Check that the NuType/NuFlav mapping is set correctly based on the inputs from the particular implementation.

Ensures that the mapping variables (fNeutrinoTypes, fOscillationChannels) are the expected size and filled with reasonable values

◆ CheckOscillationParametersDefined()

void OscProbCalcerBase::CheckOscillationParametersDefined ( )
protected

Check that all the expected oscillation parameters have been assigned a value.

◆ DefineParameter()

void OscProbCalcerBase::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 calculating the oscillation probabilities.

Parameters
ParNameParameter name that will be checked against expected parameters
ParValuePointer to value of parameter

◆ DefineWeightArraySize()

virtual long OscProbCalcerBase::DefineWeightArraySize ( )
protectedpure virtual

Define the size of fWeightArray.

This is implementation specific because some propagators calculate all oscillation channels together, whilst others calculate only a single oscillation channel.

Returns
Length that fWeightArray should be initialised to

Implemented in OscProbCalcerCHIC, OscProbCalcerCUDAProb3, OscProbCalcerCUDAProb3Linear, OscProbCalcerGLoBESLinear, OscProbCalcerNuFASTEarth, OscProbCalcerNuFASTLinear, OscProbCalcerNuSQUIDSLinear, OscProbCalcerOscLibLinear, OscProbCalcerOscProb, OscProbCalcerProb3pp, and OscProbCalcerProbGPULinear.

◆ GetOscillationParameter()

FLOAT_T OscProbCalcerBase::GetOscillationParameter ( int Index)
protected

Return the value of the oscillation parameter associated with the index.

Parameters
IndexIndex of parameter to return value for

◆ HasOscillationChannel()

bool OscProbCalcerBase::HasOscillationChannel ( int GeneratedFlavour,
int DetectedFlavour )

Check whether a particular oscillation channel has been configured in a particular instance of OscProbCalcerBase::OscProbCalcerBase()

Parameters
GeneratedFlavourGenerated flavour of the questioned oscillation channel
DetectedFlavourDetected flavour of the questioned oscillation channel
Returns
Boolean parameter which describes if the oscillation channel is configured

◆ IgnoreCosineZBinning()

void OscProbCalcerBase::IgnoreCosineZBinning ( bool Ignore)
protected

Some implementations don't care about the CosineZ values, so this is a method to set fCosineZArraySet to true in those cases.

If the specific implementation does not include atmospheric implementations, then fCosineZArraySet should be set to true such that the Sanity check passes. Also sets fCosineZIgnored to be true if it should be ignored.

Parameters
IgnoreA boolean which declares whether the CosineZ dimension should be ignored.

◆ InitialiseNeutrinoTypesArray()

void OscProbCalcerBase::InitialiseNeutrinoTypesArray ( int Size)
protected

Initialise the fNeutrinoTypes mapping array to a particular size with dummy values.

Parameters
SizeSize of array to initialise

◆ InitialiseOscillationChannelMapping()

void OscProbCalcerBase::InitialiseOscillationChannelMapping ( )
protected

Read the [OscProbCalcerSetup][Implementation][OscChannelMapping] YAML node and configure fOscillationChannels.

◆ IntialiseWeightArray()

void OscProbCalcerBase::IntialiseWeightArray ( )
protected

Initialise the array in which the oscillation probabilities will be stored with dummy values.

◆ PrintExpectedParameterNames()

void OscProbCalcerBase::PrintExpectedParameterNames ( )
inlineprotected

Print the expected parameter names.

◆ PrintKnownOscillationChannels()

void OscProbCalcerBase::PrintKnownOscillationChannels ( )

Print the oscillation channels which a particular instance has been configured with.

◆ PrintOscParamsCurr()

void OscProbCalcerBase::PrintOscParamsCurr ( )

Print current oscillation parameters.

Prints the current oscillation parameters which have been used in the calculation

◆ PrintWeights()

void OscProbCalcerBase::PrintWeights ( )

Print the calculated oscillation probabilities.

◆ ResetCurrOscParams()

void OscProbCalcerBase::ResetCurrOscParams ( )
protected

(Re-)Initialise the saved oscillation parameters in fOscParamsCurr

◆ ReturnCosineZArray()

std::vector< FLOAT_T > OscProbCalcerBase::ReturnCosineZArray ( )
inline

Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

Returns
Return the vector of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

◆ ReturnCosineZIgnored()

bool OscProbCalcerBase::ReturnCosineZIgnored ( )
inline

Return a boolean which describes whether the specific implementation cares about CosineZ.

Returns
Return a boolean which describes whether the specific implementation cares about CosineZ

◆ ReturnCosineZIndexFromValue()

int OscProbCalcerBase::ReturnCosineZIndexFromValue ( FLOAT_T CosineZVal)
protected

Return the index in fCosineZArray for a particular value of CosineZ. If it's not found, throws an error.

Determine the index in fCosineZArray for a particular value of CosineZ

Parameters
CosineZValValue to search for
Returns
Index in fCosineZArray

◆ ReturnEnergyArray()

std::vector< FLOAT_T > OscProbCalcerBase::ReturnEnergyArray ( )
inline

Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

Returns
Return the vector of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

◆ ReturnEnergyIndexFromValue()

int OscProbCalcerBase::ReturnEnergyIndexFromValue ( FLOAT_T EnergyVal)
protected

Return the index in fEnergyArray for a particular value of Energy. If it's not found, throws an error.

Determine the index in fEnergyArray for a particular value of Energy

Parameters
EnergyValValue to search for
Returns
Index in fEnergyArray

◆ ReturnHasSetCosineZArray()

bool OscProbCalcerBase::ReturnHasSetCosineZArray ( )
inline

Return whether the instance of OscProbCalcerBase() has already been assigned the CosineZ binning.

Returns
Boolean flag

◆ ReturnHasSetEnergyArray()

bool OscProbCalcerBase::ReturnHasSetEnergyArray ( )
inline

Return whether the instance of OscProbCalcerBase() has already been assigned the Energy binning.

Returns
Boolean flag

◆ ReturnImplementationName()

std::string OscProbCalcerBase::ReturnImplementationName ( )
inline

Return the specific implementation name.

Returns
Return the specific implementation name

◆ ReturnNCosineZPoints()

int OscProbCalcerBase::ReturnNCosineZPoints ( )
inline

Return the number of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

Returns
Return the number of CosineZ points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

◆ ReturnNEnergyPoints()

int OscProbCalcerBase::ReturnNEnergyPoints ( )
inline

Return the number of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

Returns
Return the number of Energy points which are being used by the specific instance of OscProbCalcerBase::OscProbCalcerBase()

◆ ReturnNeutrinoTypes()

std::vector< int > OscProbCalcerBase::ReturnNeutrinoTypes ( )
inline

Return the neutrino types the specific implementation expects.

Returns
Return the neutrino types the specific implementation expects

◆ ReturnNOscParams()

int OscProbCalcerBase::ReturnNOscParams ( )
inline

Return the number of oscillation parameters the specific implementation expects.

Returns
Return the number of oscillation parameters the specific implementation expects

◆ ReturnNuTypeFromFlavour()

int OscProbCalcerBase::ReturnNuTypeFromFlavour ( int NuFlav)

Return the index in fNeutrinoTypes for a particular neutrino flavour (neutrino or antineutrino)

Neutrino flavour mapping is defined in fNeutrinoTypes, so for a particular events flavour, the index in the mapping is returned to aide in fWeightArray mapping

Parameters
NuFlavInitial neutrino type (neutrino or antineutrino)
Returns
Index in fNeutrinoTypes

◆ ReturnNWeights()

int OscProbCalcerBase::ReturnNWeights ( )
inline

Return the number of oscillation probabilities that are being calculated.

Returns
Return the number of oscillation probabilities that are being calculated

◆ ReturnOscChannelIndexFromFlavours()

int OscProbCalcerBase::ReturnOscChannelIndexFromFlavours ( int InitNuFlav,
int FinalNuFlav )
protected

Loop through fOscillationChannels and determine which index corresponds to the requested flavours.

Parameters
InitNuFlavGenerated neutrino flavour to search for
FinalNuFlavDetected neutrino flavour to search for
Returns
The index which corresponds to the requested neutrino flavours

◆ ReturnOscChannels()

std::vector< NuOscillator::OscillationChannel > OscProbCalcerBase::ReturnOscChannels ( )
inline

Return the oscillation channels the specific implementation expects.

Returns
Return the oscillation channels the specific implementation expects

◆ ReturnOscParamsCurr()

std::vector< FLOAT_T > OscProbCalcerBase::ReturnOscParamsCurr ( )
inline

Return the oscillation parameters which were used for the last calculation.

Returns
Return the oscillation parameters which were used for the last calculation

◆ ReturnPointerToWeight()

const FLOAT_T * OscProbCalcerBase::ReturnPointerToWeight ( int InitNuFlav,
int FinalNuFlav,
FLOAT_T Energy,
FLOAT_T CosineZ = DUMMYVAL )

Return pointer to the weight array for a specific Energy and CosineZ.

The specific calculation engine will calculate an oscillation probability for a particular initial and final neutrino flavour, neutrino Energy and CosineZ and stores it in fWeightArray. This function returns a pointer to the correct index in fWeightArray for the given inputs

Parameters
InitNuFlavInitial neutrino flavour of the neutrino
FinalNuFlavFinal neutrino flavour of the neutrino
EnergyTrue energy of the neutrino
CosineZTrue direction of the neutrino in CosineZ
Returns
Pointer to the memory address where the calculated oscillation probability for events of the specific requested type will be stored

◆ ReturnProbabilities()

std::vector< NuOscillator::OscillationProbability > OscProbCalcerBase::ReturnProbabilities ( )

Return vector of oscillation probabilities with associated neutrin type, oscillation channel, Energy and CosineZ.

This uses the OscillationProbability struct

Returns
Vector of OscillationProbability structs

◆ ReturnWeightArray()

std::vector< FLOAT_T > OscProbCalcerBase::ReturnWeightArray ( )
inline

Return the vector of oscillation probabilites which have been calculated.

Returns
Return the vector of oscillation probabilites which have been calculated

◆ ReturnWeightArrayIndex()

virtual int OscProbCalcerBase::ReturnWeightArrayIndex ( int NuTypeIndex,
int OscChanIndex,
int EnergyIndex,
int CosineZIndex = -1 )
protectedpure virtual

Return the index in the weight array for a specific combination of neutrino oscillation channel, energy and cosine zenith.

Depending upon the specific implementation, there maybe different ways to calculate the oscillation probabilites (i.e. all oscillation channels at once or seperately). This function allows a mapping between the neutrino flavour to calculate for (along with Energy and CosineZ) to the index in fWeightArray.

Parameters
NuTypeIndexThe index in fNeutrinoTypes (neutrino/antinuetrino) to return the pointer for
OscChanIndexThe index in fOscillationChannels to return the pointer for
EnergyIndexThe index in fEnergyArray to return the pointer for
CosineZIndexThe index in fCosineZArray to return the pointer for
Returns
Index in fWeightArray which corresponds to the given inputs

Implemented in OscProbCalcerCHIC, OscProbCalcerCUDAProb3, OscProbCalcerCUDAProb3Linear, OscProbCalcerGLoBESLinear, OscProbCalcerNuFASTEarth, OscProbCalcerNuFASTLinear, OscProbCalcerNuSQUIDSLinear, OscProbCalcerOscLibLinear, OscProbCalcerOscProb, OscProbCalcerProb3pp, and OscProbCalcerProbGPULinear.

◆ Reweight() [1/2]

void OscProbCalcerBase::Reweight ( )

General function used to call the oscillation probability calculation.

This function performs both the implementation specific CalculateProbabilities() function, along with checking whether the oscillation parameters have been updated since the last call. It also calls SanitiseProbabilities().

◆ Reweight() [2/2]

void OscProbCalcerBase::Reweight ( const std::vector< FLOAT_T > & OscParams_)

Legacy implementation function of Reweight()

Parameters
OscParams_Input oscillation parameters

◆ SanitiseProbabilities()

void OscProbCalcerBase::SanitiseProbabilities ( )
protected

Ensure that the oscillation probabilities are within [0.,1.] range, if not throw error.

◆ SanityCheck()

bool OscProbCalcerBase::SanityCheck ( )

Ensures that the specific implementation has been correctly initialised.

Checks that the Energy and CosineZ arrays have been passed to the OscProbCalcerBase::OscProbCalcerBase() object, the neutrino flavour mapping, weight array and propagator has also been initialised

◆ SetCosineZArray()

void OscProbCalcerBase::SetCosineZArray ( std::vector< FLOAT_T > CosineZArray)

Define the CosineZ which will be used when calculating the oscillation probabilities.

Parameters
CosineZArrayThe CosineZ array which will be used by the calculation engine

◆ SetCurrOscParams()

void OscProbCalcerBase::SetCurrOscParams ( )
protected

Save the oscillation parameters which have been requested.

Save the oscillation parameters which have been used in the probability calculation to fOscParamsCurr

◆ SetEnergyArray()

void OscProbCalcerBase::SetEnergyArray ( std::vector< FLOAT_T > EnergyArray)

Define the Energy which will be used when calculating the oscillation probabilities.

Parameters
EnergyArrayThe Energy array which will be used by the calculation engine

◆ SetExpectedParameterNames()

void OscProbCalcerBase::SetExpectedParameterNames ( const std::vector< std::string > & ExpectedOscParNames_)
inlineprotected

Define the list of parameter names that a particular instance of OscProbCalcer expects.

Parameters
ExpectedOscParNames_List of parameter names

◆ Setup()

void OscProbCalcerBase::Setup ( )

General function used to setup all variables used within the reweighting.

Ensures that the Energy and CosineZ arrays have been set correctly, along with initialising the saved oscillation parameters and weight array (via. ResetCurrOscParams() and IntialiseWeightArray() ). Then sets the propagator specific implementation SetupPropagator()

◆ SetupPropagator()

virtual void OscProbCalcerBase::SetupPropagator ( )
protectedpure virtual

Setup any implementation specific variables/functions.

Calculator engine specific implementation to setup any variables needed to calculate the oscillation probabilities

Implemented in OscProbCalcerCHIC, OscProbCalcerCUDAProb3, OscProbCalcerCUDAProb3Linear, OscProbCalcerGLoBESLinear, OscProbCalcerNuFASTEarth, OscProbCalcerNuFASTLinear, OscProbCalcerNuSQUIDSLinear, OscProbCalcerOscLibLinear, OscProbCalcerOscProb, OscProbCalcerProb3pp, and OscProbCalcerProbGPULinear.

Member Data Documentation

◆ Config

YAML::Node OscProbCalcerBase::Config
protected

YAML Config object used to get runtime specific variables.

◆ fCosineZArray

std::vector<FLOAT_T> OscProbCalcerBase::fCosineZArray
protected

The vector of CosineZ values being evaluated by the oscillation probability engine.

◆ fCosineZArraySet

bool OscProbCalcerBase::fCosineZArraySet
private

Boolean declaring whether the CosineZ array has been set.

◆ fCosineZIgnored

bool OscProbCalcerBase::fCosineZIgnored
protected

Flag to define whether the CosineZ binning has been ignored in the specific implementation.

◆ fEnergyArray

std::vector<FLOAT_T> OscProbCalcerBase::fEnergyArray
protected

The vector of Energy values being evaluated by the oscillation probability engine.

◆ fEnergyArraySet

bool OscProbCalcerBase::fEnergyArraySet
private

Boolean declaring whether the Energy array has been set.

◆ fExpectedOscillationParameterNames

std::vector<std::string> OscProbCalcerBase::fExpectedOscillationParameterNames
private

Vector of expected oscillation parameter names.

◆ fImplementationName

std::string OscProbCalcerBase::fImplementationName
protected

Define the implementation name - Can be used for recasting later (similar to TObject::InheritsFrom() etc.)

◆ fNCosineZPoints

int OscProbCalcerBase::fNCosineZPoints
protected

The number of CosineZ points which are being evaluated by the oscillation probability engine.

◆ fNEnergyPoints

int OscProbCalcerBase::fNEnergyPoints
protected

The number of Energy points which are being evaluated by the oscillation probability engine.

◆ fNeutrinoTypes

std::vector<int> OscProbCalcerBase::fNeutrinoTypes
protected

The mapping of neutrino types to uniquely defined integers (i.e. index)

◆ fNNeutrinoTypes

int OscProbCalcerBase::fNNeutrinoTypes
protected

The number of neutrino types (neutrino and antineutrino)

◆ fNoSanity

bool OscProbCalcerBase::fNoSanity
private

Boolean declaring whether the SanitiseProbabilities function should be called in the Reweight function. This should only be used for performance sensitive applications as when this is false, oscillation probabilities could be returned which are <0, >1, or nan.

◆ fNOscillationChannels

int OscProbCalcerBase::fNOscillationChannels
protected

The number of oscillation channels which have been configured.

◆ fNOscParams

int OscProbCalcerBase::fNOscParams
private

Store the oscillation parameter set used to calculate the previous and current probabilities.

◆ fNuMappingSet

bool OscProbCalcerBase::fNuMappingSet
private

Boolean declaring whether fNeutrinoTypes and fOscillationChannels have been initialised correctly.

◆ fNWeights

int OscProbCalcerBase::fNWeights
protected

The number of oscillation probabilities being calculated.

◆ fOscillationChannels

std::vector<NuOscillator::OscillationChannel> OscProbCalcerBase::fOscillationChannels
protected

The mapping of oscillation channels which have been requested from the YAML config.

◆ fOscillationParametersSetCheck

std::vector<bool> OscProbCalcerBase::fOscillationParametersSetCheck
private

Check to determine which of the expected oscillation parameters have been registered.

◆ fOscParams

std::vector<FLOAT_T*> OscProbCalcerBase::fOscParams
private

Vector of pointers to oscillation parameter values.

◆ fOscParamsCurr

std::vector<FLOAT_T> OscProbCalcerBase::fOscParamsCurr
private

Vector which stores the saved oscillation probabilities.

◆ fPropagatorSet

bool OscProbCalcerBase::fPropagatorSet
private

Boolean declaring whether the specific propagator SetupPropagator() function has been called.

◆ fUseLegacyMode

bool OscProbCalcerBase::fUseLegacyMode
private

Check to determine if LegacyMode has been requested.

◆ fUseLegacyMode_OscParsSet

bool OscProbCalcerBase::fUseLegacyMode_OscParsSet
private

Check to determine in Reweight(std::vector<FLOAT_T> OscParams) has been called.

◆ fVerbose

int OscProbCalcerBase::fVerbose
protected

Define the verbosity of the console output.

◆ fWeightArray

std::vector<FLOAT_T> OscProbCalcerBase::fWeightArray
protected

Vector which stores the oscillation probabilities.

◆ fWeightArrayInit

bool OscProbCalcerBase::fWeightArrayInit
private

Boolean declaring whether fWeightArray has been initialised correctly.

◆ PrecisionLimit

FLOAT_T OscProbCalcerBase::PrecisionLimit
private

Precision limit which allows a slight unphysical probability to pass the SanitiseProbabilities check.


The documentation for this class was generated from the following files: