1#ifndef JSHOWERPOSITIONFIT_INCLUDE
2#define JSHOWERPOSITIONFIT_INCLUDE
87 using JRegressor_t::operator();
132 const storage_type& storage,
134 const int debug = 0):
141 JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
143 JRegressor_t::MAXIMUM_ITERATIONS =
NMax;
144 JRegressor_t::EPSILON = 1e-3;
145 JRegressor_t::debug =
debug;
153 for (
int i = 0; i !=
En; ++i) {
157 this->parameters.resize(5);
192 buildL0(
JDAQTimeslice(event,
true), router, back_inserter(data));
194 for (
const auto& hit : data) {
200 const int type = wip.
getType();
201 const double QE = wip.
QE;
202 const double R_Hz = summary.
getRate(hit.getPMTIdentifier(), this->R_Hz);
218 using namespace JFIT;
236 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
244 for (buffer_type::const_iterator i = data.begin(); i != data.end(); ++i) {
247 buffer.push_back(*i);
257 const int NDF =
distance(buffer.begin(), __end) - this->parameters.size();
266 double chi2 = (*this)(sh, buffer.begin(), __end);
284 copy(input.
in.begin(), input.
in.end(), back_inserter(out));
Algorithms for hit clustering and sorting.
Coverage of dynamical detector 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.
Router for direct addressing of module data in detector data structure.
Auxiliary class for map of PMT parameters.
const JPMTParameters & getPMTParameters(const JPMTIdentifier &id) const
Get PMT parameters.
Data structure for PMT parameters.
double QE
relative quantum efficiency
int getType() const
Get type for for time-slewing correction.
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.
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.
const JPMTParametersMap & pmtParameters
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
JShowerPositionFit(const JShowerPositionFitParameters_t ¶meters, const storage_type &storage, const JPMTParametersMap &pmtParameters, const int debug=0)
Parameterized constructor.
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
Get rate.
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
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.
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.
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 R_Hz
default rate [Hz]
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.