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.");
 
   70     zap[
'e'] = 
make_field(epsilon,                
"precision for integration")  = 1.0e-10;
 
   87   catch(
const exception &error) {
 
   88     FATAL(error.what() << endl);
 
   93   typedef double (JPDF::*fcn)(
const double,
 
  120   typedef JSplineFunction1D_t                                     JFunction1D_t;
 
  121   typedef JMAPLIST<JPolint1FunctionalMap,
 
  122                    JPolint1FunctionalGridMap,
 
  123                    JPolint1FunctionalGridMap>::maplist            JMapList_t;
 
  124   typedef JPDFTable<JFunction1D_t, JMapList_t>                    JPDF_t;
 
  126   typedef JPDFTransformer<3, JFunction1D_t::argument_type>        JFunction3DTransformer_t;
 
  127   typedef JArray<3, JFunction1D_t::argument_type>                 JArray_t;
 
  132   NOTICE(
"building multi-dimensional function object <" << 
function << 
">... " << flush);
 
  135   const double kmin = pdf_c.getKappa(wmax);
 
  136   const double kmax = pdf_c.getKappa(wmin);
 
  137   const double cmin = pdf_c.getKmin (wmax);
 
  148   if (zmap.find(
function) == zmap.end()) {
 
  149     FATAL(
"illegal function specifier" << endl);
 
  152   fcn                      f           = zmap[
function].first;    
 
  153   JFunction3DTransformer_t transformer = zmap[
function].second;   
 
  220     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) {
 
  225     for (
double x = 0.01; x < 0.1; x += 0.0025) {
 
  230     for (
double x = 0.10; x < 0.5; x += 0.010) {
 
  322   const double grid  =  5.0;                        
 
  324   const double alpha = 2.0 * sqrt(1.0 - cos(grid * 
PI / 180.0));  
 
  329     const double R_m = *
r;
 
  331     const unsigned int number_of_theta_points = max(2
u, (
unsigned int) (180.0/(1.4 * grid)));
 
  333     for (
double theta = 0.0; theta <= 
PI + epsilon; theta += 
PI/number_of_theta_points) {
 
  335       const unsigned int number_of_phi_points = max(2
u, (
unsigned int) (
PI * sin(theta) / alpha));
 
  337       for (
double phi = 0.0; phi <= 
PI + epsilon; phi += 
PI/number_of_phi_points) {
 
  339         JFunction1D_t& f1 = pdf[R_m][theta][phi];
 
  341         const JArray_t array(R_m, theta, phi);
 
  343         double t_old = transformer.getXn(array, *X.begin());
 
  348           const double t = transformer.getXn(array, *x);
 
  349           const double y = (pdf_c.*f)(R_m, theta, phi, t);
 
  354               WARNING(
"dt < 0 " << *x << 
' ' << R_m << 
' ' << t << 
' ' << y << endl);
 
  377   pdf.transform(transformer);
 
  390   catch(
const JException& error) {
 
  391     FATAL(error.what() << endl);