82   using namespace KM3NETDAQ;
 
   85   typedef JTriggeredFileScanner_t::multi_pointer_type       multi_pointer_type;
 
   87   JTriggeredFileScanner_t inputFile;
 
   90   size_t                  numberOfPrefits;
 
  102     JParser<> zap(
"Example program to histogram fit results.");
 
  106     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
  113     zap[
'O'] = 
make_field(option)              = 
"E", 
"N", 
"LINE", 
"LOGE";
 
  119   catch(
const exception& error) {
 
  120     FATAL(error.what() << endl);
 
  132   const JVolume     volume(head, option != 
"LINE");
 
  136   cylinder.
add(center);
 
  138   NOTICE(
"Center         [m]: " << center   << endl);
 
  139   NOTICE(
"Reposition can [m]: " << cylinder << endl);
 
  144   TH1D job(
"job", NULL, 100, 0.5, 100.5);
 
  146   TH1D hn(
"hn",  NULL,  250,   -0.5, 249.5);    
 
  147   TH1D hq(
"hq",  NULL,  300,    0.0, 600.0);    
 
  148   TH1D hi(
"hi",  NULL,  101,   -0.5, 100.5);    
 
  149   TH1D hv(
"hv",  NULL,  200,   -6.0,   0.0);    
 
  150   TH1D 
h1(
"h1",  NULL,  200,   -2.0,  +2.0);    
 
  151   TH1D hc(
"hc",  NULL,  200,   -1.0,  +1.0);    
 
  152   TH1D hu(
"hu",  NULL,  400, -1.0e3, 1.0e3);    
 
  154   TH1D hx(
"hx",  NULL,  70,   -3.0,  +2.3);     
 
  155   TH1D hd(
"hd",  NULL,  100,    0.0,  10.0);    
 
  156   TH1D hz(
"hz",  NULL,  100, -200.0, 200.0);    
 
  157   TH1D ht(
"ht",  NULL,  100, -100.0, 100.0);    
 
  159   TH1D E_0(
"E_0",  NULL,  100, volume.getXmin(), volume.getXmax());     
 
  160   TH1D E_1(
"E_1",  NULL,  100, volume.getXmin(), volume.getXmax());     
 
  161   TH1D E_2(
"E_2",  NULL,  100, volume.getXmin(), volume.getXmax());     
 
  162   TH1D E_E(
"E_E",  NULL,  100, -5.0, +5.0);                             
 
  163   TH2D ExE(
"ExE",  NULL,
 
  164       40, volume.getXmin(), volume.getXmax(),
 
  165       40, volume.getXmin(), volume.getXmax());  
 
  167   const Int_t    ny   = 28800;
 
  168   const Double_t ymin =   0.0;         
 
  169   const Double_t ymax =   180.0;       
 
  173   if (option.find(
'E') != string::npos) {
 
  175     for (
double x = volume.getXmin(); x <= volume.getXmax(); x += (volume.getXmax() - volume.getXmin()) / 20) {
 
  183     for ( ; x <=  15.5; x +=  1.0) { X.push_back(x); }
 
  184     for ( ; x <=  25.5; x +=  2.0) { X.push_back(x); }
 
  185     for ( ; x <=  50.5; x +=  5.0) { X.push_back(x); }
 
  186     for ( ; x <= 100.5; x += 10.0) { X.push_back(x); }
 
  187     for ( ; x <= 250.5; x += 20.0) { X.push_back(x); }
 
  190   TH2D h2(
"h2", NULL, X.size() - 1, X.data(), ny, ymin, ymax);
 
  193           100, 0.0, cylinder.getRadius()*cylinder.getRadius(), 
 
  194           100, cylinder.getZmin() - 50.0, cylinder.getZmax() + 50.0);
 
  196           100, 0.0, cylinder.getRadius()*cylinder.getRadius(),
 
  197           100, cylinder.getZmin() - 50.0, cylinder.getZmax() + 50.0);
 
  203   while (inputFile.hasNext()) {
 
  205     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  207     multi_pointer_type ps = inputFile.next();
 
  234         if (track->E > Emax) {
 
  241     if (muon == event->mc_trks.end()) {
 
  252     if (option.find(
'E') != string::npos)
 
  253       x = volume.getX(event->mc_trks[0].E);
 
  260       JEvt::iterator __end = partition(evt->begin(), evt->end(), 
JHistory::is_event(application));
 
  262       if (evt->begin() == __end) {
 
  268       if (numberOfPrefits > 0) {
 
  270         JEvt::iterator __q = __end;
 
  272         advance(__end = evt->begin(), min(numberOfPrefits, (
size_t) 
distance(evt->begin(), __q)));
 
  292       JEvt::iterator best  = pointing(evt->begin(), __end);
 
  293       const Double_t beta  = pointing.
getAngle(*best);
 
  294       const double   Efit  = best->getE();
 
  295       const double   Eraw  = best->getW(
JENERGY_ENERGY, numeric_limits<double>::min());
 
  296       const double   mip   = best->getW(
JSTART_NPE_MIP, numeric_limits<double>::max());
 
  300       bool ok = (Efit >= Emin_GeV  && mip  >= NPE);
 
  306         hn.Fill((Double_t) best->getNDF());
 
  307         hq.Fill(best->getQ());
 
  308         hi.Fill((Double_t) 
distance(evt->begin(), best));
 
  309         hc.Fill(best->getDZ());
 
  314             (!
has_neutrino(*event) && best->getDZ()              >= atmosphere.dot2)) { 
 
  315           hu.Fill(atmosphere(evt->begin(), __end));
 
  318         hx.Fill(max(log10(beta), hx.GetXaxis()->GetXmin()));
 
  326         tb.
sub(converter.putTime());
 
  343           if (cylinder.is_inside(vertex)) {
 
  349             Va.Fill(best->getX()*best->getX() + best->getY()*best->getY(), best->getZ());   
 
  354         Vb.Fill(best->getX()*best->getX() + best->getY()*best->getY(), best->getZ());   
 
  357         E_0.Fill(volume.getX(E,    
true));
 
  358         E_1.Fill(volume.getX(Eraw, 
true));
 
  359         E_2.Fill(volume.getX(Efit, 
true));
 
  360         E_E.Fill(volume.getX(Efit) - volume.getX(E));
 
  361         ExE.Fill(volume.getX(E),     volume.getX(Efit));
 
  371           const double npe   = best->getW(
JVETO_NPE);               
 
  373           const double pv    = TMath::PoissonI(count, npe);         
 
  375           hv.Fill(max(log10(pv), hv.GetXaxis()->GetXmin()));
 
  382   NOTICE(
"Number of events input           " << setw(8) << right << job.GetBinContent(1) << endl);
 
  383   NOTICE(
"Number of events with muon       " << setw(8) << right << job.GetBinContent(3) << endl);
 
  384   NOTICE(
"Number of events with fit        " << setw(8) << right << job.GetBinContent(4) << endl);
 
  385   NOTICE(
"Number of events selected        " << setw(8) << right << job.GetBinContent(5) << endl);
 
  386   NOTICE(
"Number of events with neutrino   " << setw(8) << right << job.GetBinContent(6) << endl);
 
  387   NOTICE(
"Number of events contained       " << setw(8) << right << job.GetBinContent(7) << endl);
 
  389   if (Q.getCount() != 0) {
 
  390     NOTICE(
"Median space angle [deg] " << 
FIXED   (6,3) << Q.getQuantile(0.5) << endl);
 
static const int JMUONSTART
 
Utility class to parse command line options. 
 
static const int JMUONPATH
 
static const int JVETO_NPE
number of photo-electrons from JVeto.cc 
 
Auxiliary class to compare fit results with respect to a reference direction (e.g. 
 
JTrack3E getTrack(const Trk &track)
Get track. 
 
static const int JENERGY_ENERGY
uncorrected energy [GeV] from JEnergy.cc 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
JTime & sub(const JTime &value)
Subtraction operator. 
 
const char *const neutrino_t
 
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino. 
 
double getIntersection(const JVector3D &pos) const 
Get longitudinal position along axis of position of closest approach with given position. 
 
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon. 
 
General purpose sorter of fit results. 
 
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
 
then for HISTOGRAM in h0 h1
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
JCylinder3D & add(const JVector3D &pos)
Add position. 
 
Auxiliary data structure for floating point format specification. 
 
double E
Energy [GeV] (either MC truth or reconstructed) 
 
static const int JSTART_NPE_MIP
number of photo-electrons up to the barycentre from JStart.cc 
 
JTime & add(const JTime &value)
Addition operator. 
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header. 
 
Auxiliary class for defining the range of iterations of objects. 
 
const_iterator< T > end() const 
Get end of data. 
 
static const int JMUONPREFIT
 
double getAngle(const JFit &fit) const 
Get angle between reference direction and fit result. 
 
const_iterator< T > begin() const 
Get begin of data. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Auxiliary class to test history. 
 
static const int JMUONGANDALF
 
static const int JVETO_NUMBER_OF_HITS
number of hits from JVeto.cc 
 
const JPosition3D & getPosition() const 
Get position. 
 
Reconstruction type dependent comparison of track quality. 
 
Auxiliary class to evaluate atmospheric muon hypothesis. 
 
double getT(const JVector3D &pos) const 
Get arrival time of Cherenkov light at given position. 
 
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter. 
 
Data structure for set of track fit results. 
 
static const int JMUONSIMPLEX
 
int getCount(const T &hit)
Get hit count. 
 
JDirection3D getDirection(const Vec &v)
Get direction. 
 
Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time. 
 
Data structure for position in three dimensions. 
 
const JLimit & getLimit() const 
Get limit. 
 
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino. 
 
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower. 
 
Auxiliary class for histogramming of effective volume. 
 
JVector3D & add(const JVector3D &vector)
Add vector. 
 
static const int JMUONENERGY
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event. 
 
then usage $script[input file[working directory[option]]] nWhere option can be E
 
#define DEBUG(A)
Message macros. 
 
JPosition3D getPosition(const Vec &v)
Get position.