1 #ifndef __JAANET__JMULTIPARTICLEFLUX__
2 #define __JAANET__JMULTIPARTICLEFLUX__
30 public JClonable<JFlux, JMultiParticleFlux>,
50 template<
class ...Args>
55 insert(type, flux, args...);
69 map_type::insert(std::make_pair(type,
JFluxHelper(flux)));
80 template<
class ...Args>
113 return this->at(neutrino.
type).getFlux(evt);
Implementation of flux function for multiple particle types.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JMultiParticleFlux(const int type, const JFlux &flux, const Args &...args)
Constructor.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
void insert(const int type, const JFlux &flux)
Insert pair of particle code and flux function.
bool is_primary() const
Check if this is a primary particle.
double getFlux(const Evt &evt) const override
Get flux of given event.
void insert(const int type, const JFlux &flux, const Args &...args)
Insert pairs of particle codes and flux functions.
Helper class for event weighing.
Template class for object cloning.
Low-level interface for retrieving flux corresponding to an event.
int type
MC: particle type in PDG encoding.
JMultiParticleFlux()
Default constructor.
int id
offline event identifier
Exception for accessing a value in a collection that is outside of its range.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
std::map< int, JFluxHelper > map_type
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.