Auxiliary program to print fit results;.
88 using namespace KM3NETDAQ;
90 typedef JParallelFileScanner< JTypeList<JDAQEvent, JEvt> > JParallelFileScanner_t;
91 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
93 JParallelFileScanner_t inputFile;
95 JQualitySorter quality_sorter;
101 JParser<> zap(
"Auxiliary program to print fit results.");
104 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
111 catch(
const exception& error) {
112 FATAL(error.what() << endl);
117 const int WIDTH = 16;
119 JTreeScanner<Evt> mc(inputFile);
121 JPosition3D center(0,0,0);
124 center = get<JPosition3D>(
getHeader(inputFile));
125 }
catch(
const exception& error) {}
128 while (inputFile.hasNext()) {
130 cout <<
"event: " << setw(10) << inputFile.getCounter() << endl;
132 multi_pointer_type ps = inputFile.next();
137 if (quality_sorter.is_valid()) {
138 sort(evt->begin(), evt->end(), quality_sorter);
141 JTimeConverter converter;
144 if (mc.getEntries() != 0) {
150 converter = JTimeConverter(*
event, *tev);
158 cout <<
LEFT(
WIDTH) <<
"neutrino" <<
' ' << ta << endl;
163 if (track !=
event->mc_trks.end()) {
169 cout <<
LEFT(
WIDTH) <<
"muon" <<
' ' << ta << endl;
174 cout <<
"number of fits " << setw(4) << right << evt->size() << endl;
176 for (
size_t i = 0; i != min(evt->size(), numberOfFits); ++i) {
178 const JFit& fit = (*evt)[i];
182 tb.sub(converter.putTime());
184 cout <<
LEFT(
WIDTH) <<
"fit" <<
' ' << tb <<
' ' << fit.getQ() << endl;
185 cout << fit.getHistory() << endl;
Auxiliary data structure for alignment of data.
Utility class to parse command line options.
JTrack3E getTrack(const Trk &track)
Get track.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
Empty structure for specification of parser element that is initialised (i.e.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
JLimit JLimit_t
Type definition of limit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const JLimit & getLimit() const
Get limit.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
JTriggerCounter_t getCounter() const
Get trigger counter.