Fit function.
198 {
199
201 using namespace JFIT;
203
206
208
209
210
212
214
215 if (!in.empty()) {
217 }
218
219 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
220
222
224
226
227 for (buffer_type::const_iterator i =
data.begin(); i !=
data.end(); ++i) {
228
229 if (match(*i)) {
230 buffer.push_back(*i);
231 }
232 }
233
234
235
237
239
240 const int NDF =
distance(buffer.begin(), __end) - this->parameters.size();
241
242 if (NDF > 0) {
243
244
247 double chi2 = (*this)(sh, buffer.begin(), __end);
248
250 this->value.getT(), this->value.getE());
251
252 out.push_back(
getFit(
JHistory(shower->getHistory(), event()), sh_fit,
254
255
258
259 }
260 }
261 }
262
263
264
266
267 copy(input.in.begin(), input.in.end(), back_inserter(out));
268
269 return out;
270 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Data structure for vertex fit.
Data structure for vertex fit.
Data structure for direction in three dimensions.
static const int JSHOWERPOSITIONFIT
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration from any Jpp application
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration from any Jpp application
void copy(const Head &from, JHead &to)
Copy header from from to to.
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.
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.