15#include "flux/Flux.hh"
31 const Flux_Atmospheric conventional;
42 double livetime_s = 0.0;
46 friend inline std::ostream&
operator<<(std::ostream& out,
const stats_t&
object)
50 out <<
object.name << endl;
51 out <<
"events: " <<
FIXED(9,1) <<
object.events << endl;
52 out <<
"range: " <<
FIXED(7,1) <<
object.range_s <<
" [s]" << endl;
53 out <<
"livetime: " <<
FIXED(7,1) <<
object.livetime_s <<
" [s]" << endl;
54 out <<
"DAQ: " <<
FIXED(7,1) <<
object.daq_s <<
" [s]" << endl;
55 out <<
"gap: " <<
FIXED(7,1) <<
object.gap_s <<
" [s]" << endl;
89 if (buffer.size() < 2) {
90 FATAL(
"Insufficient events " << buffer.size() << endl);
101 object.name =
"data";
102 object.events = events;
103 object.range_s = (*buffer.rbegin() - *buffer.begin()) *
getFrameTime() * 1.0e-9;
104 object.livetime_s = buffer.size() *
getFrameTime() * 1.0e-9;
138 if (buffer.size() < 2) {
139 FATAL(
"Insufficient events " << buffer.size() << endl);
150 object.name =
"MUPAGE";
152 object.range_s = (*buffer.rbegin() - *buffer.begin());
189 if (buffer.size() < 2) {
190 FATAL(
"Insufficient events " << buffer.size() << endl);
201 object.name =
"gSeaGen";
203 object.range_s = (*buffer.rbegin() - *buffer.begin());
204 object.livetime_s = 0.0;
238 if (buffer.size() < 2) {
239 FATAL(
"Insufficient events " << buffer.size() << endl);
250 object.name =
"noise";
252 object.range_s = (*buffer.rbegin() - *buffer.begin()) *
getFrameTime() * 1.0e-9;
278 return getStatsFromMUPAGE (head, in);
280 return getStatsFromGSEAGEN(head, in);
282 return getStatsFromK40 (head, in);
284 return getStatsFromData (head, in);
301 JLimit_t& numberOfEvents = inputFile.getLimit();
306 JParser<> zap(
"Example program to analyse track fit results from Evt formatted data.");
314 catch(
const exception& error) {
315 FATAL(error.what() << endl);
320 const stats_t stats = getStats(head, inputFile);
322 DEBUG(inputFile << endl << head << endl << stats << endl);
324 cout << setw(132) << left << inputFile << right <<
' '
325 <<
FIXED(9,1) << stats.events <<
' '
326 <<
FIXED(7,1) << stats.range_s <<
' '
327 <<
FIXED(7,1) << stats.livetime_s <<
' '
328 <<
FIXED(7,1) << stats.daq_s <<
' '
329 <<
FIXED(7,1) << stats.gap_s << endl;
int main(int argc, char **argv)
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Scanning of objects from a single file according a format that follows from the extension of each fil...
ROOT TTree parameter settings of various packages.
JAANET::livetime livetime
JAANET::calibration calibration
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
Interface of object iteration for a single data type.
virtual bool hasNext()=0
Check availability of next element.
virtual const pointer_type & next()=0
Get next element.
Utility class to parse command line options.
Object reading from a list of files.
bool is_mupage(const JHead &header)
Check for generator.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
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.
double getFrameTime()
Get frame time duration.
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions)
int frame_index
from the raw data
TTimeStamp mc_event_time
MC: true generation time (UTC) of the event, (default: 01 Jan 1970 00:00:00)
Auxiliary data structure for floating point format specification.
double livetime_s
Live time [s].
double livetime_s
Live time [s].
std::string buffer
General purpose name.
static const std::string statical()
double numberOfSeconds
Live time [s].
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int type
MC: particle type in PDG encoding.
double E
Energy [GeV] (either MC truth or reconstructed)
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr].
static const int WEIGHTLIST_NORMALISATION
Event rate normalisation.