36   typedef JAbstractHistogram<double> JHistogram_t;
 
   49     JParser<> zap(
"Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
 
   53     zap[
'D'] = 
make_field(dir,       
"(theta, phi) of PMT [rad]");
 
   54     zap[
'R'] = 
make_field(D,         
"distance from vertex to PMT [m]");
 
   55     zap[
'x'] = 
make_field(x,         
"histogram x-binning")        = JHistogram_t();
 
   56     zap[
'E'] = 
make_field(E,         
"Energy [GeV]")               = 0.0;
 
   62   catch(
const exception &error) {
 
   63     FATAL(error.what() << endl);
 
   76   typedef JPolint0Function1D_t                                    JFunction1D_t;
 
   78     JMapList<JPolint1FunctionalMap,
 
   79     JMapList<JPolint1FunctionalMap,
 
   80     JMapList<JPolint1FunctionalGridMap,
 
   81     JMapList<JPolint1FunctionalGridMap> > > >                     JMapList_t;
 
   82   typedef JPDFTable<JFunction1D_t, JMapList_t>                    JPDF_t;
 
   83   typedef JNPETable<double, double, JMapList_t>                   JNPE_t;
 
   85   JDistance<double>::precision = 1.0e-10;
 
   87   const int N = inputFile.size();
 
   94     for (
int i = 0; i != N; ++i) {
 
   96       NOTICE(
"loading input from file " << inputFile[i] << 
"... " << flush);
 
   98       pdf[i].load(inputFile[i].c_str());
 
  100       pdf[i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
  102       npe[i] = JNPE_t(pdf[i]);
 
  107   catch(
const JException& error) {
 
  108     FATAL(error.what() << endl);
 
  114   if (!x.is_valid()) { x = JHistogram_t(100000, -1.0, +1.0); }
 
  116   TH1D h0(
"h0", 
"PDF Projection; D [m]; P [npe]", x.getNumberOfBins(), x.getLowerLimit(), x.getUpperLimit());
 
  119   for (
int ix = 1; ix <= h0.GetNbinsX(); ++ix) {
 
  121     const double cd = h0.GetBinCenter(ix);
 
  127       const double W = 1.0 / (double) Z.size();
 
  131         const double __D  = sqrt(D*D - 2.0*(D*cd)*(*z) + (*z)*(*z));
 
  132         const double __cd = (D * cd - (*z)) / __D; 
 
  134         for (
int i = 0; i != N; ++i) {
 
  136             Y += W * npe[i](__D, __cd, dir.getTheta(), dir.getPhi());
 
  138           catch(
const exception& error) {}
 
  144       for (
int i = 0; i != N; ++i) {    
 
  145         Y += npe[i](D, cd, dir.getTheta(), dir.getPhi());
 
  149     h0.SetBinContent(ix, Y);