39int main(
int argc,
char **argv)
46 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
48 JTriggeredFileScanner_t inputFile;
52 size_t numberOfPrefits;
61 JParser<> zap(
"Example program to histogram fit results.");
69 zap[
'Q'] =
make_field(quality) = numeric_limits<double>::min();
76 catch(
const exception& error) {
77 FATAL(error.what() << endl);
98 TH1D* hN =
new TH1D(
"hN", NULL, 25, Xmin, Xmax);
99 TH1D* he =
new TH1D(
"he", NULL, 25, Xmin, Xmax);
115 STATUS(
"Detector Geometry:" << endl);
121 while (inputFile.hasNext()) {
123 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
125 multi_pointer_type ps = inputFile.next();
134 const double X = volume.
getX(neutrino.
E);
140 JEvt::iterator __end = evt->end();
142 if (numberOfPrefits > 0) {
144 advance(__end = evt->begin(), min(numberOfPrefits, evt->size()));
146 partial_sort(evt->begin(), __end, evt->end(),
qualitySorter);
150 for(JEvt::const_iterator track = evt->begin(); track != __end; ++track) {
178 WARNING(
"No neutrino." << endl);
Data structure for detector geometry and calibration.
int main(int argc, char **argv)
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to define a range between two values.
ROOT TTree parameter settings of various packages.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
double getRadius() const
Get radius.
double getZmin() const
Get minimal z position.
double getZmax() const
Get maximal z position.
Data structure for position in three dimensions.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
Utility class to parse command line options.
static const int JGANDALF_NUMBER_OF_HITS
number of hits from JGandalf.cc
static const int JGANDALF_CHI2
chi2 from JGandalf.cc
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JPosition3D getPosition(const Vec &pos)
Get position.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
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.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Auxiliary class for histogramming of effective volume.
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
Double_t getXmax() const
Get maximal abscissa value.
Double_t getXmin() const
Get minimal abscissa value.
Auxiliary class for defining the range of iterations of objects.
const JLimit & getLimit() const
Get limit.
static counter_type max()
Get maximum counter value.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
double E
Energy [GeV] (either MC truth or reconstructed)