40 int main(
int argc,
char **argv)
44 using namespace KM3NETDAQ;
47 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
49 JTriggeredFileScanner_t inputFile;
53 size_t numberOfPrefits;
62 JParser<> zap(
"Example program to histogram fit results.");
67 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
70 zap[
'Q'] =
make_field(quality) = numeric_limits<double>::min();
77 catch(
const exception& error) {
78 FATAL(error.what() << endl);
96 const double Xmax = E_GeV.is_valid() ? volume.
getX(E_GeV.getMaximum()) : volume.
getXmax();
97 const double Xmin = E_GeV.is_valid() ? volume.
getX(E_GeV.getMinimum()) : volume.
getXmin();
101 TH1D* hN =
new TH1D(
"hN", NULL, 25, Xmin, Xmax);
102 TH1D* he =
new TH1D(
"he", NULL, 25, Xmin, Xmax);
118 STATUS(
"Detector Geometry:" << endl);
119 STATUS(
"Zmin: " << cylinder.getZmin() << endl);
120 STATUS(
"Zmax: " << cylinder.getZmax() << endl);
121 STATUS(
"Z origin: " << 0.5 * (cylinder.getZmax() + cylinder.getZmin()) << endl);
122 STATUS(
"Radius: " << cylinder.getRadius() << endl);
124 while (inputFile.hasNext()) {
126 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
128 multi_pointer_type ps = inputFile.next();
137 const double X = volume.
getX(neutrino.
E);
143 JEvt::iterator __end = evt->end();
145 if (numberOfPrefits > 0) {
147 advance(__end = evt->begin(), min(numberOfPrefits, evt->size()));
149 partial_sort(evt->begin(), __end, evt->end(),
qualitySorter);
153 for(JEvt::const_iterator track = evt->begin(); track != __end; ++track) {
159 if ((pos.
getZ() > cylinder.getZmin()
160 && pos.
getZ() < cylinder.getZmax()
161 && R < cylinder.getRadius())
181 WARNING(
"No neutrino." << endl);
Utility class to parse command line options.
ROOT TTree parameter settings.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
double E
Energy [GeV] (either MC truth or reconstructed)
Data structure for detector geometry and calibration.
Double_t getXmin() const
Get minimal abscissa value.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for defining the range of iterations of objects.
static const int JGANDALF_NUMBER_OF_HITS
number of hits from JGandalf.cc
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getY() const
Get y position.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
then usage $script[distance] fi case set_variable R
General purpose messaging.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Data structure for set of track fit results.
Auxiliary class to define a range between two values.
Utility class to parse command line options.
double getX() const
Get x position.
Data structure for position in three dimensions.
const JLimit & getLimit() const
Get limit.
static const int JGANDALF_CHI2
chi2 from JGandalf.cc
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.
Double_t getXmax() const
Get maximal abscissa value.
double getZ() const
Get z position.
Auxiliary class for histogramming of effective volume.
bool qualitySorter(const JRECONSTRUCTION::JFit &first, const JRECONSTRUCTION::JFit &second)
Comparison of fit results.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.
JPosition3D getPosition(const Vec &v)
Get position.
int main(int argc, char *argv[])