MaCh3  2.4.2
Reference Guide
OscillationHandler.h
Go to the documentation of this file.
1 #pragma once
2 
3 //MaCh3 includes
5 
6 //forward declare so we don't bleed NuOscillator headers
7 class OscillatorBase;
8 
12 {
13  public:
20  OscillationHandler(const std::string& ConfigFile, bool EqualBinningPerChannel,
21  std::vector<const double*> OscParams_, const int SubChannels);
23  virtual ~OscillationHandler();
24 
26  void AddSample(const std::string& NuOscillatorConfigFile, const int SubChannels);
27 
31  void Evaluate();
33  const M3::float_t* GetNuOscillatorPointers(const int Sample, const int Channel, const int InitFlav,
34  const int FinalFlav, const FLOAT_T TrueEnu, const FLOAT_T TrueCosZenith = -999);
35 
37  void SetOscillatorBinning(const int Sample, const int Channel, const std::vector<M3::float_t>& EnergyArray,
38  const std::vector<M3::float_t>& CosineZArray);
39 
41  unsigned int GetOscParamsSize() const {return static_cast<unsigned int>(OscParams.size());};
42  private:
45 
47  std::vector<std::vector<std::unique_ptr<OscillatorBase>>> NuOscProbCalcers;
48 
50  std::vector<const double*> OscParams;
51 };
Interface between NuOscillator and MaCh3, meant to compute oscillation weights for events/bin.
void AddSample(const std::string &NuOscillatorConfigFile, const int SubChannels)
Add different oscillator for sample.
bool isEqualBinningPerOscChannel()
check if same binning is used for multiple oscillation channels
std::vector< std::vector< std::unique_ptr< OscillatorBase > > > NuOscProbCalcers
DB Variables required for oscillation.
void Evaluate()
DB Evaluate oscillation weights for each defined event/bin.
virtual ~OscillationHandler()
Destructor.
const M3::float_t * GetNuOscillatorPointers(const int Sample, const int Channel, const int InitFlav, const int FinalFlav, const FLOAT_T TrueEnu, const FLOAT_T TrueCosZenith=-999)
Get pointer to oscillation weight.
OscillationHandler(const std::string &ConfigFile, bool EqualBinningPerChannel, std::vector< const double * > OscParams_, const int SubChannels)
Constructor.
unsigned int GetOscParamsSize() const
return size of oscillation parameter pointer vector
void SetOscillatorBinning(const int Sample, const int Channel, const std::vector< M3::float_t > &EnergyArray, const std::vector< M3::float_t > &CosineZArray)
Setup binning, arrays correspond to events and their energy bins.
std::vector< const double * > OscParams
pointer to osc params, since not all params affect every sample, we perform some operations before ha...
bool EqualBinningPerOscChannel
flag used to define whether all oscillation channels have a probability calculated using the same bin...
double float_t
Definition: Core.h:37