Fit function.
219 {
220
222 using namespace JFIT;
224
227
229
230
231
233
235
236 if (!in.empty()) {
238 }
239
240 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
241
243
245
247
248 for (buffer_type::const_iterator i =
data.begin(); i !=
data.end(); ++i) {
249
250 if (match(*i)) {
251 buffer.push_back(*i);
252 }
253 }
254
255
256
258
260
261 const int NDF =
distance(buffer.begin(), __end) - this->parameters.size();
262
263 if (NDF > 0) {
264
265
267
269
270 double chi2 = (*this)(sh, buffer.begin(), __end);
271
273
274
276
277 const size_t N = this->V.size();
278
279 TMatrixDSym M(N);
280
281 for (size_t row = 0; row != N; ++row) {
282 for (size_t col = 0; col != N; ++col) {
283 M(row,col) = this->V(row,col);
284 }
285 }
286
287 const TMatrixDSymEigen E(M);
288 const TVectorD& Y = E.GetEigenValues();
289
290 out.rbegin()->setV(this->V.size(), this->V);
291
294
295
298
299 }
300 }
301 }
302
303
304
306
307 copy(input.in.begin(), input.in.end(), back_inserter(out));
308
309 return out;
310 }
Data structure for vertex fit.
Data structure for vertex fit.
Data structure for direction in three dimensions.
static const int JSHOWERPOSITIONFIT_LAMBDA
largest eigenvalue of error matrix for vertex fit see JRECONSTRUCTION::JShowerPositionFit
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration of this event
static const int JSHOWERPOSITIONFIT_ISOTROPIC_ENERGY
isotropic shower energy [GeV] see JRECONSTRUCTION::JShowerPositionFit
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration of this event
Auxiliary classes and methods for linear and iterative data regression.
Auxiliary classes and methods for 3D geometrical objects and operations.
double getQuality(const double chi2, const int N, const int NDF)
Get quality of fit.
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.
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=SINGLE_STAGE)
Get fit.
Auxiliary class to test history.
Auxiliary class to match data points with given model.
size_t numberOfPrefits
number of prefits
double DMax_m
maximal distance to optical module [m]
Auxiliary data structure for sorting of hits.