Fit function.
178 {
181
183
185
188
189
190
192
194
195 if (!in.empty()) {
197 }
198
199 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
200
202
204
206
207 data.reserve(dataL0.size() + dataL1.size());
208
209 for (buffer_type::const_iterator i = dataL1.begin(); i != dataL1.end(); ++i) {
210
211 if (match(*i)) {
213 }
214 }
215
216 buffer_type::iterator __end =
data.end();
217
218 for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
220 if (match(*i)) {
222 }
223 }
224 }
225
226 const int NDF =
getCount(
data.begin(),
data.end()) - this->parameters.size();
227
228 if (NDF > 0) {
229
230 double chi2 = (*this)(vx,
data.begin(),
data.end());
231
233
235
236
237
240 }
241 }
242
243
244
246
247 copy(input.in.begin(), input.in.end(), back_inserter(out));
248
249 return out;
250 }
Data structure for vertex fit.
Data structure for direction in three dimensions.
int getModuleID() const
Get module identifier.
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
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
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.
double TMin_ns
minimum time for local coincidences [ns]
double TMax_ns
maximum time for local coincidences [ns]
double DMax_m
maximal distance to optical module [m]
size_t numberOfPrefits
number of prefits