139 JParser<> zap(
"Example program to verify generator data.");
143 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
149 catch(
const exception &error) {
150 FATAL(error.what() << endl);
157 TH1D h0 (
"h0", NULL, 1001, -1.0, +1.0);
158 TH1D job(
"job", NULL, 10001, -5000.5, +5000.5);
160 TH1D hn (
"hn", NULL, 2001, -0.5, +2000.5);
161 TH1D he (
"he", NULL, 1000, 0.0, 10.0);
168 while (inputFile.hasNext()) {
170 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
172 const Evt*
event = inputFile.next();
175 job.Fill((
double) track->type);
180 const double E0 = getE0(*
event);
181 const double E1 = getE1(*
event);
185 const Trk& neutrino =
event->mc_trks[0];
187 cout << endl <<
"--------------------------------------------------------" << endl;
188 cout <<
"event: " << setw(8) <<
event->mc_id <<
" energy [GeV] distance [m]" << endl;
190 for (
size_t i = 0; i !=
event->mc_trks.size(); ++i) {
192 const Trk& track =
event->mc_trks[i];
193 const JParticle& particle = pdb.getPDG(track.type);
195 cout << setw(32) << left << particle.
name <<
' ' <<
FIXED(7,3) << track.E <<
" " <<
FIXED(7,3) << (track.pos - neutrino.pos).len() << endl;
197 cout << setw(32) << left <<
"balance" <<
' ' <<
FIXED(7,3) << E0 - E1 << endl;
200 h0.Fill((E0 - E1)/E0);
210 he.Fill(log10(track->E));
211 h2.Fill(track->pos.x*track->pos.x + track->pos.y*track->pos.y, track->pos.z);
215 hn.Fill((Double_t) n);
Utility class to parse command line options.
std::string name
name of particle
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
Auxiliary data structure for floating point format specification.
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to handle particle name, codes and mass.
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
#define DEBUG(A)
Message macros.