15#include "flux/Flux.hh"
42 double livetime_s = 0.0;
47 friend inline std::ostream&
operator<<(std::ostream& out,
const stats_t&
object)
51 out <<
object.name <<
endl;
52 out <<
"events: " <<
FIXED(9,1) <<
object.events <<
endl;
53 out <<
"range: " <<
FIXED(7,1) <<
object.range_s <<
" [s]" <<
endl;
54 out <<
"livetime: " <<
FIXED(7,1) <<
object.livetime_s <<
" [s]" <<
endl;
55 out <<
"DAQ: " <<
FIXED(7,1) <<
object.daq_s <<
" [s]" <<
endl;
56 out <<
"gap: " <<
FIXED(7,1) <<
object.gap_s <<
" [s]" <<
endl;
57 out <<
"interval: " <<
setw(7) <<
object.tin_s <<
" [s]" <<
endl;
82 while (in.hasNext()) {
84 const Evt* evt = in.next();
93 if (buffer.size() >= 2) {
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;
105 object.daq_s =
head.DAQ.livetime_s;
130 while (in.hasNext()) {
132 const Evt* evt = in.next();
141 if (buffer.size() >= 2) {
149 object.name =
"MUPAGE";
150 object.events = events *
head.DAQ.livetime_s /
head.livetime.numberOfSeconds;
151 object.range_s = (*buffer.rbegin() - *buffer.begin());
152 object.livetime_s =
head.livetime.numberOfSeconds;
153 object.daq_s =
head.DAQ.livetime_s;
155 object.tin_s =
head.time_interval.t2 -
head.time_interval.t1;
178 while (in.hasNext()) {
180 const Evt* evt = in.next();
191 if (buffer.size() >= 2) {
199 object.name =
"gSeaGen";
200 object.events = events *
head.DAQ.livetime_s;
201 object.range_s = (*buffer.rbegin() - *buffer.begin());
202 object.livetime_s = 0.0;
203 object.daq_s =
head.DAQ.livetime_s;
205 object.tin_s =
head.time_interval.t2 -
head.time_interval.t1;
228 while (in.hasNext()) {
230 const Evt* evt = in.next();
239 if (buffer.size() >= 2) {
247 object.name =
"noise";
248 object.events = events *
head.DAQ.livetime_s /
head.K40.livetime_s;
249 object.range_s = (*buffer.rbegin() - *buffer.begin()) *
getFrameTime() * 1.0e-9;
250 object.livetime_s =
head.K40.livetime_s;
251 object.daq_s =
head.DAQ.livetime_s;
299 JLimit_t& numberOfEvents = inputFile.getLimit();
304 JParser<> zap(
"Example program to analyse track fit results from Evt formatted data.");
312 catch(
const exception& error) {
322 cout <<
setw(132) << left << inputFile << right <<
' '
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.
Interface of object iteration for a single data type.
Template definition of a multi-dimensional oscillation probability interpolation table.
bool is_gseagen(const JHead &header)
Check for generator.
bool is_mupage(const JHead &header)
Check for generator.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
std::ostream & operator<<(std::ostream &out, const morphology_type &object)
Write morphology to output stream.
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.
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.
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.
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.