43{
46
47 string fileDescriptor;
52 double epsilon;
53 double TTS;
56 bool option;
58
59 try {
60
61 JParser<> zap(
"Program to create interpolation tables of the PDF of the arrival time of the Cherenkov light from a shower.");
62
63 zap[
'F'] =
make_field(fileDescriptor,
"file name descriptor for PDF tables");
66 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
71 zap[
'T'] =
make_field(TTS,
"sigma of time bluring [ns]") = 2.0;
74
76 }
77 catch(const exception &error) {
79 }
80
81
84 }
85
87
92
98
101
105
107
109 {
110 const string file_name = getFilename(fileDescriptor, SCATTERED_LIGHT_FROM_EMSHOWER);
111
112 NOTICE(
"loading input from file " << file_name <<
"... " << flush);
113
115
117 }
119 {
121
122 const string file_name = getFilename(fileDescriptor, DIRECT_LIGHT_FROM_EMSHOWER);
123
124 NOTICE(
"loading input from file " << file_name <<
"... " << flush);
125
126 pdf.
load(file_name.c_str());
127
130
132
133 NOTICE(
"Add PDF... " << flush);
134
136
138
140
142
143 if (
debug >= debug_t) {
145 }
146
148 }
150
152
153 if ( TTS > 0.0 ){
154
155 NOTICE(
"Smearing combined table with sigma [ns] = " << TTS <<
" ..." << flush);
156
158
160 }
161
163
164 const JFunction4DTransformer_t*
i_transformer =
dynamic_cast<JFunction4DTransformer_t*
>(
i_pdf.transformer->
clone());
166
169 }
170
185 };
186
216 }
217
219
221
223 C.insert(i->getX());
224 }
225
226 C.insert(-1.00);
227 C.insert(+1.00);
228
230
231 X.insert( 0.00);
232 X.insert( 0.50);
233 X.insert( 1.00);
234 X.insert( 1.50);
235 X.insert( 2.00);
236 X.insert( 2.50);
237 X.insert( 3.00);
238 X.insert( 3.50);
239 X.insert( 4.00);
240 X.insert( 5.0);
241 X.insert( 6.0);
242 X.insert( 8.0);
243 X.insert( 10.0);
244 X.insert( 15.0);
245 X.insert( 20.0);
246 X.insert( 25.0);
247 X.insert( 30.0);
248 X.insert( 40.0);
249 X.insert( 50.0);
250 X.insert( 60.0);
251 X.insert( 80.0);
252 X.insert(100.0);
253 X.insert(120.0);
254 X.insert(150.0);
255 X.insert(200.0);
256 X.insert(250.0);
257 X.insert(300.0);
258 X.insert(350.0);
259 X.insert(400.0);
260 X.insert(450.0);
261 X.insert(500.0);
262 X.insert(600.0);
263 X.insert(700.0);
264 X.insert(800.0);
265 X.insert(900.0);
266 X.insert(1200.0);
267 X.insert(1500.0);
268
269 const double grid = 7.0;
270 const double alpha = 2.0 * sqrt(1.0 -
cos(
grid * PI / 180.0));
271
272 NOTICE(
"building multi-dimensional function object" <<
endl);
273
274 for (
const double E :
Es) {
275
277
279
281
283 const double len = geanz.getLength(
pow(10.0, E),
fraction, 1e-6);
284
286
288 }
289
292 }
293
294
295 for (
const double D_m :
Ds) {
296
298
299 for (
const double cd : C) {
300
302
304
306
308
310
311 JFunction1D_t& f1 =
o_pdf[E][
D_m][
cd][theta][phi];
312
313 f1.reserve(X.size());
314
316
319
321
323
325
327
329 const double Z1 =
Z0 - Z;
330
333 const double t_prime = t - (Z) / getSpeedOfLight() - (
D_m_prime -
D_m) * getIndexOfRefraction() / getSpeedOfLight();
334
336 }
337
339
340 if (y != 0.0) {
341
342 if (*x < 0.0) {
343 WARNING(
"dt < 0 " << *x <<
' ' <<
D_m <<
' ' << t <<
' ' << y <<
endl);
344 }
345
348 }
349
351
352 } else {
353
356 }
357 }
358
361 }
362 }
363 }
364 }
365 }
366 }
369
371
373
374 NOTICE(
"transform... " << flush);
375
377
379 }
380
381 try {
382
384
386
388 }
391 }
392}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for CPU timing and usage.
void print(std::ostream &out, const JScale_t scale=milli_t) const
Print timer data.
virtual const char * what() const override
Get error message.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Utility class to parse command line options.
static const JZero zero
Function object to assign zero value.
T pow(const T &x, const double y)
Power .
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
float getMemoryUsage(JShell &shell, const pid_t pid)
Get memory usage in percent of given process identifier.
Auxiliary data structure for floating point format specification.
void store(const char *file_name) const
Store to output file.
virtual clone_type clone() const override
Get clone of this object.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...