Fit function.
199 {
202
204
206
208
210
211 if (!in.empty()) {
213 }
214
215 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
216
218
220 const double time = shower->getT();
223
224 for (const auto& module : input.data) {
225
227
228 pos.sub(vertex);
229
231
232 for (size_t i = 0; i != module->size(); ++i) {
233
234 if (module.getStatus(i)) {
235
237
238 struct {
239
241 {
242 return (hit.
getPMT() == pmt && T_ns(hit.
getT()));
243 }
244
246 const size_t pmt;
247
248 } match = { JRegressor_t::T_ns + t1, i };
249
251
253
254 const size_t ns = count_if(module.begin(), module.end(), match);
255 const double QE = wip.
QE;
256
257 JPMT pmt =
module->getPMT(i);
258
261
262 data.push_back(
JPMTW0(pmt, QE, module.frame.getRate(i), ns));
263 }
264 }
265 }
266 }
267
268
270 shower->getE()),
data.begin(),
data.end());
271
273
275
276
277 bool status = true;
278
279 for (size_t i = 0; i != this->V.size(); ++i) {
280 if (std::isnan(this->V(i,i)) || this->V(i,i) < 0.0) {
281 status = false;
282 }
283 }
284
285 if (status) {
286
288
289 result.add(vertex.getPosition());
290
292
293 out.rbegin()->setV(this->V.size(), this->V);
297 }
298 }
299
300
301
303
304 copy(input.in.begin(), input.in.end(), back_inserter(out));
305
306 return out;
307 }
const JPMTParameters & getPMTParameters(const JPMTIdentifier &id) const
Get PMT parameters.
Data structure for PMT parameters.
double QE
relative quantum efficiency
Data structure for PMT geometry, calibration and status.
Data structure for fit of straight line in positive z-direction with energy.
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
Data structure for position in three dimensions.
Data structure for vector in three dimensions.
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Data structure for normalised vector in positive z-direction.
JEvt operator()(const input_type &input)
Fit function.
Reduced data structure for L0 hit.
JPMT_t getPMT() const
Get PMT.
double getT() const
Get calibrated time of hit.
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration of this event
static const int JSHOWERFIT_ENERGY
uncorrected energy [GeV] see JRECONSTRUCTION::JShowerFit
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.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
const double getInverseSpeedOfLight()
Get inverse speed of light.
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.
JDirection3D getDirection(const JFit &fit)
Get direction.
Auxiliary class to test history.
Auxiliary class for handling PMT geometry, rate and response.
double DMax_m
maximal distance to optical module [m]
double DStep_m
step increase for the distance to optical module [m]
size_t numberOfPrefits
number of prefits