#ifndef __JAANET__JFLUXDICTIONARY__ #define __JAANET__JFLUXDICTIONARY__ #include #include "JAAnet/JConstantFlux.hh" #include "JAAnet/JPowerLawFlux.hh" #include "JAAnet/JHondaFluxInterpolator.hh" #include "JAAnet/JAtmosphericNeutrinoFlux.hh" #include "JAAnet/JFluxHelper.hh" #include "JOscProb/JOscProbHelper.hh" /** * \author bjung */ namespace JAANET {} namespace JPP { using namespace JAANET; } namespace JAANET { using JOSCPROB::JOscProbHelper; /** * Dictionary to map distinct flux function categories to unique identifiers. * The identifiers are provided by the enum `fluxes`. */ class JFluxDictionary: public std::map { public: /** * Indices of flux factors in flux factor dictionary. */ enum fluxes { FLUX_FUNCTIONS_BEGIN = 0, //!< Start of flux functions FLAT_FLUX = 1, //!< Flat flux POWER_LAW_FLUX = 2, //!< Power-law flux ATMOSPHERIC_NEUTRINO_FLUX = 3, //!< Atmospheric neutrino flux (c.f. `Flux_Atmospheric` in `/externals/flux/Flux.hh`) HONDA_FLUX = 4, //!< Interpolated azimuth-averaged Honda flux FLUX_FUNCTIONS_END = 99 //!< End of flux functions }; /** * Constructor. * * \param oscProb oscillation probability calculator */ JFluxDictionary(const JOscProbHelper& oscProb) : oscProb(oscProb) { const JHondaFluxInterpolator2D<> interpolator; (*this)[FLAT_FLUX] .reset(new JConstantFlux()); (*this)[POWER_LAW_FLUX] .reset(new JPowerLawFlux()); (*this)[ATMOSPHERIC_NEUTRINO_FLUX].reset(new JAtmosphericNeutrinoFlux(oscProb)); (*this)[HONDA_FLUX] .reset(new JOscFlux(interpolator, oscProb)); } /** * Default constructor. */ JFluxDictionary() : JFluxDictionary(JOscProbHelper()) {} private: JOscProbHelper oscProb; //!< Oscillation probability calculator }; } #endif