87   JLimit_t&              numberOfEvents = inputFile.getLimit();
 
   97     JParser<> zap(
"Auxiliary program to verify processing of Monte Carlo events.");
 
   99     zap[
'f'] = 
make_field(inputFile,           
"input file (output of detector simulation)");
 
  100     zap[
'n'] = 
make_field(numberOfEvents)                     = JLimit::max();
 
  101     zap[
'a'] = 
make_field(detectorFileA,       
"detector used for converion from Monte Carlo truth to raw data.");
 
  102     zap[
'b'] = 
make_field(detectorFileB,       
"detector used for conversion of raw data to calibrated data.")     = 
"";
 
  110   catch(
const exception &error) {
 
  111     FATAL(error.what() << endl);
 
  116   if (detectorFileB == 
"") {
 
  117     detectorFileB = detectorFileA;
 
  125     load(detectorFileA, detectorA);
 
  126     load(detectorFileB, detectorB);
 
  132   NOTICE(
"Number of modules in detector A <" << detectorFileA << 
">: " << setw(4) << detectorA.size() << endl);
 
  133   NOTICE(
"Number of modules in detector B <" << detectorFileB << 
">: " << setw(4) << detectorB.size() << endl);
 
  135   JPMTParametersMap::Throw(
true);
 
  138     FATAL(
"Invalid PMT parameters " << pmtParameters << endl);
 
  141   if (pmtParameters.
getQE() != 1.0) {
 
  143     NOTICE(
"Correct background rates with global efficiency " << pmtParameters.
getQE() << endl);
 
  147     NOTICE(
"Back ground rates: " << rates_Hz << endl);
 
  155   DEBUG(
"Trigger:"        << endl << parameters   << endl);
 
  156   DEBUG(
"PMT parameters:" << endl << pmtParameters << endl); 
 
  167   const JPosition3D center = get<JPosition3D>(header);
 
  169   NOTICE(
"Apply detector offset from Monte Carlo run header (" << center << 
")" << endl);
 
  183     Evt* 
event = inputFile.
next();
 
  187       if (!pmtRouter.hasPMT(hit->pmt_id)) {
 
  189         miss[hit->pmt_id].
put(hit->pure_a);
 
  196       if (!moduleRouter.hasModule(pmt.
getID())) {
 
  198         lost[pmt].
put(hit->pure_a);
 
  203       const double t0 = hit->pure_t;
 
  204       const double t1 = 
putTime(t0, pmtRouter   .getPMT(hit->pmt_id));
 
  205       const double t2 = 
getTime(t1, moduleRouter.getPMT(pmt));
 
  209         slip[pmt].
put(hit->pure_a);
 
  215       npe[pmt][0].
put(hit->pure_a);
 
  216       npe[pmt][1].
put(hit->pure_a * P);
 
  217       npe[pmt][2].
put(hit->pure_a * P * data.
QE);
 
  223   NOTICE(
"Number of PMTs absent in detector A:               " << setw(6) << miss.size() << endl);
 
  226     DEBUG(setw(5) << i->first << 
' ' << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  229   NOTICE(
"Number of PMTs absent in detector B:               " << setw(6) << lost.size() << endl);
 
  232     DEBUG(setw(8) << i->first.getModuleID() << 
"[" << setw(2) << i->first.getPMTAddress() << 
"] " << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  235   NOTICE(
"Number of PMTs with t0 detector A - B > " << 
FIXED(4,1) << parameters.
TMaxLocal_ns << 
" [ns]: " << setw(6) << slip.size() << endl);
 
  238     DEBUG(setw(8) << i->first.getModuleID() << 
"[" << setw(2) << i->first.getPMTAddress() << 
"] " << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  242   NOTICE(
"Number of true photo-electrons, passed threshold and survived QE." << endl);
 
  248     DEBUG(setw(8) << p->first.getModuleID() << 
"[" << setw(2) << p->first.getPMTAddress() << 
"]");
 
  250     for (
size_t i = 0; i != p->second.size(); ++i) {
 
  251       DEBUG(
' ' << 
FIXED(8,0) << p->second[i].getTotal());
 
  255     for (
size_t i = 0; i != p->second.size(); ++i) {
 
  256       total[i].put(p->second[i].getTotal());
 
  260   NOTICE(setw(12) << 
"total");
 
  262   for (
size_t i = 0; i != total.size(); ++i) {