1 #ifndef __JAANET__JEVTWEIGHTFACTORHELPER__
2 #define __JAANET__JEVTWEIGHTFACTORHELPER__
29 template<
class JEvtWeightFactor_t>
63 JEvtWeightFactor_t* p =
dynamic_cast<JEvtWeightFactor_t*
>(factor.clone());
130 THROW(
JNullPointerException,
"JEvtWeightFactorHelper<JDiffuseFlux>::configure(): Invalid downcast from JEvtWeightFactor to JDiffuseFlux.");
145 const double costh)
const
148 return get()->
getFactor(type, log10E, costh);
JEvtWeightFactorHelper()
Default constructor.
JEvtWeightFactorHelper< JDiffuseFlux > JDiffuseFluxHelper
Type definition of event-weight factor helper for diffuse flux objects.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool is_valid() const
Check validity of pointer.
virtual clone_type clone() const override
Get clone of this object.
double getFactor(const Evt &evt) const
Get weight-factor of given event.
void configure(const JDiffuseFlux &diffuseFlux)
Configure oscillation probability function.
The template JSharedPointer class can be used to share a pointer to an object.
Exception for null pointer operation.
JEvtWeightFactorHelper< JFlux > JFluxHelper
Type definition of event-weight factor helper for flux functions.
Explicit emplate specialization of event-weight factor helper for diffuse flux objects.
Helper class for event-weight factor.
Low-level interface for diffuse fluxes.
void configure(const JEvtWeightFactor_t &factor)
Configure event-weight factor.
double getFactor(const Evt &evt) const
Get diffuse flux corresponding to given neutrino type, energy and zenith angle.
JEvtWeightFactorHelper(const JEvtWeightFactor_t &factor)
Constructor.
JEvtWeightFactorHelper()
Default constructor.
double getFactor(const int type, const double log10E, const double costh) const
Get diffuse flux corresponding to given neutrino type, energy and zenith angle.
virtual void reset() override
Reset pointer.
JEvtWeightFactorHelper(const JDiffuseFlux &diffuseFlux)
Constructor.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.