NuOscillator
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
OscillatorConstants.h File Reference
#include <math.h>
#include "yaml-cpp/yaml.h"
#include "TFile.h"
#include "TH1.h"
#include <string>
#include <iostream>
#include <vector>
Include dependency graph for OscillatorConstants.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NuOscillator::OscillationChannel
 Structure which defines the oscillation channel generated and detected neutrino flavours. More...
 
struct  NuOscillator::OscillationProbability
 Structure to contain all information about the neutrino type, oscillation channel, Energy and CosineZ used to calculate a specific probability. More...
 

Namespaces

namespace  NuOscillator
 

Macros

#define DUMMYVAL   -999
 

Typedefs

using FLOAT_T = float
 

Enumerations

enum  NuOscillator::Verbosity { NuOscillator::NONE =0 , NuOscillator::INFO =1 , NuOscillator::VERBOSE =2 }
 Different verbosity levels for console output. More...
 
enum  NuOscillator::NeutrinoFlavours {
  NuOscillator::kElectron =1 , NuOscillator::kMuon =2 , NuOscillator::kTau =3 , NuOscillator::kSterile1 =4 ,
  NuOscillator::kSterile2 =5 , NuOscillator::kSterile3 =6 , NuOscillator::nNeutrinoFlavours =7
}
 Different neutrino flavours currently supported within the analysis. More...
 
enum  { NuOscillator::kNuFlavour_Generated =0 , NuOscillator::kNuFlavour_Detected =1 , NuOscillator::nNuFlavours =2 }
 Enum which fixes the ordering of the generated and detected neutrino flavours in the #OscillationChannel structure. More...
 

Functions

std::vector< std::string > ReturnKnownConfigs ()
 Return vector of all config names for each oscillation engine which has been enabled.
 
int NeutrinoFlavour_StrToInt (const std::string &NuFlav)
 Convert a neutrino flavour string to integer.
 
std::string NeutrinoFlavour_IntToStr (const int NuFlav)
 Convert a neutrino flavour integer to string.
 
int Verbosity_StrToInt (const std::string &Verbosity)
 Return the Verbosity enum value correpsonding to a particular string.
 
NuOscillator::OscillationChannel ReturnOscillationChannel (const std::string &InputString)
 Take an input string formatted as 'GeneratedNeutrinoFlavour:DetectedNeutrinoFlavour' and return an NuOscillator::OscillationChannel() structure.
 
std::vector< FLOAT_Tlogspace (FLOAT_T Emin, FLOAT_T Emax, int nDiv)
 Generate vector of logarithmically spaced points.
 
std::vector< FLOAT_Tlinspace (FLOAT_T Emin, FLOAT_T Emax, int nDiv)
 Generate vector of linearly spaced points.
 
std::vector< FLOAT_TReadBinEdgesFromFile (const std::string &TFileName, const std::string &HistogramName, const int Verbose=NuOscillator::Verbosity::NONE)
 Read bin edges from input template histogram.
 
std::vector< FLOAT_TReturnBinCentersFromBinEdges (const std::vector< FLOAT_T > &BinEdges)
 Return the bin centers given the bin edges of a template histogram.
 
std::unordered_map< std::string, FLOAT_TReturnOscParamsFromConfig (YAML::Node Config)
 

Macro Definition Documentation

◆ DUMMYVAL

#define DUMMYVAL   -999

Typedef Documentation

◆ FLOAT_T

using FLOAT_T = float

Function Documentation

◆ linspace()

std::vector< FLOAT_T > linspace ( FLOAT_T  Emin,
FLOAT_T  Emax,
int  nDiv 
)
inline

Generate vector of linearly spaced points.

Parameters
Eminlower limit
Emaxupper limit
nDivNumber of divisions
Returns
Vector of linearly spaced points between Emin and Emax with nDiv divisions

◆ logspace()

std::vector< FLOAT_T > logspace ( FLOAT_T  Emin,
FLOAT_T  Emax,
int  nDiv 
)
inline

Generate vector of logarithmically spaced points.

Parameters
Eminlower limit
Emaxupper limit
nDivNumber of divisions
Returns
Vector of logarithmically spaced points between Emin and Emax with nDiv divisions

◆ NeutrinoFlavour_IntToStr()

std::string NeutrinoFlavour_IntToStr ( const int  NuFlav)
inline

Convert a neutrino flavour integer to string.

Inverse of NeutrinoFlavour_StrToInt()

Returns
Name of neutrino flavour

◆ NeutrinoFlavour_StrToInt()

int NeutrinoFlavour_StrToInt ( const std::string &  NuFlav)
inline

Convert a neutrino flavour string to integer.

Returns
Enum value in #NeutrinoFlavours

◆ ReadBinEdgesFromFile()

std::vector< FLOAT_T > ReadBinEdgesFromFile ( const std::string &  TFileName,
const std::string &  HistogramName,
const int  Verbose = NuOscillator::Verbosity::NONE 
)
inline

Read bin edges from input template histogram.

Parameters
TFileNameFile name
HistogramNameHistogram name
VerboseVerbosity level
Returns
Vector of bin edges

◆ ReturnBinCentersFromBinEdges()

std::vector< FLOAT_T > ReturnBinCentersFromBinEdges ( const std::vector< FLOAT_T > &  BinEdges)
inline

Return the bin centers given the bin edges of a template histogram.

Parameters
BinEdgesVector of bin edges
Returns
Vector of bin centers

◆ ReturnKnownConfigs()

std::vector< std::string > ReturnKnownConfigs ( )
inline

Return vector of all config names for each oscillation engine which has been enabled.

Returns
Vector of paths to config files

◆ ReturnOscillationChannel()

NuOscillator::OscillationChannel ReturnOscillationChannel ( const std::string &  InputString)
inline

Take an input string formatted as 'GeneratedNeutrinoFlavour:DetectedNeutrinoFlavour' and return an NuOscillator::OscillationChannel() structure.

Parameters
Stringformatted as 'GeneratedNeutrinoFlavour:DetectedNeutrinoFlavour'
Returns
NuOscillator::OscillationChannel() structure with generated and detected neutrino flavours

◆ ReturnOscParamsFromConfig()

std::unordered_map< std::string, FLOAT_T > ReturnOscParamsFromConfig ( YAML::Node  Config)
inline

◆ Verbosity_StrToInt()

int Verbosity_StrToInt ( const std::string &  Verbosity)
inline

Return the Verbosity enum value correpsonding to a particular string.

Parameters
VerbosityString to convert to enum value
Returns
Enum value describing the verbosity level