1#ifndef __JAANET__JEVTWEIGHTFACTORMUPAGE__
2#define __JAANET__JEVTWEIGHTFACTORMUPAGE__
41 public JClonable<JEvtWeightFactorTFormula, JEvtWeightFactorMupage>
71 const int N = this->GetNdim();
90 for (vector<Trk>::const_iterator i = evt.mc_trks.cbegin(); i != evt.mc_trks.cend(); ++i) {
97 THROW(
JValueOutOfRange,
"JEvtWeightFactorMupage::operator(): No muon for event " << evt.id <<
'.' << endl);
105 for (vector<JTrack3E>::const_iterator i = muons.begin(); i != muons.end(); ++i) {
107 dir += i->getDirection();
117 vector<Trk>::const_iterator iBundle = find_if(evt.mc_trks.cbegin(), evt.mc_trks.cend(),
131 return this->EvalPar(&vars[0]);
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Data structure for circle in two dimensions.
double getRadius() const
Get radius.
Data structure for direction in three dimensions.
Data structure for vector in three dimensions.
double getDZ() const
Get z direction.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
JTrack3E getTrack(const Trk &track)
Get track.
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
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.
Implementation of reweighting factor for mupage events according to a specifiable ROOT TFormula.
JEvtWeightFactorMupage()
Default constructor.
double getFactor(const Evt &evt) const override final
Get weighting factor for given event.
variables
Indices of reweighting variables for MUPAGE.
@ TOTAL_MUON_ENERGY
Muon bundle total energy [GeV].
@ LATERAL_SPREAD
Muon bundle lateral spread [m].
@ MEAN_ZENITH_ANGLE
Average cosine of zenith angle.
@ NUMBER_OF_VARIABLES
Number of reweighting variables; N.B. This enum value needs to be specified last!
@ MUON_MULTIPLICITY
Muon multiplicity
bool is_valid() const override final
Check whether this formula is valid.
Template class for object cloning.
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
static const int TRK_ST_MUONBUNDLE
initial state muon bundle (mupage)