1#ifndef __TOOLS_RECONSTRUCTION__
2#define __TOOLS_RECONSTRUCTION__
32 upper(
std::numeric_limits<int>::max())
84template<
int reconstruction_type>
98 return first.
lik > second.
lik;
278template<
class JTrackSelector_t>
281 return std::find_if(evt.
trks.begin(), evt.
trks.end(), selector) != evt.
trks.end();
292template<
int reconstruction_type>
295 return ::has_reconstructed_track(evt,
::has_history(reconstruction_type, range));
347template<
class JTrackSelector_t,
class JQualitySorter_t>
349 JTrackSelector_t selector,
350 JQualitySorter_t comparator)
352 std::vector<Trk>::const_iterator p = std::find_if(evt.
trks.begin(), evt.
trks.end(), selector);
354 for (std::vector<Trk>::const_iterator i = p; i != evt.
trks.end(); ++i) {
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.");
374template<
int reconstruction_type>
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
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.
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
int rec_type
identifier of the fitting algorithm/chain/strategy, see km3net-dataformat/definitions/reconstruction....
double lik
likelihood or lambda value (for aafit, lambda)
Auxiliary class to test whether given track has specified history.
const int type
reconstruction type
has_history(const int type, const rec_stages_range range)
Constructor.
const rec_stages_range range
range of application types
bool operator()(const Trk &track) const
Reconstruction type dependent comparison of track quality.
bool operator()(const Trk &first, const Trk &second) const
The default comparison is based on:
Range of reconstruction stages.
rec_stages_range(const int lower, const int upper)
Constructor.
bool operator()(const int stage) const
Test if given reconstruction stage is within range.
rec_stages_range()
Defaut constructor.
rec_stages_range(const int stage)
Constructor.