1#ifndef __JRECONSTRUCTION__JEVTSUPPORTKIT__
2#define __JRECONSTRUCTION__JEVTSUPPORTKIT__
35 inline void copy(
const JFIT::JEvt::const_iterator __begin,
36 const JFIT::JEvt::const_iterator __end,
44 inline int get_index(
const JUUID& element)
const
46 const_iterator i = this->find(element);
49 return std::distance(this->begin(), i);
55 for (JFIT::JEvt::const_iterator fit = __begin; fit != __end; ++fit) {
56 uuid.insert(fit->getUUID());
59 for (JFIT::JEvt::const_iterator fit = __begin; fit != __end; ++fit) {
63 trk.
id = uuid.get_index(fit->getUUID());
64 trk.
pos =
Vec(fit->getX(), fit->getY(), fit->getZ());
65 trk.
dir =
Vec(fit->getDX(), fit->getDY(), fit->getDZ());
68 trk.
lik = fit->getQ();
72 if (fit->hasParentUUID()) {
73 trk.
mother_id = uuid.get_index(fit->getParentUUID());
76 for (JHistory::const_iterator i = fit->getHistory().begin(); i != fit->getHistory().end(); ++i) {
80 for (
int i = 0; i != fit->getN(); ++i) {
81 trk.
fitinf.push_back(fit->getW(i));
86 out.
trks.push_back(trk);
Definition for fit results.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void copy(const JFIT::JEvt::const_iterator __begin, const JFIT::JEvt::const_iterator __end, Evt &out)
Copy tracks.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
std::vector< double > error_matrix
(NxN) error covariance matrix for fit parameters (stored as linear vector)
std::vector< double > fitinf
place to store additional fit info, see km3net-dataformat/definitions/fitparameters....
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
double E
Energy [GeV] (either MC truth or reconstructed)
double t
track time [ns] (when the particle is at pos )
int rec_type
identifier of the fitting algorithm/chain/strategy, see km3net-dataformat/definitions/reconstruction....
int mother_id
MC id of the parent particle.
double lik
likelihood or lambda value (for aafit, lambda)
Vec pos
postion [m] of the track at time t
The Vec class is a straightforward 3-d vector, which also works in pyroot.
static const int TRK_ST_FINALSTATE
for MC: the particle must be processed by detector simulation ('track_in' tag in evt files)....
static const int TRK_ST_UNDEFINED
status was not defined for this MC track (all reco tracks have this value)