1 #ifndef __TOOLS_RECONSTRUCTION__
2 #define __TOOLS_RECONSTRUCTION__
7 #include "../offline/Hit.hh"
8 #include "../offline/Vec.hh"
9 #include "../offline/Trk.hh"
10 #include "../offline/Evt.hh"
11 #include "../offline/Exception.hh"
12 #include "../definitions/reconstruction.hh"
32 upper(std::numeric_limits<int>::max())
84 template<
int reconstruction_type>
98 return first.
lik > second.
lik;
278 template<
class JTrackSelector_t>
281 return std::find_if(evt.
trks.begin(), evt.
trks.end(), selector) != evt.
trks.end();
292 template<
int reconstruction_type>
347 template<
class JTrackSelector_t,
class JQualitySorter_t>
349 JTrackSelector_t selector,
350 JQualitySorter_t comparator)
355 if (selector(*i) && comparator(*i, *p)) {
360 if (p != evt.
trks.end())
363 THROW(
Exception,
"This event has no reconstructed track with given selector.");
374 template<
int reconstruction_type>
static const int JMUONSTART
const int type
reconstruction type
static const int JSHOWEREND
end range of reconstruction stages
static const int AANET_RECONSTRUCTION_TYPE
aanet reconstruction type
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
static const int JMUONBEGIN
begin range of reconstruction stages
Range of reconstruction stages.
bool operator()(const int stage) const
Test if given reconstruction stage is within range.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
static const int JSHOWERPOSITIONFIT
static const int JSHOWERPREFIT
static const int JMUONPREFIT
static const int JMUONGANDALF
has_history(const int type, const rec_stages_range range)
Constructor.
rec_stages_range(const int lower, const int upper)
Constructor.
Reconstruction type dependent comparison of track quality.
static const int JSHOWERCOMPLETEFIT
rec_stages_range()
Defaut constructor.
static const int JSHOWERBEGIN
begin range of reconstruction stages
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
static const int JMUONSIMPLEX
bool operator()(const Trk &first, const Trk &second) const
The default comparison is based on:number of reconstruction stages, i.e.
double lik
likelihood or lambda value (for aafit, lambda)
static const int JPP_RECONSTRUCTION_TYPE
KM3NeT Data Definitions v1.2.3-3-g5bd09ee https://git.km3net.de/common/km3net-dataformat.
rec_stages_range(const int stage)
Constructor.
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
bool operator()(const Trk &track) const
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
const JFit & get_best_reconstructed_track(const JEvt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.
const rec_stages_range range
range of application types
Auxiliary class to test whether given track has specified history.
static const int JMUONENERGY
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
static const int JMUONEND
end range of reconstruction stages
int rec_type
identifyer for the overall fitting algorithm/chain/strategy