51   template<
class JMultiHistogram_t>
 
   78     int operator()(
const Trk& track, 
const Hit& hit)
 const 
   81         return classify_km3sim(track, hit);
 
   83         return classify_km3(track, hit);
 
   98     inline double getEnergy(
const Evt& event, 
const Trk& track, 
const JAxis3D& axis)
 const 
  118     int classify_km3(
const Trk& track, 
const Hit& hit)
 const 
  120       if (track.id == hit.origin) {
 
  146     int classify_km3sim(
const Trk& track, 
const Hit& hit)
 const 
  163 int main(
int argc, 
char **argv)
 
  169   JLimit_t&   numberOfEvents = inputFile.getLimit();
 
  176     JParser<> zap(
"Program to histogram event-by-event data of muon light for making PDFs.");
 
  180     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
  186   catch(
const exception &error) {
 
  187     FATAL(error.what() << endl);
 
  221   JMultiHistogram_t h0;   
 
  222   JMultiHistogram_t h1;   
 
  223   JMultiHistogram_t h2;   
 
  225   const JHitClassifier<JMultiHistogram_t> classifier(head, 
detector);
 
  227   const double cmin = dispersion.
getKmin (wmax);
 
  235   const double R[] = { 0.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 70.0, 80.0, 90.0, 100.0, 170.0, 250.0 };
 
  237   for (
int i = 0; i != 
sizeof(R)/
sizeof(R[0]); ++i) {
 
  239     const double R_m = R[i];
 
  241     const double grid  = 10.0 +  0.0 * R_m/100.0;                         
 
  242     const double alpha = 2.0 * sqrt(1.0 - cos(grid * 
PI / 180.0));        
 
  244     const int    number_of_theta_points = max(2, (
int) (180.0/(1.4 * grid)));
 
  245     const double theta_step             = 
PI / (number_of_theta_points + 1);
 
  247     for (
double theta = -0.5*theta_step; theta < 
PI + theta_step; theta += theta_step) {
 
  249       const int    number_of_phi_points = max(2, (
int) (
PI * sin(theta) / alpha));
 
  250       const double phi_step             = 
PI / (number_of_phi_points + 1);
 
  252       for (
double phi = -0.5*phi_step; phi < 
PI + phi_step; phi += phi_step) {
 
  254         for (JMultiHistogram_t* buffer[] = { &h0, &h1, &h2, NULL }, **histogram = buffer; *histogram != NULL; ++histogram) {
 
  255           (**histogram)[R_m][theta][phi];
 
  261   for (JMultiHistogram_t::super_iterator 
 
  262          i1 = h1.super_begin(),
 
  263          i2 = h2.super_begin(); i1 != h1.super_end(); ++i1, ++i2) {
 
  265     for (
double buffer[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.5, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 85.0, 100.0, 125.0, 150.0, 200.0, 500.0, -1.0 }, *x = buffer; *x >= 0.0; ++x) {
 
  276     const Evt* 
event = inputFile.
next();
 
  287         double       t0  = track->t;
 
  303             const double E1 = classifier.getEnergy(*event, *track, axis);
 
  306             const double R_m   = axis.
getX();
 
  307             const double theta = axis.
getTheta();
 
  308             const double phi   = fabs(axis.
getPhi());
 
  309             const double dt    = 
getTime(*hit) - t1;
 
  310             const double npe   = 
getNPE(*hit);
 
  312             switch (classifier(*track, *hit)) {
 
  315               h1.fill(R_m, theta, phi, dt, npe);              
 
  319               h2.fill(R_m, theta, phi, dt, npe/max(1.0, E1)); 
 
  323           catch(
const exception& error) {
 
  324             FATAL(error.what() << endl);
 
  329         for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  339             for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
 
  361   for (
const JMultiHistogram_t* buffer[] = { &h0, &h1, &h2, NULL }, **i = buffer; *i != NULL; ++i) {