MaCh3 2.2.1
Reference Guide
Loading...
Searching...
No Matches
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
7class 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();
27 void Evaluate();
29 const M3::float_t* GetNuOscillatorPointers(int Channel, int InitFlav, int FinalFlav, FLOAT_T TrueEnu, FLOAT_T TrueCosZenith = -999);
30
32 void SetOscillatorBinning(const int Channel, const std::vector<M3::float_t>& EnergyArray, const std::vector<M3::float_t>& CosineZArray);
33
35 unsigned int GetOscParamsSize() const {return static_cast<unsigned int>(OscParams.size());};
36 private:
39
41 std::vector<std::unique_ptr<OscillatorBase>> NuOscProbCalcers;
42
44 std::vector<const double*> OscParams;
45};
Interface between NuOscillator and MaCh3, meant to compute oscillation weights for events/bin.
bool isEqualBinningPerOscChannel()
check if same binning is used for multiple oscillation channels
void Evaluate()
DB Evaluate oscillation weights for each defined event/bin.
virtual ~OscillationHandler()
Destructor.
unsigned int GetOscParamsSize() const
return size of oscillation parameter pointer vector
const M3::float_t * GetNuOscillatorPointers(int Channel, int InitFlav, int FinalFlav, FLOAT_T TrueEnu, FLOAT_T TrueCosZenith=-999)
Get pointer to oscillation weight.
std::vector< std::unique_ptr< OscillatorBase > > NuOscProbCalcers
DB Variables required for oscillation.
void SetOscillatorBinning(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:28