NuOscillator
Loading...
Searching...
No Matches
OscillatorSubSampling Class Reference

SubSampling Oscillation calculation implementation class. More...

#include <OscillatorSubSampling.h>

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

Public Member Functions

 OscillatorSubSampling (std::string ConfigName_)
 Default constructor.
 
 OscillatorSubSampling (YAML::Node Config_)
 Default constructor.
 
virtual ~OscillatorSubSampling ()
 Destructor.
 
const FLOAT_T * ReturnWeightPointer (int InitNuFlav, int FinalNuFlav, FLOAT_T EnergyVal, FLOAT_T CosineZVal=DUMMYVAL) final
 Return a pointer to the oscillation probability for the requested event attributes.
 
std::vector< FLOAT_T > ReturnBinEdgesForPlotting (bool ReturnEnergy) final
 Return a vector of bin edges used for oscillation probability plotting.
 
- Public Member Functions inherited from OscillatorBase
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.
 

Private Member Functions

void Initialise ()
 Initialise Oscillator instance: read energies and cosineZs, set them in Calcer.
 
void PostCalculateProbabilities () final
 Calculated coarse bin probabilities, defined as the average over the fine bin probabilities inside a particular coarse bin.
 
void SetupOscillatorImplementation () final
 Setup the oscillator.
 
int FindBinIndexFromEdges (FLOAT_T Val, std::vector< FLOAT_T > BinEdges)
 Return the index of the bin in which a given value would be.
 

Private Attributes

std::vector< FLOAT_T > AveragedOscillationProbabilities
 Vector holding averaged Probabilities [length = nBins].
 
std::vector< std::vector< const FLOAT_T * > > OscillationProbabilitiesToAverage
 Vector holding the pointers to the fine oscillation probabilities to average across [length = nBins][length = nFineBinsInCoarseBin].
 
size_t nCoarseEnergyBins
 Number of Coarse Energy Bins.
 
size_t nCoarseCosineZBins
 Number of Coarse CosineZ Bins.
 
size_t nFineEnergyBins
 Number of Fine Energy Bins.
 
size_t nFineCosineZBins
 Number of Fine CosineZ Bins.
 
size_t TotalCoarseBins
 Number of Total Coarse Bins.
 
std::vector< NuOscillator::OscillationChannel > OscillationChannels
 Oscillation channels in NuOscillator::OscillationChannel format.
 
size_t nOscillationChannels
 Number of oscillation channels.
 
std::vector< int > NeutrinoTypes
 Vector of indices for the neutrino types.
 
size_t nNeutrinoTypes
 Number of neutrino types.
 
std::string FileName
 The FileName which the binning is read from.
 
std::string CoarseEnergyAxisHistName
 The name of the histogram which contains the Energy axis coarse binning.
 
std::string FineEnergyAxisHistName
 The name of the histogram which contains the Energy axis fine binning.
 
std::string CoarseCosineZAxisHistName
 The name of the histogram which contains the CosineZ axis coarse binning.
 
std::string FineCosineZAxisHistName
 The name of the histogram which contains the CosineZ axis fine binning.
 
std::vector< FLOAT_T > CoarseEnergyAxisBinEdges
 A vector of Energy axis coarse bin edges.
 
std::vector< FLOAT_T > FineEnergyAxisBinEdges
 A vector of Energy axis fine bin edges.
 
std::vector< FLOAT_T > CoarseCosineZAxisBinEdges
 A vector of CosineZ axis coarse bin edges.
 
std::vector< FLOAT_T > FineCosineZAxisBinEdges
 A vector of CosineZ axis fine bin edges.
 
std::vector< FLOAT_T > FineEnergyAxisBinCenters
 A vector of Energy axis fine bin centers.
 
std::vector< FLOAT_T > FineCosineZAxisBinCenters
 A vector of CosineZ axis fine bin centers.
 

Additional Inherited Members

- Protected Member Functions inherited from OscillatorBase
 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.
 
- Protected Attributes inherited from OscillatorBase
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.
 

Detailed Description

SubSampling Oscillation calculation implementation class.

Implementation of OscillatorBase::OscillatorBase() object which uses standard binning for the energy and cosineZ dimension, read from TFile/TH1D such that the binning in each dimension is independent.

Constructor & Destructor Documentation

◆ OscillatorSubSampling() [1/2]

OscillatorSubSampling::OscillatorSubSampling ( std::string ConfigName_)

Default constructor.

Default constructor

Parameters
ConfigName_YAML config file used to set runtime constants

◆ OscillatorSubSampling() [2/2]

OscillatorSubSampling::OscillatorSubSampling ( YAML::Node Config_)

Default constructor.

Default constructor

Parameters
Config_YAML node used to set runtime constants

◆ ~OscillatorSubSampling()

OscillatorSubSampling::~OscillatorSubSampling ( )
virtual

Destructor.

Member Function Documentation

◆ FindBinIndexFromEdges()

int OscillatorSubSampling::FindBinIndexFromEdges ( FLOAT_T Val,
std::vector< FLOAT_T > BinEdges )
private

Return the index of the bin in which a given value would be.

Parameters
ValValue whose bin index is desired.
BinEdgesBinning used
Returns
Index of the bin in which the input value is located.

◆ Initialise()

void OscillatorSubSampling::Initialise ( )
private

Initialise Oscillator instance: read energies and cosineZs, set them in Calcer.

◆ PostCalculateProbabilities()

void OscillatorSubSampling::PostCalculateProbabilities ( )
finalprivatevirtual

Calculated coarse bin probabilities, defined as the average over the fine bin probabilities inside a particular coarse bin.

Reimplemented from OscillatorBase.

◆ ReturnBinEdgesForPlotting()

std::vector< FLOAT_T > OscillatorSubSampling::ReturnBinEdgesForPlotting ( bool ReturnEnergy)
finalvirtual

Return a vector of bin edges used for oscillation probability plotting.

Return the binning used to for the coarse probability binning

Parameters
ReturnEnergyFlag used to identify whether to return Energy or CosineZ binning
Returns
Vector of bin edges which are used for plotting purposes

Implements OscillatorBase.

◆ ReturnWeightPointer()

const FLOAT_T * OscillatorSubSampling::ReturnWeightPointer ( int InitNuFlav,
int FinalNuFlav,
FLOAT_T EnergyVal,
FLOAT_T CosineZVal = DUMMYVAL )
finalvirtual

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.

Parameters
InitNuFlavInitial neutrino flavour of the neutrino
FinalNuFlavFinal neutrino flavour of the neutrino
EnergyValTrue energy of the neutrino
CosineZValTrue 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

Implements OscillatorBase.

◆ SetupOscillatorImplementation()

void OscillatorSubSampling::SetupOscillatorImplementation ( )
finalprivatevirtual

Setup the oscillator.

Reimplemented from OscillatorBase.

Member Data Documentation

◆ AveragedOscillationProbabilities

std::vector<FLOAT_T> OscillatorSubSampling::AveragedOscillationProbabilities
private

Vector holding averaged Probabilities [length = nBins].

◆ CoarseCosineZAxisBinEdges

std::vector<FLOAT_T> OscillatorSubSampling::CoarseCosineZAxisBinEdges
private

A vector of CosineZ axis coarse bin edges.

◆ CoarseCosineZAxisHistName

std::string OscillatorSubSampling::CoarseCosineZAxisHistName
private

The name of the histogram which contains the CosineZ axis coarse binning.

◆ CoarseEnergyAxisBinEdges

std::vector<FLOAT_T> OscillatorSubSampling::CoarseEnergyAxisBinEdges
private

A vector of Energy axis coarse bin edges.

◆ CoarseEnergyAxisHistName

std::string OscillatorSubSampling::CoarseEnergyAxisHistName
private

The name of the histogram which contains the Energy axis coarse binning.

◆ FileName

std::string OscillatorSubSampling::FileName
private

The FileName which the binning is read from.

◆ FineCosineZAxisBinCenters

std::vector<FLOAT_T> OscillatorSubSampling::FineCosineZAxisBinCenters
private

A vector of CosineZ axis fine bin centers.

◆ FineCosineZAxisBinEdges

std::vector<FLOAT_T> OscillatorSubSampling::FineCosineZAxisBinEdges
private

A vector of CosineZ axis fine bin edges.

◆ FineCosineZAxisHistName

std::string OscillatorSubSampling::FineCosineZAxisHistName
private

The name of the histogram which contains the CosineZ axis fine binning.

◆ FineEnergyAxisBinCenters

std::vector<FLOAT_T> OscillatorSubSampling::FineEnergyAxisBinCenters
private

A vector of Energy axis fine bin centers.

◆ FineEnergyAxisBinEdges

std::vector<FLOAT_T> OscillatorSubSampling::FineEnergyAxisBinEdges
private

A vector of Energy axis fine bin edges.

◆ FineEnergyAxisHistName

std::string OscillatorSubSampling::FineEnergyAxisHistName
private

The name of the histogram which contains the Energy axis fine binning.

◆ nCoarseCosineZBins

size_t OscillatorSubSampling::nCoarseCosineZBins
private

Number of Coarse CosineZ Bins.

◆ nCoarseEnergyBins

size_t OscillatorSubSampling::nCoarseEnergyBins
private

Number of Coarse Energy Bins.

◆ NeutrinoTypes

std::vector<int> OscillatorSubSampling::NeutrinoTypes
private

Vector of indices for the neutrino types.

◆ nFineCosineZBins

size_t OscillatorSubSampling::nFineCosineZBins
private

Number of Fine CosineZ Bins.

◆ nFineEnergyBins

size_t OscillatorSubSampling::nFineEnergyBins
private

Number of Fine Energy Bins.

◆ nNeutrinoTypes

size_t OscillatorSubSampling::nNeutrinoTypes
private

Number of neutrino types.

◆ nOscillationChannels

size_t OscillatorSubSampling::nOscillationChannels
private

Number of oscillation channels.

◆ OscillationChannels

std::vector<NuOscillator::OscillationChannel> OscillatorSubSampling::OscillationChannels
private

Oscillation channels in NuOscillator::OscillationChannel format.

◆ OscillationProbabilitiesToAverage

std::vector< std::vector<const FLOAT_T*> > OscillatorSubSampling::OscillationProbabilitiesToAverage
private

Vector holding the pointers to the fine oscillation probabilities to average across [length = nBins][length = nFineBinsInCoarseBin].

◆ TotalCoarseBins

size_t OscillatorSubSampling::TotalCoarseBins
private

Number of Total Coarse Bins.


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