1#ifndef JSHOWERPOSITIONFIT_INCLUDE
2#define JSHOWERPOSITIONFIT_INCLUDE
87 using JRegressor_t::operator();
129 const storage_type& storage,
130 const int debug = 0):
136 JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
138 JRegressor_t::MAXIMUM_ITERATIONS =
NMax;
139 JRegressor_t::EPSILON = 1e-3;
140 JRegressor_t::debug =
debug;
148 for (
int i = 0; i !=
En; ++i) {
152 this->parameters.resize(5);
185 buildL0(
JDAQTimeslice(event,
true), router, back_inserter(data));
187 for (
const auto& hit : data) {
201 using namespace JFIT;
219 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
227 for (buffer_type::const_iterator i = data.begin(); i != data.end(); ++i) {
230 buffer.push_back(*i);
240 const int NDF =
distance(buffer.begin(), __end) - this->parameters.size();
247 double chi2 = (*this)(sh, buffer.begin(), __end);
250 this->value.getT(), this->value.getE());
252 out.push_back(
getFit(
JHistory(shower->getHistory(), event()), sh_fit,
267 copy(input.
in.begin(), input.
in.end(), back_inserter(out));
Algorithms for hit clustering and sorting.
Coverage of dynamical detector calibration.
Auxiliary class to extract a subset of optical modules from a detector.
Data structure for detector geometry and calibration.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Basic data structure for L0 hit.
Basic data structure for L1 hit.
Reduced data structure for L1 hit.
Match operator for Cherenkov light from shower in any direction.
Direct access to module in detector data structure.
Auxiliary class to define a range between two values.
Data regression method for JFIT::JPoint4E from a bright point isoptropic emission PDF.
Basic data structure for time and time over threshold information of hit.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Router for direct addressing of module data in detector data structure.
Data structure for set of track fit results.
void select(const JSelector_t &selector)
Select fits.
Fit method based on the Levenberg-Marquardt method.
Data structure for vertex fit.
Data structure for vertex fit.
static parameter_type pZ()
static parameter_type pX()
static parameter_type pY()
static parameter_type pE()
static parameter_type pT()
Data structure for direction in three dimensions.
double getE() const
Get energy.
Auxiliary class for a hit with background rate value.
class to handle the second position fit of the shower reconstruction, mainly dedicated for ORCA
JRegressor< JPoint4E, JGandalf > JRegressor_t
JEvt operator()(const input_type &input)
Fit function.
JShowerPositionFit(const JShowerPositionFitParameters_t ¶meters, const storage_type &storage, const int debug=0)
Parameterized constructor.
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< hit_type > buffer_type
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
double getRate(const JDAQPMTIdentifier &id, const double rate_Hz) const
Get rate.
static const int JSHOWERPOSITIONFIT
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.
Auxiliary classes and methods for linear and iterative data regression.
Auxiliary classes and methods for 3D geometrical objects and operations.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
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 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.
Auxiliary class to match data points with given model.
Template definition of a data regressor of given model.
double VMax_npe
maximum number of of photo-electrons
double TMin_ns
minimum time for local coincidences [ns]
size_t numberOfPrefits
number of prefits
double Emax_GeV
maximum energy to scan
int NMax
maximum number of iterations
double TMax_ns
maximum time for local coincidences [ns]
double Emin_GeV
minimum energy to scan
int En
number of points to scan in energy range
double DMax_m
maximal distance to optical module [m]
Auxiliary data structure for sorting of hits.