1#ifndef JSHOWERFIT_INCLUDE
2#define JSHOWERFIT_INCLUDE
78 using JRegressor_t::operator();
95 const std::string pdfFile,
106 JRegressor_t::debug =
debug;
107 JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
108 JRegressor_t::Vmax_npe = parameters.
Vmax_npe;
109 JRegressor_t::MAXIMUM_ITERATIONS = 1000;
110 JRegressor_t::EPSILON = 1e-3;
111 JRegressor_t::EPSILON_ABSOLUTE =
true;
113 this->parameters.resize(3);
119 this->estimator.reset(getMEstimator(parameters.
mestimator));
144 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
154 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
156 top.insert(i->getPMTIdentifier());
166 for (JDetectorSubset_t::const_iterator module = subdetector.begin();
167 module != subdetector.end(); ++module) {
175 for (
size_t i = 0; i != dom.size(); ++i) {
184 const size_t count = top.count(
id);
186 buffer.push_back(
JPMTW0(dom.
getPMT(i), rate_Hz, count));
192 shower->getE()), buffer.begin(), buffer.end());
194 double NDF =
getCount(buffer.begin(), buffer.end()) - this->parameters.size();
196 JShower3E sh_fit(this->value.getPosition(), this->value.getDirection(),
197 this->value.getT(),
correct(this->value.getE()));
204 NDF, sh_fit.
getE()));
205 out.rbegin()->setV(this->V.size(), this->V);
Algorithms for hit clustering and sorting.
Auxiliary class to extract a subset of optical modules from a detector.
Data structure for detector geometry and calibration.
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.
Data regression method for JFIT::JShower3EZ.
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.
Detector subset without binary search functionality.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
void rotate(const JRotation3D &R)
Rotate module.
const JPMT & getPMT(const int index) const
Get PMT.
Data structure for fit of energy.
Data structure for set of track fit results.
Fit method based on the Levenberg-Marquardt method.
Data structure for fit of straight line in positive z-direction with energy.
static parameter_type pE()
static parameter_type pDY()
static parameter_type pDX()
Auxiliary class for correction of energy determined by JShowerEnergy.cc.
JAxis3D & rotate_back(const JRotation3D &R)
Rotate back axis.
const JPosition3D & getPosition() const
Get position.
JTime & add(const JTime &value)
Addition operator.
double getE() const
Get energy.
Data structure for vector in three dimensions.
Data structure for normalised vector in positive z-direction.
const JClass_t & getReference() const
Get reference to object.
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
const JSummaryRouter & summary
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JFIT::JEvt &in)
Declaration of the member function that actually performs the reconstruction.
JShowerFit(const JShowerFitParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string pdfFile, const JShowerEnergyCorrection &correct, const int debug=0)
Parameterized constructor.
JRegressor< JShower3EZ, JGandalf > JRegressor_t
const JShowerEnergyCorrection & correct
const JModuleRouter & router
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
double getRate() const
Get default rate.
const JDAQSummaryFrame & getSummaryFrame() const
Get default summary frame.
Data storage class for rate measurements of all PMTs in one module.
static const int JSHOWERCOMPLETEFIT
static const int JSHOWERFIT_ENERGY
uncorrected energy [GeV] from JShowerFit.cc
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
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.
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.
bool is_valid(const json &js)
Check validity of JSon data.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
static const int PMT_DISABLE
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
JHistory & add(const int type)
Add event to history.
Auxiliary class to match data points with given model.
Auxiliary class for handling PMT geometry, rate and response.
Template definition of a data regressor of given model.
Data structure for fit parameters.
double Vmax_npe
maximum number of of photo-electrons
int mestimator
M-estimator
double DMax_m
maximal distance to optical module [m]
double TMax_ns
maximum time for local coincidences [ns]
double TMin_ns
minimum time for local coincidences [ns]
double DStep_m
step increase for the distance to optical module [m]