32{
   35 
   37 
   41  double         D;
   43  double         E;
   46 
   47  try { 
   48 
   49    JParser<> zap(
"Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
 
   50 
   53    zap[
'D'] = 
make_field(dir,       
"(theta, phi) of PMT [rad]");
 
   54    zap[
'R'] = 
make_field(D,         
"distance from vertex to PMT [m]");
 
   56    zap[
'E'] = 
make_field(E,         
"Energy [GeV]")               = 0.0;
 
   59 
   60    zap(argc, argv);
   61  }
   62  catch(const exception &error) {
   63    FATAL(error.what() << endl);
 
   64  }
   65 
   66 
   68 
   69  if (E > 0.0) {
   71      Z.push_back(geanz.getLength(E, (i + 0.5) / (
double) 
numberOfPoints));  
 
   72    }
   73  }
   74 
   75 
   77  typedef
   84 
   86 
   87  const int N = inputFile.size();
   88 
   89  JPDF_t pdf[N];
   90  JNPE_t npe[N];
   91 
   92  try {
   93 
   94    for (int i = 0; i != N; ++i) {
   95 
   96      NOTICE(
"loading input from file " << inputFile[i] << 
"... " << flush);
 
   97      
   98      pdf[i].load(inputFile[i].c_str());
   99 
  100      pdf[i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
  101 
  102      npe[i] = JNPE_t(pdf[i]);
  103 
  105 
  107    }
  108  }
  111  }
  112 
  113 
  115 
  117    
  119    
  120    TH1D h0(
"h0", 
"PDF Projection; D [m]; P [npe]", 
x.getNumberOfBins(), 
x.getLowerLimit(), 
x.getUpperLimit());
 
  121 
  122 
  123    for (int ix = 1; ix <= h0.GetNbinsX(); ++ix) {
  124 
  125      const double cd = h0.GetBinCenter(ix);
  126    
  127      double Y = 0.0;
  128    
  129      if (!Z.empty()) {
  130      
  131        const double W = 1.0 / (double) Z.size();
  132      
  133        for (vector<double>::const_iterator z = Z.begin(); z != Z.end(); ++z) {
  134        
  135          const double __D  = sqrt(D*D - 2.0*(D*cd)*(*z) + (*z)*(*z));
  136          const double __cd = (D * cd - (*z)) / __D;
  137        
  138          for (int i = 0; i != N; ++i) {
  139            try {
  141            }
  142            catch(const exception& error) {}
  143          }
  144        }
  145      
  146      } else {
  147      
  148        for (int i = 0; i != N; ++i) {
  150        }
  151      }
  152    
  153      h0.SetBinContent(ix, Y);
  154    }
  155 
  156    out.Write();
  157    out.Close();
  158 
  159  } else {
  160 
  161    for (double cd; ; ) {
  162 
  163      cout << "> " << flush;
  164      cin  >> D >> cd;
  165 
  166      for (int i = 0; i != N; ++i) {
  168      }
  169    }
  170  }
  171}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Data structure for angles in three dimensions.
 
double getTheta() const
Get theta angle.
 
double getPhi() const
Get phi angle.
 
virtual const char * what() const override
Get error message.
 
Utility class to parse command line options.
 
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.
 
Multi-dimensional PDF table for arrival time of Cherenkov light.
 
static const JZero zero
Function object to assign zero value.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary data structure for floating point format specification.