Fit function.
180 {
183
185
187
190
191
192
194
196
197 if (!in.empty()) {
199 }
200
201 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
202
204
206
208
209 data.reserve(dataL0.size() + dataL1.size());
210
211 for (buffer_type::const_iterator i = dataL1.begin(); i != dataL1.end(); ++i) {
212
213 if (match(*i)) {
215 }
216 }
217
218 buffer_type::iterator __end =
data.end();
219
220 for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
222 if (match(*i)) {
224 }
225 }
226 }
227
228 const int NDF =
getCount(
data.begin(),
data.end()) - this->parameters.size();
229
230 if (NDF > 0) {
231
232 double chi2 = (*this)(vx,
data.begin(),
data.end());
233
235
237
238
239
242 }
243 }
244
245
247
248 auto __end = out.begin();
249
251
253 out.end(),
254 [](
const JFit& fit) { return fit.getQ(); },
255 [](
const JFit& first,
const JFit& second) { return getPoint(first).get4Distance(getPoint(second)); },
258
259 } else {
260
262
264 }
265
266 out.erase(__end, out.end());
267
268 } else {
269
271 }
272
273 copy(input.in.begin(), input.in.end(), back_inserter(out));
274
275 return out;
276 }
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 of this event
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration of this event
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
T watershed(T __begin, T __end, const JFunction_t &getValue, const JDistance_t &getDistance, double Y, int N=std::numeric_limits< int >::max())
Watershed algorithm.
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.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
Auxiliary class to test history.
Auxiliary class to match data points with given model.
double TMin_ns
minimum time for local coincidences [ns]
double Qwatershed
quality threshold
double TMax_ns
maximum time for local coincidences [ns]
double DMax_m
maximal distance to optical module [m]
size_t numberOfPostfits
number of postfits
size_t numberOfPrefits
number of prefits