31int main(
int argc, 
char **argv)
 
   50    JParser<> zap(
"Program to plot PDF of Cherenkov light from muon using interpolation tables.");
 
   54    zap[
'E'] = 
make_field(E,         
"muon energy at vertex [GeV]") = 1.0;
 
   55    zap[
'R'] = 
make_field(R,         
"distance of approach [m]");
 
   56    zap[
'z'] = 
make_field(z,         
"PMT z-position [m]");
 
   57    zap[
'D'] = 
make_field(dir,       
"(theta, phi) of PMT [rad]");
 
   58    zap[
'T'] = 
make_field(TTS_ns,    
"PMT time smearing [ns]")      = 0.0;
 
   64  catch(
const exception &error) {
 
   65    FATAL(error.what() << endl);
 
   75  const int N = inputFile.size();
 
   82    for (
int i = 0; i != N; ++i) {
 
   84      NOTICE(
"loading input from file " << inputFile[i] << 
"... " << flush);
 
   86      type[i] = getPDFType(inputFile[i]);
 
   88      pdf [i].load(inputFile[i].c_str());
 
   90      pdf [i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
  100    FATAL(error.what() << endl);
 
  103  const double z_emission = z - R/getTanThetaC(); 
 
  104  const double E_emission  = gWater.getE(E, z_emission ); 
 
  108    for (
double dt; cin >> dt; ) {
 
  110      for (
int i = 0; i != N; ++i) {
 
  112        JFunction1D_t::result_type y = pdf[i](R, dir.
getTheta(), dir.
getPhi(), dt);
 
  114        if        (is_bremsstrahlung(type[i])) {
 
  116        } 
else if (is_deltarays(type[i])) {
 
  117          y *= getDeltaRaysFromMuon(E_emission);
 
  120        cout << setw(2)         << type[i]        << 
' ' 
  122             << 
FIXED(5,1)      << R              << 
' ' 
  123             << 
FIXED(5,1)      << z              << 
' ' 
  126             << 
FIXED(5,1)      << dt             << 
' ' 
  138  if (inputFile.size() == 1 && getPDFType(inputFile[0]) == DIRECT_LIGHT_FROM_MUON) {
 
  142  const double t0   =  0.0;                                   
 
  164  for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
 
  166    const double dt = h0.GetBinCenter(i) - t0;
 
  170    for (
int j = 0; j != N; ++j) {
 
  172      if ( E_emission > MASS_MUON* (1/COS_THETA_C_WATER) ) { 
 
  174        if (z_emission >= 0 && z_emission <= gWater(E)) { 
 
  176          JFunction1D_t::result_type y = pdf[j](R, dir.
getTheta(), dir.
getPhi(), dt);
 
  178          if        (is_bremsstrahlung(type[j])) {
 
  180          } 
else if (is_deltarays(type[j])) {
 
  181        y *=     getDeltaRaysFromMuon(E_emission);
 
  189    h0.SetBinContent(i, get_value     (Y));
 
  190    h1.SetBinContent(i, get_derivative(Y));
 
  191    h2.SetBinContent(i, get_integral  (Y));