1 #ifndef __JAANET__JEVTWEIGHTFACTORHELPER__
2 #define __JAANET__JEVTWEIGHTFACTORHELPER__
18 namespace JPP {
using namespace JAANET; }
31 template<
class JEvtWeightFactor_t>
67 JEvtWeightFactor_t* p =
dynamic_cast<JEvtWeightFactor_t*
>(factor.clone());
72 THROW(JNullPointerException,
"JEvtWeightFactorHelper::configure(): Invalid downcast to class derived from JEvtWeightFactor.");
90 THROW(JNullPointerException,
"JEvtWeightFactorHelper::getFactor(): Unspecified event-weighting factor.");
138 THROW(JNullPointerException,
"JEvtWeightFactorHelper<JDiffuseFlux>::configure(): Invalid downcast from JEvtWeightFactor to JDiffuseFlux.");
153 const double costh)
const
158 return get()->
getFactor(type, log10E, costh);
160 THROW(JNullPointerException,
"JEvtWeightFactorHelper<JDiffuseFlux>::dNdEdOmega(): Unspecified diffuse flux function.");
178 THROW(JNullPointerException,
"JEvtWeightFactorHelper<JDiffuseFlux>::getFactor(): Unspecified diffuse flux function.");
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.
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.