271{
274
275 string inputFile;
276 map_type precision (0.0);
277 map_type correction(1.0);
279
280 precision[JKM3Sim::RINDEX_WATER_t] = 1.0e-4;
281 precision[JKM3Sim::ABSORPTION_WATER_t] = 1.0e-4;
282 precision[JKM3Sim::MIE_WATER_t] = 0.2;
283 precision[JKM3Sim::ANG_ACCEPT_t] = 0.5;
284 precision[JKM3Sim::Q_EFF_t] = 0.01;
285
286 try {
287
289
294
295 zap(argc, argv);
296 }
297 catch(const exception &error) {
298 FATAL(error.what() << endl);
299 }
300
301
302 JKM3Sim km3sim;
303
304 ifstream in(inputFile.c_str());
305
306 in >> km3sim;
307
308 in.close();
309
311
313
314
315 {
316
317
318
319
320 const double P = 315.0;
321
322 DEBUG(
"Pressure " << P <<
" [Atm]" << endl);
323
325
326 for (size_t i = 0; i != km3sim.ppckov.size(); ++i) {
327
328 const double x = km3sim.ppckov[i];
329
330 ASSERT(fabs(km3sim.rindex_water[i] - dispersion.getIndexOfRefractionPhase(x) * correction.get(JKM3Sim::RINDEX_WATER_t)) <= precision.get(JKM3Sim::RINDEX_WATER_t),
331 "Test of index of refraction at " <<
FIXED(6,1) << x <<
' ' <<
FIXED(7,4) << km3sim.rindex_water[i] <<
' ' <<
FIXED(7,4) << dispersion.getIndexOfRefractionPhase(x) * correction.get(JKM3Sim::RINDEX_WATER_t));
332 }
333 }
334 {
335 for (const auto& i : km3sim.absorption_water) {
336 ASSERT(fabs(i.second -
getAbsorptionLength(i.first) * correction.get(JKM3Sim::ABSORPTION_WATER_t)) <= precision.get(JKM3Sim::ABSORPTION_WATER_t),
337 "Test of absorption length at " <<
FIXED(6,1) << i.first <<
' ' <<
FIXED(7,3) << i.second <<
' ' <<
FIXED(7,3) <<
getAbsorptionLength(i.first) * correction.get(JKM3Sim::ABSORPTION_WATER_t));
338 }
339 }
340 {
341 for (size_t i = 0; i != km3sim.ppckov.size(); ++i) {
342
343 const double x = km3sim.ppckov[i];
344
345 ASSERT(fabs(km3sim.mie_water[i] -
getScatteringLength(x) * correction.get(JKM3Sim::MIE_WATER_t)) <= precision.get(JKM3Sim::MIE_WATER_t),
346 "Test of scattering length at " <<
FIXED(6,1) << x <<
' ' <<
FIXED(7,3) << km3sim.mie_water[i] <<
' ' <<
FIXED(7,3) <<
getScatteringLength(x) * correction.get(JKM3Sim::MIE_WATER_t));
347 }
348 }
349 {
350 for (size_t i = 0; i != km3sim.ppckov.size(); ++i) {
351
352 const double x = km3sim.ppckov[i];
353
354 ASSERT(fabs(km3sim.q_eff[i] -
getQE(x) * correction.get(JKM3Sim::Q_EFF_t)) <= precision.get(JKM3Sim::Q_EFF_t),
355 "Test of QE at " <<
FIXED(6,1) << x <<
' ' <<
FIXED(7,4) << km3sim.q_eff[i] <<
' ' <<
FIXED(7,4) <<
getQE(x) * correction.get(JKM3Sim::Q_EFF_t));
356 }
357 }
358 {
359 const double U = 1.0e4;
360
361 for (size_t i = 0; i != km3sim.cos_angles.size(); ++i) {
362
363 const double x = km3sim.cos_angles[i];
364
367 }
368 }
369}
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
double getAbsorptionLength(const double lambda)
double getScatteringLength(const double lambda)
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Implementation of dispersion for water in deep sea.
double getPhotocathodeArea()
Get photo-cathode area of PMT.
double getQE(const double R, const double mu)
Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...