44int main(
int argc, 
char **argv)
 
   50  JLimit_t&       numberOfEvents = inputFile.getLimit();
 
   57    JParser<> zap(
"Example program to verify generator data.");
 
   67  catch(
const exception &error) {
 
   68    FATAL(error.what() << endl);
 
   80  TH1D h0  (
"h0", 
"Energy conservation",
 
   83  TH1D h1  (
"h1", 
"Momentum conservation",
 
   86  TH1D job (
"job",  
"Particle types",
 
   87            10001, -5000.5, +5000.5);
 
   88  TH2D hv  (
"hv", 
"Logarithmic visible energy as function of logarithmic initial state energy",
 
   91  TH1D ha  (
"ha", 
"Angle between neutrino-direction and visible-energy-weighted direction",
 
   94  TH1D hn  (
"hn", 
"Number of muons per event",
 
   96  TH1D he  (
"he", 
"Muon energies",
 
   98  TH2D hp  (
"hp", 
"Muon positions",
 
  106    const Evt* 
event = inputFile.
next();
 
  108    for (vector<Trk>::const_iterator track = event->mc_trks.begin(); track != event->mc_trks.end(); ++track) {
 
  109      job.Fill((
double) track->type);
 
  114      const Trk&   neutrino = 
event->mc_trks[0];
 
  119      const double E0 = 
getE0(*event);
 
  120      const double E1 = 
getE1(*event);
 
  125      if (!range((E0 - E1)/E0) || !range((P0 - P1).len()/P0.
len()) || 
debug >= 
debug_t) {
 
  128        NOTICE(
"event: " << 
RIGHT(8) << event->mc_id << 
RIGHT(67) << 
"energy [GeV] momentum (x, y, z) [GeV] distance [m]" << endl);
 
  130        for (
size_t i = 0; i != 
event->mc_trks.size(); ++i) {
 
  132          const Trk& track = 
event->mc_trks[i];
 
  138          NOTICE(
LEFT(32) << showpos << name << 
' ' << 
FIXED(7,3) << track.
E << 
"    " << 
FIXED(7,3) << track.
E * track.
dir << 
"    " << 
FIXED(7,3) << (track.
pos - neutrino.
pos).len() << endl);
 
  140        NOTICE(
LEFT(32) << 
"balance:" << 
' ' << 
FIXED(7,3) << E0 - E1 << 
"    " << 
FIXED(7,3) << P0 - P1 << endl);
 
  144      h1.Fill((P0 - P1).len());
 
  146      hv.Fill(log10(E0), log10(Evis));
 
  153    for (vector<Trk>::const_iterator track = event->mc_trks.begin(); track != event->mc_trks.end(); ++track) {
 
  157        he.Fill(log10(track->E));
 
  158        hp.Fill(track->pos.x*track->pos.x + track->pos.y*track->pos.y, track->pos.z);
 
  162    hn.Fill((Double_t) 
n);
 
 
General purpose messaging.
 
#define DEBUG(A)
Message macros.
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
int main(int argc, char **argv)
 
I/O formatting auxiliaries.
 
#define MAKE_STRING(A)
Make string.
 
Auxiliary class to define a range between two values.
 
ROOT TTree parameter settings of various packages.
 
Utility class to parse command line options.
 
General purpose class for object reading from a list of file names.
 
virtual bool hasNext() override
Check availability of next element.
 
counter_type getCounter() const
Get counter.
 
virtual const pointer_type & next() override
Get next element.
 
JDirection3D getDirection(const Vec &dir)
Get direction.
 
Vec getP0(const Evt &evt)
Get momentum vector of the initial state of a neutrino interaction.
 
JCylinder3D getCylinder(const JHead &header)
Get cylinder corresponding to the positions of generated tracks (i.e.
 
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
 
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
 
double getE1(const Evt &evt)
Get final state energy of a neutrino interaction.
 
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.
 
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
 
Vec getP1(const Evt &evt)
Get momentum vector of the final state of a neutrino interaction.
 
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
double getVisibleEnergy(const Trk &track, const JCylinder3D &can=getMaximumContainmentVolume())
Get the visible energy of a track.
 
Vec getVisibleEnergyVector(const Trk &track, const JCylinder3D &can=getMaximumContainmentVolume())
Get the visible energy vector of a track.
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
Auxiliary data structure for sequence of same character.
 
Auxiliary data structure for floating point format specification.
 
static const JPDB & getInstance()
Get particle data book.
 
bool hasPDG(const int pdg) const
Check if PDB has particle corresponding to given PDG code.
 
const JParticle & getPDG(const int pdg) const
Get particle corresponding to given PDG code.
 
std::string name
name of particle
 
The cylinder used for photon tracking.
 
JRange_t E
Energy range [GeV].
 
Auxiliary class for defining the range of iterations of objects.
 
static counter_type max()
Get maximum counter value.
 
Auxiliary data structure for alignment of data.
 
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)
 
Vec pos
postion [m] of the track at time t
 
The Vec class is a straightforward 3-d vector, which also works in pyroot.
 
double len() const
Get length.