36{
39
41
43 size_t numberOfEvents;
45
46 string detectorFile;
47
48 try {
49
50 JParser<> zap(
"Auxiliary program to generate particles.");
51
60
61 zap(argc, argv);
62 }
63 catch(const exception& error) {
64 FATAL(error.what() << endl);
65 }
66
68
70
72
73 try {
75 }
78 }
79
81
83
85
87
90 buffer.simul.rbegin()->date =
getDate();
91 buffer.simul.rbegin()->time =
getTime();
92
94
95 buffer.fixedcan.xcenter = cylinder.getX();
96 buffer.fixedcan.ycenter = cylinder.getY();
97 buffer.fixedcan.zmin = cylinder.getZmin();
98 buffer.fixedcan.zmax = cylinder.getZmax();
99 buffer.fixedcan.radius = cylinder.getRadius();
100
102
103 copy(buffer, header);
104
106
108
110
112
113 for (size_t counter = 0; counter != numberOfEvents; ++counter) {
114
115 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
116
118 }
120
122}
#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.
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)....