50{
54
59 typedef JReconstruction_t::JParameters_t JParameters_t;
60 typedef JReconstruction_t::JStorage_t JStorage_t;
61
64 JLimit_t& numberOfEvents = inputFile.getLimit();
65 string detectorFile;
66 JCalibration_t calibrationFile;
67 double Tmax_s;
68 string pdfFile;
69 JParameters_t parameters;
73 size_t threads;
75
76 try {
77
78 JParser<> zap(
"Program to perform reconstruction of muon trajectory for ORCA detector.");
79
85 zap[
'T'] =
make_field(Tmax_s,
"dynamical update time [s]") = 100.0;
91 zap[
'N'] =
make_field(threads,
"number of threads") = 0;
93
94 zap(argc, argv);
95 }
96 catch(const exception& error) {
97 FATAL(error.what() << endl);
98 }
99
100
102
104
105 try {
107 }
110 }
111
112 unique_ptr<JDynamics> dynamics;
113
114 if (!calibrationFile.empty()) {
115
116 try {
117
119
120 dynamics->load(calibrationFile);
121 }
122 catch(const exception& error) {
124 }
125 }
126
129
131
132 {
134
136
137 const JStorage_t storage(pdfFile, parameters);
138
139 JReconstruction_t fit(parameters, storage, rates_Hz, pmtParameters, correct,
debug);
140
142
144
145 while (in.hasNext()) {
146
147 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
148
150
151 summary.update(*tev);
152
153 if (dynamics) {
154 dynamics->update(*tev);
155 }
156
157 auto input = fit.getInput(router, summary, *tev, dynamics ? dynamics->getCoverage() :
coverage_type());
158
159 if (threads > 0)
160 fits.enqueue(input);
161 else
163
165 }
167 }
168
170
172
174}
#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.
Auxiliary class for correction of energy determined by JEnergy.cc.
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.
ORCA muon reconstruction.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary base class for file name.