1#ifndef __JRECONSTRUCTION__JMUONSTART__
2#define __JRECONSTRUCTION__JMUONSTART__
80 using JRegressor_t::operator();
126 const storage_type& storage,
128 const int debug = 0):
134 roadWidth_m = this->getRmax();
137 JRegressor_t::debug =
debug;
162 const JBuildL0 <JHitR0> buildL0;
169 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
171 if (router.
hasModule(i->getModuleID())) {
173 buffer(*i, router.
getModule(i->getModuleID()));
175 buildL0(buffer, back_inserter(data[i->getModuleID()]));
180 if (!module.empty()) {
219 in.erase(__end, in.end());
230 double getZ()
const {
return z; }
231 double getP()
const {
return p; }
237 for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
244 for (
const auto& module : input.
data) {
255 const double p =
module.getProbability(rates_Hz.getMultiplesRates(), T_ns + t);
257 data.push_back({ z, p });
268 vector<JHit_t>::const_iterator q1 = start.
find(data. begin(), data. end());
269 vector<JHit_t>::const_reverse_iterator q2 = start.
find(data.rbegin(), data.rend());
271 if (q1 != data.end() && q2 != data.rend()) {
273 vector<JHit_t>::const_iterator
p1 = q1;
if (
p1 != data. begin()) { --
p1; }
274 vector<JHit_t>::const_reverse_iterator p2 = q2;
if (p2 != data.rbegin()) { --p2; }
276 Zmin = 0.5 * (
p1->getZ() + q1->getZ());
277 Zmax = 0.5 * (p2->getZ() + q2->getZ());
283 fit.push_back(event());
300 copy(input.
in.begin(), input.
in.end(), back_inserter(out));
Coverage of dynamical detector calibration.
Auxiliary class to extract a subset of optical modules from a detector.
Data structure for detector geometry and calibration.
Data regression method for JFIT::JEnergy.
Basic data structure for L0 hit.
Reduced data structure for L1 hit.
Direct access to module in detector data structure.
Auxiliary method to locate start and end point of muon trajectory.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JModuleIdentifier &id) const
Has module.
const JModule & getModule(const JModuleIdentifier &id) const
Get module parameters.
Data structure for a composite optical module.
Data structure for fit of energy.
Data structure for set of track fit results.
void select(const JSelector_t &selector)
Select fits.
Data structure for track fit results with history and optional associated values.
Data structure for fit of straight line paralel to z-axis.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Data structure for position in three dimensions.
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
const JPosition3D & getPosition() const
Get position.
double getZ() const
Get z position.
double getX() const
Get x position.
const JClass_t & getReference() const
Get reference to object.
Auxiliary class to determine start and end position of muon trajectory.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
std::vector< module_type > detector_type
JEvt operator()(const input_type &input)
Fit function.
JRegressor< JEnergy > JRegressor_t
JMuonStart(const JMuonStartParameters_t ¶meters, const storage_type &storage, const JK40Rates &rates_Hz, const int debug=0)
Constructor.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
const JDAQSummaryFrame & getSummaryFrame(const JDAQModuleIdentifier &module) const
Get summary frame.
2-dimensional frame with time calibrated data from one optical module.
Data storage class for rate measurements of all PMTs in one module.
static const int JSTART_ZMAX_M
end position of track see JRECONSTRUCTION::JMuonStart
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration of this event
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
static const int JSTART_ZMIN_M
start position of track see JRECONSTRUCTION::JMuonStart
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration of this event
double getP(const double E1, const double E2, const double ED, const int M_min, const int M_max)
Get coincidence probability of two PMTs within one module due to random background.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
double getKappaC()
Get average R-dependence of arrival time of Cherenkov light (a.k.a.
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
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.
JDirection3D getDirection(const JFit &fit)
Get direction.
JEvt::iterator gridify(JEvt::iterator __begin, JEvt::iterator __end, const int N)
Gridify set of fits.
Auxiliary classes and methods for triggering.
Data structure for coverage of detector by dynamical calibrations.
double position
coverage of detector by available position calibration [0,1]
double orientation
coverage of detector by available orientation calibration [0,1]
Auxiliary class for historical event.
Auxiliary class to test history.
Template definition of a data regressor of given model.
Auxiliary class for K40 rates.
double getSinglesRate() const
Get singles rate.
Auxiliary class for handling module response.
Data structure for fit parameters.
double roadWidth_m
road width [m]
size_t numberOfPrefits
number of prefits
int Nmax2
maximal number for twofold observations
double Pmin1
minimal probability single observation
double Pmin2
minimal probability for twofold observations
size_t numberOfPostfits
number of postfits
Auxiliary class for start or end point evaluation.
T find(T __begin, T __end) const
Get start point of muon trajectory.
Auxiliary class to set-up Hit.