43{
   47 
   50  bool                      logx;
   52  std::string               option;
   54 
   55  
   56  try {
   57 
   58    JParser<> zap(
"Example program to histogram neutrino effective mass for triggered events.");
 
   59 
   62    zap[
'X'] = 
make_field(logx,         
"Use logarithm of energy");
 
   64    zap[
'O'] = 
make_field(option,       
"Result option")                                            = Mass_t, Volume_t;
 
   66    
   67    zap(argc, argv);
   68  }
   69  catch(const exception &error) {
   70    FATAL(error.what() << endl);
 
   71  }
   72 
   73  try {
   74 
   75    double Xmin = numeric_limits<double>::max();
   76    double Xmax = numeric_limits<double>::lowest();
   77 
   79 
   81 
   82      const JVolume volume(scanner->getHeader(), logx);
 
   83 
   84      if (volume.getXmin() < Xmin) { Xmin = volume.getXmin(); }
   85      if (volume.getXmax() > Xmax) { Xmax = volume.getXmax(); }
   86    }
   87 
   89 
   91 
   93 
   94      NOTICE(
"Scanning file type " << scanner->getName() << endl);
 
   95      DEBUG (header << endl);
 
   96 
   97      const JEvtWeight& weighter = scanner->getEvtWeighter();
 
   98 
  100        FATAL(
"Mising normalisation in header." << endl);
 
  101      }
  102 
  104 
  107      else
  109 
  111 
  112        STATUS(
"event: " << setw(10) << in.getCounter() << 
'\r'); 
DEBUG(endl);
 
  113 
  114        const Evt* 
event   = in.next();
 
  116 
  119        double w = (
getVolume(weighter, *event)                                               /  
 
  120                    (logx ? log(10.0) * 
primary.E * hm->GetBinWidth(1) : hm->GetBinWidth(1))  /
 
  121                    Wnorm);
  122 
  123        if        (option == Mass_t) {
  125        } else if (option == Volume_t) {
  127        }
  128 
  130      }
  132    }
  133  
  135 
  136    out << hm;
  137  
  138    out.Close();
  139  }
  141    FATAL(error << endl);
 
  142  }
  143}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
int numberOfBins
number of bins for average CDF integral of optical module
 
const JHead & getHeader() const
Get header.
 
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
 
Utility class to parse command line options.
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
 
double getVolume(const JType< JEvtWeightGSeaGen > &type, const Evt &evt)
Get volume of given event according given weighter.
 
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
 
static const double PI
Mathematical constants.
 
static const double DENSITY_SEA_WATER
Fixed environment values.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
KM3NeT DAQ data structures and auxiliaries.
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
Abstract base class for event weighing.
 
Auxiliary class for histogramming of effective volume.
 
JRange_t cosT
Cosine zenith angle range
 
double numberOfEvents
Number of events.
 
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
 
std::vector< filescanner_type >::const_iterator const_iterator
 
std::vector< filescanner_type >::iterator iterator
 
Auxiliary base class for list of file names.
 
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
 
virtual bool hasNext() override
Check availability of next element.
 
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.