50{
54
59 typedef JReconstruction_t::JEnergyCorrection_t JEnergyCorrection_t;
60 typedef JReconstruction_t::JParameters_t JParameters_t;
61 typedef JReconstruction_t::JStorage_t JStorage_t;
62
65 JLimit_t& numberOfEvents = inputFile.getLimit();
66 string detectorFile;
67 JCalibration_t calibrationFile;
68 double Tmax_s;
69 string pdfFile;
70 JParameters_t parameters;
72 JEnergyCorrection_t correct;
74 size_t threads;
76
77 try {
78
79 JParser<> zap(
"Program to perform reconstruction of muon trajectory and shower for ORCA detector.");
80
86 zap[
'T'] =
make_field(Tmax_s,
"dynamical update time [s]") = 100.0;
92 zap[
'N'] =
make_field(threads,
"number of threads") = 0;
94
95 zap(argc, argv);
96 }
97 catch(const exception& error) {
98 FATAL(error.what() << endl);
99 }
100
101
103
105
106 try {
108 }
111 }
112
113 unique_ptr<JDynamics> dynamics;
114
115 if (!calibrationFile.empty()) {
116
117 try {
118
120
121 dynamics->load(calibrationFile);
122 }
123 catch(const exception& error) {
125 }
126 }
127
130
132
133 {
135
137
138 const JStorage_t storage(pdfFile, parameters);
139
140 JReconstruction_t fit(parameters, storage, rates_Hz, pmtParameters, correct,
debug);
141
143
145
146 while (in.hasNext()) {
147
148 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
149
151
152 summary.update(*tev);
153
154 if (dynamics) {
155 dynamics->update(*tev);
156 }
157
158 auto input = fit.getInput(router, summary, *tev, dynamics ? dynamics->getCoverage() :
coverage_type());
159
160 if (threads > 0)
161 fits.enqueue(input);
162 else
164
166 }
168 }
169
171
173
175}
#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.
Auxiliary class for map of PMT parameters.
Data structure for set of track fit results.
static void sets(std::ostream &out)
Set output stream.
Utility class to parse command line options.
Thread pool for event-by-event reconstruction.
void setSplitLevel(int value)
Set split level.
General purpose class for object reading from a list of file names.
Object reading from a list of files.
File router for fast addressing of summary data.
Template definition for direct access of elements in ROOT TChain.
JTriggerCounter_t next()
Increment trigger counter.
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).
JTreeParameters & getTreeParameters()
Template definition for method returning TTree parameters.
KM3NeT DAQ data structures and auxiliaries.
const JK40Rates & getK40Rates()
Get K40 rates.
Dynamic detector calibration.
Data structure for coverage of detector by dynamical calibrations.
Auxiliary class for recursive type list generation.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for K40 rates.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary base class for file name.