#ifndef __JAANET__JEVTWEIGHTFACTORDICTIONARY__ #define __JAANET__JEVTWEIGHTFACTORDICTIONARY__ #include #include "JAAnet/JEvtWeightFactorConstant.hh" #include "JAAnet/JEvtWeightFactorMupage.hh" #include "JAAnet/JEvtWeightFactorGSeaGen.hh" #include "JAAnet/JEvtWeightFactorHelper.hh" #include "JAAnet/JFluxDictionary.hh" #include "JOscProb/JOscProbHelper.hh" /** * \author bjung */ namespace JAANET {} namespace JPP { using namespace JAANET; } namespace JAANET { using JOSCPROB::JOscProbHelper; /** * Dictionary to map distinct event-weight factors to unique identifiers. * The identifiers are provided by the enum `factors`. */ class JEvtWeightFactorDictionary: public std::map { public: /** * Indices of event-weight factors in event-weight factor dictionary. */ enum factors { CUSTOM_FACTORS_BEGIN = 100, //!< Start of custom event-weight factors CONSTANT = 101, //!< Constant event-weight factor MUPAGE_TFORMULA = 102, //!< MUPAGE TFormula-based event-weight factor GSEAGEN_TFORMULA = 103, //!< gSeaGen TFormula-based event-weight factor MEFF_RATIO = 104, //!< Effective mass ratio CUSTOM_FACTORS_END = 199 //!< End of custom event-weight factors }; /** * Default constructor. * * \param oscProb oscillation probability interface */ JEvtWeightFactorDictionary(const JOscProbHelper& oscProb) { const JFluxDictionary fluxdict(oscProb); for (JFluxDictionary::const_iterator i = fluxdict.cbegin(); i != fluxdict.cend(); ++i) { (*this)[i->first] = i->second; } (*this)[CONSTANT] .reset(new JEvtWeightFactorConstant()); (*this)[MUPAGE_TFORMULA] .reset(new JEvtWeightFactorMupage()); (*this)[GSEAGEN_TFORMULA].reset(new JEvtWeightFactorGSeaGen()); } /** * Default constructor. */ JEvtWeightFactorDictionary() : JEvtWeightFactorDictionary(JOscProbHelper()) {} }; } #endif