1#ifndef __JAANET__JEVTWEIGHTFACTORFUNCTION__
2#define __JAANET__JEVTWEIGHTFACTORFUNCTION__
32 template<
class JFunction_t,
33 class JEvtWeightFactor_t>
35 public JClonable<JEvtWeightFactor_t, JEvtWeightFactorFunction<JFunction_t,
74 template<
class JDiffuseFluxFunction_t>
76 public JClonable<JDiffuseFlux, JEvtWeightFactorFunction<JDiffuseFluxFunction_t,
102 double costh)
const override final
104 return function.dNdEdOmega(type, log10E, costh);
118 public JClonable<JDiffuseFlux, JEvtWeightFactorFunction<Flux_Atmospheric, JDiffuseFlux> >
133 double costh)
const override final
135 return flux.dNdEdOmega(type, log10E, costh);
177 (*this)[JEvtWeightFactor::getTypeKey()] =
"atmospheric neutrino flux";
181 static const Flux_Atmospheric
flux;
205 template<
class JEvtWeightFactor_t>
207 public JClonable<JEvtWeightFactor_t, JEvtWeightFactorFunction<pEvtWeightFactor,
208 JEvtWeightFactor_t> >
228 return (*pFunction)(evt);
246 public JClonable<JDiffuseFlux, JEvtWeightFactorFunction<pDiffuseFlux,
269 double costh)
const override final
271 return (*pFunction)(type, log10E, costh);
287 template<
class JFunction_t,
class JEvtWeightFactor_t = JEvtWeightFactor>
299 template<
class JEvtWeightFactor_t = JEvtWeightFactor>
311 template<
class JFunction_t>
334 template<
class JFunction_t>
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Extensions to Evt data format.
JEvtWeightFactorFunction< JFunction_t, JDiffuseFlux > make_diffuseFluxFunction(const JFunction_t &flux)
Auxiliary method for creating an interface to a diffuse flux function.
JEvtWeightFactorFunction< JFunction_t, JFlux > make_fluxFunction(const JFunction_t &flux)
Auxiliary method for creating an interface to a flux function.
double(* pDiffuseFlux)(int, double, double)
Type definition of pointer to diffuse flux function.
pEvtWeightFactor pFlux
Type definition of flux function pointer.
double(* pEvtWeightFactor)(const Evt &)
Type definition of event-weight factor pointer.
JEvtWeightFactorFunction< JFunction_t, JEvtWeightFactor_t > make_weightFactor(const JFunction_t &function)
Auxiliary method for creating an interface to an event-weight factor.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Low-level interface for diffuse fluxes.
Auxiliary class for I/O of atmospheric neutrino flux function.
JFluxFunctionHelper(const JEquationParameters &eqpars)
Constructor.
Specialisation of event-weight factor interface for atmospheric neutrino flux.
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
Get properties of this class.
static const Flux_Atmospheric flux
atmospheric flux function
double dNdEdOmega(int type, double log10E, double costh) const override final
Get event-weight factor for given particle PDG-identifier, energy and zenith-angle.
JEvtWeightFactorFunction< Flux_Atmospheric, JDiffuseFlux > JEvtWeightFactorFunction_t
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const override final
Get properties of this class.
JEvtWeightFactorFunction(const JDiffuseFluxFunction_t &function)
Constructor.
double dNdEdOmega(int type, double log10E, double costh) const override final
Get event-weight factor for given particle PDG-identifier, energy and zenith-angle.
JDiffuseFluxFunction_t function
diffuse flux function object
JEvtWeightFactorFunction< JDiffuseFluxFunction_t, JDiffuseFlux > JEvtWeightFactorFunction_t
JEvtWeightFactorFunction(pDiffuseFlux pFunction)
Constructor.
pDiffuseFlux pFunction
Pointer to diffuse flux function.
double dNdEdOmega(int type, double log10E, double costh) const override final
Get event-weight factor for given particle PDG-identifier, energy and zenith-angle.
JEvtWeightFactorFunction(pEvtWeightFactor pFunction)
Constructor.
pEvtWeightFactor pFunction
Event-weight factor pointer.
double getFactor(const Evt &evt) const override final
Get weight-factor for given event.
Implementation of event-weight factor interface.
JEvtWeightFactorFunction< JFunction_t, JEvtWeightFactor_t > JEvtWeightFactorFunction_t
double getFactor(const Evt &evt) const override final
Get weight-factor for given event.
JEvtWeightFactorFunction(const JFunction_t &function)
Constructor.
JFunction_t function
event-weight factor object.
static JEquationParameters & getEquationParameters()
Get equation parameters.
Template class for object cloning.