#include <iostream>
#include <iomanip>
#include <algorithm>
#include <iterator>
#include "JFit/JFitApplications.hh"
#include "JFit/JEvt.hh"
#include "JFit/JEvtToolkit.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test application history.
- Author
- mdejong
Definition in file JHistory.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 21 of file JHistory.cc.
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) {
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) {
bool has_muon_energy(const Trk &track)
Test whether given track has muon energy fit in history.
bool has_reconstructed_track(const Evt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
static const int JMUONSTART
static const int JMUONPREFIT
#define ASSERT(A,...)
Assert macro.
bool qualitySorter(const JFIT::JFit &first, const JFIT::JFit &second)
Comparison of fit results.
bool has_muon_gandalf(const Trk &track)
Test whether given track has muon gandalf fit in history.
Utility class to parse command line options.
Data structure for set of track fit results.
void copy(const Head &from, JHead &to)
Copy header from from to to.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const int JMUONSIMPLEX
const Trk & get_best_reconstructed_muon(const Evt &evt)
Get best reconstructed muon.
static const int JMUONGANDALF
Auxiliary class to test history.
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction.
bool has_muon_start(const Trk &track)
Test whether given track has muon start fit in history.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
bool has_reconstructed_muon(const Evt &evt)
Test whether given event has a track with muon reconstruction.
#define DEBUG(A)
Message macros.
bool has_muon_prefit(const Trk &track)
Test whether given track has muon prefit in history.
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.
Container for historical events.
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history.
Data structure for track fit results.