1 #ifndef __JAANET__JEVTWEIGHTFACTORMULTIPARTICLE__ 
    2 #define __JAANET__JEVTWEIGHTFACTORMULTIPARTICLE__ 
   37   template<
class JEvtWeightFactor_t>
 
   39     public JClonable<JEvtWeightFactor_t, JEvtWeightFactorMultiParticle<JEvtWeightFactor_t> >,
 
   40     public std::map<int, JEvtWeightFactorHelper<JEvtWeightFactor_t> >
 
   64                                   const JEvtWeightFactor_t& factor) :
 
   67       if (!header.
flux.empty()) {
 
   69         for (vector<JAANET::flux>::const_iterator i = header.
flux.cbegin(); i != header.
flux.cend(); ++i) {
 
   75         THROW(
JValueOutOfRange, 
"JEvtWeightFactorMultiParticle::JEvtWeightFactorMultiParticle(): Empty flux header-field.");
 
   87     template<
class ...Args>
 
   89                                   const JEvtWeightFactor_t& factor,
 
   90                                   const Args&            ...
args) :
 
   93       insert(type, factor, args...);
 
  104                 const JEvtWeightFactor_t& factor)
 
  117     template<
class ...Args>
 
  119                 const JEvtWeightFactor_t& factor,
 
  150         return this->at(neutrino.
type).getFactor(evt);
 
  154         THROW(
JValueOutOfRange, 
"JEvtWeightFactorMultiParticle::getFactor(): No primary track found for event " << evt.
id << 
".");
 
void insert(const int type, const JEvtWeightFactor_t &factor)
Insert pair of particle code and event-weight factor. 
 
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member. 
 
std::vector< JAANET::flux > flux
 
JEvtWeightFactorMultiParticle(const int type, const JEvtWeightFactor_t &factor, const Args &...args)
Constructor. 
 
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino. 
 
virtual double getFactor(const Evt &evt) const override
Get weight factor of given event. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
JEvtWeightFactorMultiParticle< JFlux > JFluxMultiParticle
Type-definition of multi-particle event-weight factor for fluxes. 
 
bool is_primary() const 
Check if this is a primary particle. 
 
JEvtWeightFactorMultiParticle()
Default constructor. 
 
Implementation of event-weight factor for multiple particle types. 
 
std::map< int, JEvtWeightFactorHelper_t > map_type
 
Template class for object cloning. 
 
Helper class for event-weight factor. 
 
JEvtWeightFactorMultiParticle(const JHead &header, const JEvtWeightFactor_t &factor)
Constructor. 
 
int type
MC: particle type in PDG encoding. 
 
void insert(const int type, const JEvtWeightFactor_t &factor, const Args &...args)
Insert pairs of particle codes and event-weight factors. 
 
JEvtWeightFactorHelper< JEvtWeightFactor_t > JEvtWeightFactorHelper_t
 
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. 
 
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.