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
205
206 data.reserve(dataL0.size() + dataL1.size());
207 for (buffer_type::const_iterator i = dataL1.begin(); i != dataL1.end(); ++i) {
208
209 if (match(*i)) {
211 }
212 }
213
214 buffer_type::iterator __end =
data.end();
215
216 for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
218 if (match(*i)) {
220 }
221 }
222 }
223
224 const int NDF =
getCount(
data.begin(),
data.end()) - this->parameters.size();
225
226 if (NDF > 0) {
227
228 double chi2 = (*this)(vx,
data.begin(),
data.end());
229
230 JShower3E sh_fit(this->value.getPosition(),
232 this->value.getT(),
233 shower->getE());
235
236
239 }
240 }
241
242
243
245
246 copy(input.in.begin(), input.in.end(), back_inserter(out));
247
248 return out;
249 }
Data structure for vertex fit.
Data structure for direction in three dimensions.
int getModuleID() const
Get module identifier.
static const int JSHOWERPOINTSIMPLEX
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.
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.
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