Auxiliary program to print fit results;.
93{
97
99 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
100
101 JParallelFileScanner_t inputFile;
104 size_t numberOfFits;
106 set <string> option;
108
109 try {
110
111 JParser<> zap(
"Auxiliary program to print fit results.");
112
120
121 zap(argc, argv);
122 }
123 catch(const exception& error) {
124 FATAL(error.what() << endl);
125 }
126
127
128 const int WIDTH = 16;
129
131
133
134 try {
136 } catch(const exception& error) {}
137
138
139 while (inputFile.hasNext()) {
140
141 cout << "event: " << setw(10) << inputFile.getCounter() << endl;
142
143 multi_pointer_type ps = inputFile.next();
144
147
150 }
151
153
154 cout <<
"trigger: " << setw(10) << tev->
getCounter() <<
' '
156
157 if (mc.getEntries() != 0) {
158
160
161 if (event != NULL) {
162
164
165 if (option.count(MONTECARLO) != 0) {
166
168
170
172
173 cout <<
LEFT(
WIDTH) <<
"neutrino" << right <<
' ' << ta << endl;
174 }
175
176
177 for (vector<Trk>::const_iterator i = event->mc_trks.begin(); i != event->mc_trks.end(); ++i) {
178
180
182
185 is_hadron (*i) ?
"hadron" :
"other") << right <<
' ' << ta << endl;
186 }
187 }
188 }
189 }
190
191 cout << "number of fits " << setw(4) << right << evt->size() << endl;
192
193 for (size_t i = 0; i != min(evt->size(), numberOfFits); ++i) {
194
195 const JFit& fit = (*evt)[i];
196
198
200
201 cout <<
LEFT(
WIDTH) <<
"fit" << right <<
' '
202 << tb << ' '
203 <<
FIXED(7,2) << fit.getQ() <<
' '
204 << setw(2) << fit.getHistory().size() << '/' << fit.getStatus();
205
206 for (const auto& key : keys) {
208 }
209
210 cout << endl;
211
212 for (size_t row = 0; row != fit.getDimensionOfErrorMatrix(); ++row) {
213 for (size_t col = 0; col <= row; ++col) {
214 cout <<
' ' <<
SCIENTIFIC(12,3) << fit.getV(row,col);
215 }
216 cout << endl;
217 }
218
219 if (option.count(HISTORY) != 0) {
220 cout << fit.getHistory() << endl;
221 }
222 }
223 }
224}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
General purpose class for parallel reading of objects from a single file or multiple files.
Template definition for direct access of elements in ROOT TChain.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
JTriggerCounter_t getCounter() const
Get trigger counter.
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
double putTime() const
Get Monte Carlo time minus DAQ/trigger time.
JTrack3E getTrack(const Trk &track)
Get track.
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Vec getOffset(const JHead &header)
Get offset.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.
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.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JRECONSTRUCTION::JWeight getWeight
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Auxiliary data structure for floating point format specification.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
General purpose sorter of fit results.
Auxiliary class for defining the range of iterations of objects.
const JLimit & getLimit() const
Get limit.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for floating point format specification.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Auxiliary data structure for alignment of data.
Reconstruction type dependent comparison of track quality.