44{
47
49
53 int type;
55 string option;
58
59 try {
60
62
71
73 }
74 catch(const exception& error) {
76 }
77
79
81
84
85 const double A[] = {
89 };
90
91 double W = 0.0;
92
93 for (int i = 0; i != sizeof(A)/sizeof(A[0]); ++i) {
94 W += A[i];
95 }
96
97 for (
counter_type counter = 0; counter != numberOfEvents; ++counter) {
98
100
103
104 for ( ; ; ) {
105
107
109
111
112 const double phi =
gRandom->Uniform(-PI, +PI);
113 const double u =
gRandom->Uniform(0.0, W);
114
115 double R;
116 double z;
117
119
122
123 }
else if (
u <= A[1]) {
124
127
128 }
else if (
u <= A[2]) {
129
132
133 } else {
134
135 continue;
136 }
137
140 z);
141
142 } else {
143
144 FATAL(
"Invalid option " << option <<
endl);
145 }
146
148
150 break;
151 }
152 }
153
155 const double E =
pow(10.0, x);
156
158
160
162
169
171
173 }
175
177
178 {
179 JHead buffer(header);
180
181 buffer.fixedcan.xcenter =
cylinder.getX();
182 buffer.fixedcan.ycenter =
cylinder.getY();
183 buffer.fixedcan.radius =
cylinder.getRadius();
184 buffer.fixedcan.zmin =
cylinder.getZmin();
185 buffer.fixedcan.zmax =
cylinder.getZmax();
186
188
189 copy(buffer, header);
190 }
191
194
196}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JAANET::fixedcan fixedcan
Data structure for direction in three dimensions.
Data structure for vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
JDirection3D getDirection(const Vec &dir)
Get direction.
void copy(const Head &from, JHead &to)
Copy header from from to to.
JPosition3D getPosition(const Vec &pos)
Get position.
JVector3D getRandomPosition(const JSphere3D &sphere)
Get random position.
T pow(const T &x, const double y)
Power .
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void randomize(JDAQChronometer *p)
Randomize chronometer.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
double mc_t
MC: time where the mc-event was put in the timeslice, since start of run (offset+frameidx*timeslice_d...
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 ...
Type definition of range.
Auxiliary data structure to configure random number generator.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
static const int TRK_ST_FINALSTATE
for MC: the particle must be processed by detector simulation ('track_in' tag in evt files)....