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.
static const int JMUONBEGIN
begin range of reconstruction stages
static const int JSHOWERPOSITIONFIT
static const int AASHOWERBEGIN
begin range of reconstruction stages
static const int JSHOWEREND
end range of reconstruction stages
static const int JMUONGANDALF
static const int JMUONPREFIT
static const int JPP_RECONSTRUCTION_TYPE
KM3NeT Data Definitions v3.5.1-1-gd514d72 https://git.km3net.de/common/km3net-dataformat.
static const int AASHOWEREND
end range of reconstruction stages
static const int AANET_RECONSTRUCTION_TYPE
aanet reconstruction type
static const int JMUONENERGY
static const int JSHOWERCOMPLETEFIT
static const int JSHOWERPREFIT
static const int JMUONSIMPLEX
static const int JSHOWERBEGIN
begin range of reconstruction stages
static const int JMUONSTART
static const int JMUONEND
end range of reconstruction stages
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.