Auxiliary program to print fit results;.
156{
160
162 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
163
164 JParallelFileScanner_t inputFile;
167 size_t numberOfFits;
169 set <string> option;
171
172 try {
173
174 JParser<> zap(
"Auxiliary program to print fit results.");
175
183
184 zap(argc, argv);
185 }
186 catch(const exception& error) {
187 FATAL(error.what() << endl);
188 }
189
190
191 const int WIDTH = 16;
192
194
196
197 try {
199 } catch(const exception& error) {}
200
201
202 while (inputFile.hasNext()) {
203
204 cout << "event: " << setw(10) << inputFile.getCounter() << endl;
205
206 multi_pointer_type ps = inputFile.next();
207
210
213 }
214
216
217 cout <<
"trigger: " << setw(10) << tev->
getCounter() <<
' '
219
220 if (mc.getEntries() != 0) {
221
223
224 if (event != NULL) {
225
227
228 if (option.count(MONTECARLO) != 0) {
229
231
233
235
236 cout <<
LEFT(
WIDTH) <<
"neutrino" << right <<
' ' << ta << endl;
237 }
238
239
240 for (vector<Trk>::const_iterator i = event->mc_trks.begin(); i != event->mc_trks.end(); ++i) {
241
243
245
248 is_hadron (*i) ?
"hadron" :
"other") << right <<
' ' << ta << endl;
249 }
250 }
251 }
252 }
253
254 cout << "number of fits " << setw(4) << right << evt->size() << endl;
255
256 for (size_t i = 0; i != min(evt->size(), numberOfFits); ++i) {
257
258 const JFit& fit = (*evt)[i];
259
261
263
264 cout <<
LEFT(
WIDTH) <<
"fit" << right <<
' '
265 << tb << ' '
266 <<
FIXED(7,2) << fit.getQ() <<
' '
267 << setw(2) << fit.getHistory().size() << '/' << fit.getStatus();
268
269 for (const auto& key : keys) {
271 }
272
273 cout << endl;
274
275 for (size_t row = 0; row != fit.getDimensionOfErrorMatrix(); ++row) {
276 for (size_t col = 0; col <= row; ++col) {
277 cout <<
' ' <<
SCIENTIFIC(12,3) << fit.getV(row,col);
278 }
279 cout << endl;
280 }
281
282 if (option.count(HISTORY) != 0) {
283 cout << fit.getHistory() << endl;
284 }
285 }
286 }
287}
#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.
double getWeight(T __begin, T __end)
Get total weight of data points.
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).
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.