54{
   58 
   61  typedef JParallelFileScanner_t::multi_pointer_type               multi_pointer_type;
   63 
   64  JParallelFileScanner_t  inputFile;
   67  string         detectorFile;
   68  double         roadWidth_m;
   69  double         R_Hz;
   70  size_t         numberOfPrefits;
   71  JVeto_t        veto;
   72  bool           reprocess;
   74 
   75  try { 
   76 
   77    JParser<> zap(
"Program to determine veto of muon trajectory.");
 
   78    
   83    zap[
'R'] = 
make_field(roadWidth_m)         = numeric_limits<double>::max();
 
   89    
   90    zap(argc, argv);
   91  }
   92  catch(const exception& error) {
   93    FATAL(error.what() << endl);
 
   94  }
   95 
   96 
   98 
   99  try {
  101  }
  104  }
  105 
  107 
  110 
  111  double VS = 0.0;        
  112 
  113  for (vector<JTimeRange>::const_iterator vs = veto.begin(); vs != veto.end(); ++vs) {
  114    VS += vs->getLength() * 1.0e-9;
  115  }
  116 
  117 
  119 
  121 
  122  while (inputFile.hasNext()) {
  123 
  124    STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  125 
  126    multi_pointer_type ps  = inputFile.next();
  127 
  130 
  133 
  135 
  136      
  137    JDataL0_t dataL0;
  138      
  139    buildL0(*tev, router, true, back_inserter(dataL0));
  140      
  141 
  142    for (JEvt::iterator track = cp.begin(); track != cp.end(); ++track) {
  143 
  146 
  147      
  148 
  150          
  151      for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
  152            
  154 
  155        hit.rotate(R);
  156 
  157        bool is_veto = false;
  158 
  159        if (tz.getDistance(hit) <= roadWidth_m) {
  160 
  161          const double t1 = hit.getT() - tz.getT(hit);
  162 
  163          for (vector<JTimeRange>::const_iterator vs = veto.begin(); vs != veto.end() && !is_veto; ++vs) {
  164            is_veto = (*vs)(t1);
  165          }
  166        }
  167            
  168        if (is_veto) {
  169          top.insert(hit.getPMTIdentifier());
  170        }
  171      }
  172 
  173 
  174      double npe   = 0.0;
  175      int    count = 0;
  176 
  177      for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  178 
  180 
  181        pos.rotate(R);
  182         
  183        if (tz.getDistance(pos) <= roadWidth_m) {
  184 
  185          for (unsigned int i = 0; i != module->size(); ++i) {
  186 
  188 
  189            npe   += R_Hz * VS;
  190            count += top.count(id);
  191          }
  192        }
  193      }
  194 
  196 
  197      out.rbegin()->setW(track->getW());
  200    }
  201 
  202    
  203                                                                                                           
  205 
  207  }
  209 
  211 
  213 
  215}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Router for direct addressing of module data in detector data structure.
 
JFit & add(const int type)
Add event to history.
 
Data structure for fit of straight line paralel to z-axis.
 
Data structure for position in three dimensions.
 
JPosition3D & rotate(const JRotation3D &R)
Rotate.
 
Utility class to parse command line options.
 
General purpose class for parallel reading of objects from a single file or multiple files.
 
Object reading from a list of files.
 
Data structure for L0 hit.
 
static const int JMUONVETO
 
static const int JVETO_NPE
number of photo-electrons from JVeto.cc
 
static const int JVETO_NUMBER_OF_HITS
number of hits from JVeto.cc
 
JDirection3D getDirection(const Vec &dir)
Get direction.
 
JPosition3D getPosition(const Vec &pos)
Get position.
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
 
KM3NeT DAQ data structures and auxiliaries.
 
Auxiliary class for defining the range of iterations of objects.
 
const JLimit & getLimit() const
Get limit.
 
static counter_type max()
Get maximum counter value.