Auxiliary program to print fit results;.
159 using namespace KM3NETDAQ;
162 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
164 JParallelFileScanner_t inputFile;
174 JParser<> zap(
"Auxiliary program to print fit results.");
177 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
186 catch(
const exception& error) {
187 FATAL(error.what() << endl);
192 const int WIDTH = 16;
199 center = get<JPosition3D>(
getHeader(inputFile));
200 }
catch(
const exception& error) {}
203 while (inputFile.hasNext()) {
205 cout <<
"event: " << setw(10) << inputFile.getCounter() << endl;
207 multi_pointer_type ps = inputFile.next();
218 cout <<
"trigger: " << setw(10) << tev->
getCounter() <<
' '
221 if (mc.getEntries() != 0) {
229 if (option.count(MONTECARLO) != 0) {
237 cout <<
LEFT(
WIDTH) <<
"neutrino" << right <<
' ' << ta << endl;
249 is_hadron (*i) ?
"hadron" :
"other") << right <<
' ' << ta << endl;
255 cout <<
"number of fits " << setw(4) << right << evt->size() << endl;
257 for (
size_t i = 0; i != min(evt->size(), numberOfFits); ++i) {
259 const JFit& fit = (*evt)[i];
265 cout <<
LEFT(
WIDTH) <<
"fit" << right <<
' '
267 <<
FIXED(7,2) << fit.getQ() <<
' '
268 << setw(2) << fit.getHistory().size() <<
'/' << fit.getStatus();
270 for (
const auto& key : keys) {
276 for (
size_t row = 0; row != fit.getDimensionOfErrorMatrix(); ++row) {
277 for (
size_t col = 0; col <= row; ++col) {
278 cout <<
' ' <<
SCIENTIFIC(12,3) << fit.getV(row,col);
283 if (option.count(HISTORY) != 0) {
284 cout << fit.getHistory() << endl;
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
Auxiliary data structure for alignment of data.
Utility class to parse command line options.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
double getWeight(T __begin, T __end)
Get total weight of data points.
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.
General purpose sorter of fit results.
General purpose class for parallel reading of objects from a single file or multiple files...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
Auxiliary data structure for floating point format specification.
#define MAKE_STRING(A)
Make string.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double putTime() const
Get Monte Carlo time minus DAQ/trigger time.
Reconstruction type dependent comparison of track quality.
Data structure for position in three dimensions.
const JLimit & getLimit() const
Get limit.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.
Auxiliary data structure for floating point format specification.
JTriggerCounter_t getCounter() const
Get trigger counter.
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.