40{
44
46 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
47
49 JLimit_t& numberOfEvents = inputFile.getLimit();
52 size_t numberOfPrefits;
55 bool logx;
58
59 try {
60
61 JParser<> zap(
"Example program to histogram fit results.");
62
73
75 }
76 catch(const exception& error) {
78 }
79
80
82
83 try {
85 }
88 }
89
92
93 const double Xmax = E_GeV.is_valid() ? volume.getX(E_GeV.getMaximum()) : volume.getXmax();
94 const double Xmin = E_GeV.is_valid() ? volume.getX(E_GeV.getMinimum()) : volume.getXmin();
95
97
100
103
105
106 try {
108 }
111 }
112
114
120
121 while (inputFile.hasNext()) {
122
124
125 multi_pointer_type ps = inputFile.next();
126
127
130
132
134 const double X = volume.getX(neutrino.
E);
135
137
138 if (!evt->empty()) {
139
140 JEvt::iterator __end = evt->end();
141
142 if (numberOfPrefits > 0) {
143
144 advance(__end = evt->begin(), min(numberOfPrefits, evt->size()));
145
147 }
148
149
150 for(JEvt::const_iterator
track = evt->begin();
track != __end; ++
track) {
151
153
155
160
161 double Q =
track->getQ();
162
165 }
166 }
167 }
168 }
169 }
170 else {
172 }
173 }
175
177
178 out.Write();
179 out.Close();
180}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for position in three dimensions.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
Template definition of a multi-dimensional oscillation probability interpolation table.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JPosition3D getPosition(const Vec &pos)
Get position.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
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.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Auxiliary class for histogramming of effective volume.
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.
double E
Energy [GeV] (either MC truth or reconstructed)