37{
40
42
44 size_t numberOfEvents;
46
47 string detectorFile;
48
49 try {
50
51 JParser<> zap(
"Auxiliary program to generate particles.");
52
61
62 zap(argc, argv);
63 }
64 catch(const exception& error) {
65 FATAL(error.what() << endl);
66 }
67
69
71
73
74 try {
76 }
79 }
80
82
84
86
88
91 buffer.simul.rbegin()->date =
getDate();
92 buffer.simul.rbegin()->time =
getTime();
93
95
96 buffer.fixedcan.xcenter = cylinder.getX();
97 buffer.fixedcan.ycenter = cylinder.getY();
98 buffer.fixedcan.zmin = cylinder.getZmin();
99 buffer.fixedcan.zmax = cylinder.getZmax();
100 buffer.fixedcan.radius = cylinder.getRadius();
101
103
104 copy(buffer, header);
105
107
109
111
113
114 for (size_t counter = 0; counter != numberOfEvents; ++counter) {
115
116 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
117
119 }
121
123}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
static const char *const APPLICATION_JGEDANKEN
event generator
std::vector< JAANET::simul > simul
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.
const char * getGITVersion()
Get GIT version.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const char * getTime()
Get current local time conform ISO-8601 standard.
const char * getDate()
Get current local date conform ISO-8601 standard.
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 ...
Generator for simulation.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int status
MC or reconstruction 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.
static const int TRK_ST_FINALSTATE
for MC: the particle must be processed by detector simulation ('track_in' tag in evt files)....