52 int main(
int argc,
char **argv)
66 JParser<> zap(
"Program to create interpolation tables of the PDF of the arrival time of the Cherenkov light from a muon.");
87 catch(
const exception &error) {
88 FATAL(error.what() << endl);
92 typedef double (
JPDF::*fcn)(
const double,
119 typedef JSplineFunction1D_t JFunction1D_t;
120 typedef JMAPLIST<JPolint1FunctionalMap,
121 JPolint1FunctionalGridMap,
122 JPolint1FunctionalGridMap>::maplist JMapList_t;
123 typedef JPDFTable<JFunction1D_t, JMapList_t> JPDF_t;
125 typedef JPDFTransformer<3, JFunction1D_t::argument_type> JFunction3DTransformer_t;
126 typedef JArray<3, JFunction1D_t::argument_type> JArray_t;
131 NOTICE(
"building multi-dimensional function object <" <<
function <<
">... " << flush);
134 const double kmin = pdf_c.getKappa(wmax);
135 const double kmax = pdf_c.getKappa(wmin);
136 const double cmin = pdf_c.getKmin (wmax);
147 if (zmap.find(
function) == zmap.end()) {
148 FATAL(
"illegal function specifier" << endl);
151 fcn
f = zmap[
function].first;
152 JFunction3DTransformer_t transformer = zmap[
function].second;
219 for (
double buffer[] = { -0.01, -0.005, 0.0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, -1.0 }, *
x = buffer; *
x != -1.0; ++
x) {
224 for (
double x = 0.01;
x < 0.1;
x += 0.0025) {
229 for (
double x = 0.10;
x < 0.5;
x += 0.010) {
321 const double grid = 5.0;
323 const double alpha = 2.0 * sqrt(1.0 - cos(grid *
PI / 180.0));
328 const double R_m = *
r;
330 const unsigned int number_of_theta_points = max(2
u, (
unsigned int) (180.0/(1.4 * grid)));
332 for (
double theta = 0.0; theta <=
PI +
epsilon; theta +=
PI/number_of_theta_points) {
334 const unsigned int number_of_phi_points = max(2
u, (
unsigned int) (
PI *
sin(theta) / alpha));
336 for (
double phi = 0.0; phi <=
PI +
epsilon; phi +=
PI/number_of_phi_points) {
338 JFunction1D_t&
f1 = pdf[R_m][theta][phi];
340 const JArray_t
array(R_m, theta, phi);
342 double t_old = transformer.getXn(array, *
X.begin());
347 const double t = transformer.getXn(array, *
x);
348 const double y = (pdf_c.*
f)(R_m, theta, phi, t);
353 WARNING(
"dt < 0 " << *
x <<
' ' << R_m <<
' ' << t <<
' ' << y << endl);
376 pdf.transform(transformer);
389 catch(
const JException& error) {
390 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Properties of Antares PMT and deep-sea water.
double absorptionLengthFactor
Scaling of absorption and scattering length.
direct light from EM showers
double getScatteringProbability(const double x)
Function to describe light scattering in water.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
Various implementations of functional maps.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
scattered light from muon
Properties of KM3NeT PMT and deep-sea water.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
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...
double getAmbientPressure()
Get ambient pressure.
scattered light from delta-rays
static const double PI
Mathematical constants.
double getPhotocathodeArea()
Get photo-cathode area of PMT.
scattered light from EM showers
General purpose messaging.
direct light from delta-rays
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
then JCookie sh JDataQuality D $DETECTOR_ID R
double getAbsorptionLength(const double lambda)
Get absorption length.
Utility class to parse command line options.
double getScatteringLength(const double lambda)
Get scattering length.
double scatteringLengthFactor
no fit printf nominal n $STRING awk v X
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
Auxiliary data structure for muon PDF.