35{
38
40
42 size_t numberOfEvents;
44
45 string detectorFile;
46
47 try {
48
49 JParser<> zap(
"Auxiliary program to generate particles.");
50
59
60 zap(argc, argv);
61 }
62 catch(const exception& error) {
63 FATAL(error.what() << endl);
64 }
65
67
69
71
72 try {
74 }
77 }
78
80
82
84
85 buffer.fixedcan.xcenter = cylinder.getX();
86 buffer.fixedcan.ycenter = cylinder.getY();
87 buffer.fixedcan.zmin = cylinder.getZmin();
88 buffer.fixedcan.zmax = cylinder.getZmax();
89 buffer.fixedcan.radius = cylinder.getRadius();
90
93
95
97
99
101
102 for (size_t counter = 0; counter != numberOfEvents; ++counter) {
103
104 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
105
107 }
109
111}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JAANET::fixedcan fixedcan
Utility class to parse command line options.
void copy(const Head &from, JHead &to)
Copy header from from to to.
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).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int status
MC status code, see km3net-dataformat/definitions/trkmembers.csv for values.
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.
Vec & normalize()
Normalise this vector.
static const int TRK_ST_FINALSTATE
for MC: the particle must be processed by detector simulation ('track_in' tag in evt files)....