30 JParser<> zap(
"Example program to test application history.");
36 catch(
const exception &error) {
37 FATAL(error.what() << endl);
41 const int numberOfFits = 3;
47 for (
int i = 0; i != numberOfFits; ++i) {
58 for (
int i = 0; i !=
sizeof(application)/
sizeof(
int); ++i) {
64 copy(evt.begin(), evt.end(), back_inserter(out));
68 partial_sort(evt.begin(), evt.end(), evt.end(),
qualitySorter);
72 JEvt::const_iterator __end = partition(evt.begin(), evt.end(), JHistory::is_event(evt.begin()->getHistory()));
74 for (JEvt::const_iterator fit = evt.begin(); fit != __end; ++fit) {
75 out.push_back(
getFit(JHistory(fit->getHistory()).add(application[i]), JTrack3D(), 0, 0.0));
87 for (
size_t i = 0; i != evt.size(); ++i) {
88 DEBUG(
"fit[" << i <<
"]" << endl << static_cast<const JHistory&>(evt[i]) << endl);
91 ASSERT((
int) evt.size() == numberOfFits * (
sizeof(application)/
sizeof(
int) + 1));
93 for (
int i = 0; i != numberOfFits; ++i) {
Utility class to parse command line options.
bool has_muon_prefit(const Trk &track)
Test whether given track has muon prefit in history.
bool has_reconstructed_track(const Evt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=0)
Get fit.
bool has_reconstructed_muon(const Evt &evt)
Test whether given event has a track with muon reconstruction.
bool has_muon_start(const Trk &track)
Test whether given track has muon start fit in history.
#define ASSERT(A)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
bool has_muon_gandalf(const Trk &track)
Test whether given track has muon gandalf fit in history.
const Trk & get_best_reconstructed_muon(const Evt &evt)
Get best reconstructed muon.
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history.
bool has_muon_energy(const Trk &track)
Test whether given track has muon energy fit in history.
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction.
bool qualitySorter(const JFIT::JFit &first, const JFIT::JFit &second)
Comparison of fit results.
void copy(const Head &from, JHead &to)
Copy header from from to to.
#define DEBUG(A)
Message macros.