66{
70
72 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
77
80 JLimit_t& numberOfEvents = inputFile.getLimit();
83 double Tmax_s;
89
90 try {
91
93
94 JParser<> zap(
"Program to perform detector calibration using reconstructed muon trajectories.");
95
107
109 }
110 catch(const exception& error) {
112 }
113
114
117 }
118
121 }
122
124
125 try {
127 }
130 }
131
133
135
136 try {
137
139
141 }
142 catch(const exception& error) {
144 }
145 }
146
148
153 else
154 FATAL(
"No valid target; check option -R" <<
endl);
155
157
159
161
163
166
168
169
171
174
176
178
181
183
184
185 while (inputFile.hasNext()) {
186
188
189 multi_pointer_type ps = inputFile.next();
190
193
194 summary.update(*
tev);
195
198 }
199
201
203
205
206 for (JFIT::JEvt::const_iterator
track = in->begin();
track != in->end(); ++
track) {
207
211
214 }
215
217
218
219
221
222 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
223
225
227
230 }
231 }
232
233
234
236
238
239
240
241
242 if (
track->getE() > 0.1)
243 fit.JRegressor_t::E_GeV =
track->getE();
244 else
245 fit.JRegressor_t::E_GeV = parameters.
E_GeV;
246
248
249 for (JDataW0_t::const_iterator
hit =
data.begin();
hit != __end; ++
hit) {
251 }
252
254
255 for (const int index : buffer) {
256
257 JDataW0_t::iterator q =
partition(
data.begin(), __end, [
rpm, index](
const JHitW0&
hit) { return rpm->getIndex(hit.getModuleID()) != index; });
258
259 if (
distance(
data.begin(), q) - fit.parameters.size() > 0) {
260
262
263 for (JDataW0_t::const_iterator
hit = q;
hit != __end; ++
hit) {
264
265 const double t1 = fit.value.getT(
hit->getPosition());
267
269
270 ha.Fill(
hit->getToT(),
hit->getT1() - t1);
272
273 hr.Fill(fit.value.getDistance(*
hit), gradient.
getT());
274
275 h2.Fill(index,
hit->getT() - t1);
276
277 g1[
"T"]->Fill(index, gradient.
getT());
278 g1[
"X"]->Fill(index, gradient.
getX());
279 g1[
"Y"]->Fill(index, gradient.
getY());
280 g1[
"Z"]->Fill(index, gradient.
getZ());
281 }
282 }
283 }
284 }
285 }
287
289
291
295 out << h2;
297
298 out.Write();
299 out.Close();
300
302}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Double_t g1(const Double_t x)
Function.
Router for direct addressing of module data in detector data structure.
Data structure for set of track fit results.
void select(const JSelector_t &selector)
Select fits.
Data structure for fit of straight line paralel to z-axis.
Data structure for fit of straight line in positive z-direction.
JAxis3D & rotate_back(const JRotation3D &R)
Rotate back axis.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Auxiliary class for a hit with background rate value.
File router for fast addressing of summary data.
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
JDirection3D getDirection(const Vec &dir)
Get direction.
JPosition3D getPosition(const Vec &pos)
Get position.
static const std::string string_t
string
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
const char *const module_t
routing by module
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
JTOOLS::JRange< double > JZRange
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.
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
KM3NeT DAQ data structures and auxiliaries.
Interface for routing module identifier to index and vice versa.
Dynamic detector calibration.
Auxiliary class to match data points with given model.
Auxiliary class for recursive type list generation.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Data structure for fit parameters.
double TTS_ns
transition-time spread [ns]
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double roadWidth_m
road width [m]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
double ZMax_m
maximal z-positon [m]
double ZMin_m
minimal z-positon [m]
double R_Hz
default rate [Hz]
size_t numberOfPrefits
number of prefits
Wrapper class to make final fit of muon trajectory.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for sorting of hits.