1#ifndef __JRECONSTRUCTION__JMUONGANDALF__
2#define __JRECONSTRUCTION__JMUONGANDALF__
80 using JRegressor_t::operator();
94 const std::string& pdf_file,
95 const int debug = 0) :
101 using namespace JFIT;
107 JRegressor_t::debug =
debug;
110 JRegressor_t::MAXIMUM_ITERATIONS =
NMax;
112 this->parameters.resize(5);
132 using namespace JFIT;
139 buildL0(event,
router,
true, back_inserter(dataL0));
141 return (*
this)(dataL0, in);
155 using namespace JFIT;
160 for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
177 for (buffer_type::const_iterator i = data.begin(); i != data.end(); ++i) {
184 buffer.push_back(hit);
195 const int NDF =
distance(buffer.begin(), __end) - this->parameters.size();
201 if (track->getE() > 0.1)
202 JRegressor_t::E_GeV = track->getE();
206 const double chi2 = (*this)(
JLine3Z(tz), buffer.begin(), __end);
212 for (
size_t i = 0; i != this->V.size(); ++i) {
213 if (std::isnan(this->V(i,i)) || this->V(i,i) < 0.0) {
228 out.rbegin()->setV(this->V.size(), this->V);
230 out.rbegin()->setW(track->getW());
231 out.rbegin()->setW(
JGANDALF_BETA0_RAD, sqrt(this->error.getDX() * this->error.getDX() +
232 this->error.getDY() * this->error.getDY()));
233 out.rbegin()->setW(
JGANDALF_BETA1_RAD, sqrt(this->error.getDX() * this->error.getDY()));
Basic data structure for L0 hit.
Data regression method for JFIT::JLine3Z.
General purpose messaging.
Direct access to module in detector data structure.
Auxiliary class to define a range between two values.
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.
Fit method based on the Levenberg-Marquardt method.
Data structure for fit of straight line paralel to z-axis.
static parameter_type pY()
static parameter_type pX()
static parameter_type pT()
Data structure for fit of straight line in positive z-direction.
static parameter_type pDY()
static parameter_type pDX()
JAxis3D & rotate_back(const JRotation3D &R)
Rotate back axis.
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Auxiliary class for a hit with background rate value.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
double getRate() const
Get default rate.
Data structure for L0 hit.
static const int JMUONGANDALF
static const int JGANDALF_LAMBDA
control parameter from JGandalf.cc
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
static const int JGANDALF_NUMBER_OF_ITERATIONS
number of iterations from JGandalf.cc
static const int JGANDALF_BETA1_RAD
angular resolution [rad] from JGandalf.cc
static const int JGANDALF_NUMBER_OF_HITS
number of hits from JGandalf.cc
static const int JGANDALF_CHI2
chi2 from JGandalf.cc
Auxiliary classes and methods for linear and iterative data regression.
JTOOLS::JRange< double > JZRange
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.
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 classes and methods for triggering.
Model for fit to acoustics data.
JHistory & add(const int type)
Add event to history.
Template definition of a data regressor of given model.
Data structure for fit parameters.
double TTS_ns
transition-time spread [ns]
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double roadWidth_m
road width [m]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
double VMax_npe
maximum number of of photo-electrons
double ZMax_m
maximal z-positon [m]
double ZMin_m
minimal z-positon [m]
int NMax
maximum number of iterations
Wrapper class to make final fit of muon trajectory.
JEvt operator()(const buffer_type &data, const JEvt &in)
Fit function.
std::vector< hit_type > buffer_type
JTRIGGER::JHitL0 hit_type
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JEvt &in)
Fit function.
const JModuleRouter & router
JRegressor< JLine3Z, JGandalf > JRegressor_t
JMuonGandalf(const JMuonGandalfParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string &pdf_file, const int debug=0)
Constructor.
const JSummaryRouter & summary
Auxiliary data structure for sorting of hits.