Fit function.
196 {
199
201
203
204
205
207
209
211
213
215
217 }
218
219 in.erase(__end, in.end());
220 }
221
222 if (!in.empty()) {
224 }
225
227
229
230 double getZ() const { return z; }
231 double getP()
const {
return p; }
232
233 double z;
234 double p;
235 };
236
237 for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
238
241
243
244 for (const auto& module : input.data) {
245
247
248 pos.transform(R, tz.getPosition());
249
251
252 const double z = pos.getZ() - pos.getX() /
getTanThetaC();
254
255 const double p = module.getProbability(rates_Hz.getMultiplesRates(), T_ns + t);
256
257 data.push_back({ z, p });
258 }
259 }
260
261 double Zmin = 0.0;
262 double Zmax = 0.0;
263
265
267
268 vector<JHit_t>::const_iterator q1 = start.find(
data. begin(),
data. end());
269 vector<JHit_t>::const_reverse_iterator q2 = start.find(
data.rbegin(),
data.rend());
270
271 if (q1 !=
data.end() && q2 !=
data.rend()) {
272
273 vector<JHit_t>::const_iterator
p1 = q1;
if (
p1 !=
data. begin()) { --
p1; }
274 vector<JHit_t>::const_reverse_iterator p2 = q2;
if (p2 !=
data.rbegin()) { --p2; }
275
276 Zmin = 0.5 * (
p1->getZ() + q1->getZ());
277 Zmax = 0.5 * (p2->getZ() + q2->getZ());
278 }
279 }
280
282
283 fit.push_back(event());
284
285 out.push_back(fit);
286
287
288
294 }
295
296
297
299
300 copy(input.in.begin(), input.in.end(), back_inserter(out));
301
302 return out;
303 }
Data structure for fit of straight line paralel to z-axis.
Data structure for position in three dimensions.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
static const int JSTART_ZMAX_M
end position of track see JRECONSTRUCTION::JMuonStart
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration of this event
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
static const int JSTART_ZMIN_M
start position of track see JRECONSTRUCTION::JMuonStart
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration of this event
double getP(const double E1, const double E2, const double ED, const int M_min, const int M_max)
Get coincidence probability of two PMTs within one module due to random background.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
double getKappaC()
Get average R-dependence of arrival time of Cherenkov light (a.k.a.
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JPosition3D getPosition(const JFit &fit)
Get position.
void copy(const JFIT::JEvt::const_iterator __begin, const JFIT::JEvt::const_iterator __end, Evt &out)
Copy tracks.
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
JDirection3D getDirection(const JFit &fit)
Get direction.
JEvt::iterator gridify(JEvt::iterator __begin, JEvt::iterator __end, const int N)
Gridify set of fits.
Auxiliary class to test history.
size_t numberOfPrefits
number of prefits
int Nmax2
maximal number for twofold observations
double Pmin1
minimal probability single observation
double Pmin2
minimal probability for twofold observations
size_t numberOfPostfits
number of postfits
Auxiliary class for start or end point evaluation.
Auxiliary class to set-up Hit.