1 #ifndef __JRECONSTRUCTION__JMUONGANDALF__
2 #define __JRECONSTRUCTION__JMUONGANDALF__
48 namespace JRECONSTRUCTION {}
49 namespace JPP {
using namespace JRECONSTRUCTION; }
51 namespace JRECONSTRUCTION {
80 using JRegressor_t::operator();
94 const std::string& pdf_file,
95 const int debug = 0) :
112 this->parameters.resize(5);
138 buildL0(event,
router,
true, back_inserter(dataL0));
140 return (*
this)(dataL0,
in);
158 for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
174 for (buffer_type::const_iterator i = data.begin(); i != data.end(); ++i) {
183 buffer.push_back(hit);
189 sort(buffer.begin(), buffer.end(),
compare);
200 if (track->getE() > 0.1)
205 const double chi2 = (*this)(
JLine3Z(tz), buffer.begin(), __end);
215 out.rbegin()->setW(track->getW());
216 out.rbegin()->setW(
JGANDALF_BETA0_RAD, sqrt(this->error.getDX() * this->error.getDX() +
217 this->error.getDY() * this->error.getDY()));
218 out.rbegin()->setW(
JGANDALF_BETA1_RAD, sqrt(this->error.getDX() * this->error.getDY()));
233 static const struct {
246 using namespace KM3NETDAQ;
248 if (equal_to<JDAQPMTIdentifier>()(first, second))
249 return less<JHit>()(first, second);
251 return less<JDAQPMTIdentifier>()(first, second);
static int debug
debug level (default is off).
Data regression method for JFIT::JLine3Z.
Template definition of a data regressor of given model.
const JModuleRouter & router
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.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
double getRate() const
Get default rate.
static const int JGANDALF_BETA1_RAD
angular resolution [rad] from JGandalf.cc
JMuonGandalf(const JMuonGandalfParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string &pdf_file, const int debug=0)
Constructor.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Template specialisation of class JModel to match hit with muon trajectory along z-axis.
Data structure for fit of straight line in positive z-direction.
JRegressor< JLine3Z, JGandalf > JRegressor_t
static parameter_type pT()
double getQuality(const double chi2, const int N, const int NDF)
Get quality of fit.
JTRIGGER::JHitL0 hit_type
Wrapper class to make final fit of muon trajectory.
std::vector< hit_type > buffer_type
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
const JSummaryRouter & summary
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
Basic data structure for L0 hit.
static const int JGANDALF_NUMBER_OF_HITS
number of hits from JGandalf.cc
static parameter_type pDX()
static const int JGANDALF_LAMBDA
control parameter from JGandalf.cc
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
static const int JMUONGANDALF
do set_variable OUTPUT_DIRECTORY $WORKDIR T
double E_GeV
Energy of muon at vertex [GeV].
Auxiliary class for a hit with background rate value.
static struct JRECONSTRUCTION::JMuonGandalf::@51 compare
Auxiliary data structure for sorting of hits.
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v1.2.3-3-g5bd09ee https://git.km3net.de/common/km3net-dataformat.
Router for fast addressing of summary data in JDAQSummaryslice data structure as a function of the op...
static parameter_type pY()
Data structure for fit parameters.
then usage $script[distance] fi case set_variable R
General purpose messaging.
static parameter_type pDY()
Direct access to module in detector data structure.
Fit method based on the Levenberg-Marquardt method.
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=0)
Get fit.
static parameter_type pX()
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
Data structure for set of track fit results.
Regressor function object for JLine3Z fit using JGandalf minimiser.
Auxiliary class to define a range between two values.
static double Vmax_npe
Maximal integral of PDF [npe].
Data structure for L0 hit.
JEvt operator()(const buffer_type &data, const JEvt &in)
Fit function.
static const int JGANDALF_NUMBER_OF_ITERATIONS
number of iterations from JGandalf.cc
Data structure for fit of straight line paralel to z-axis.
JDirection3D getDirection(const Vec &v)
Get direction.
static int MAXIMUM_ITERATIONS
maximal number of iterations
static const int JGANDALF_CHI2
chi2 from JGandalf.cc
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JEvt &in)
Fit function.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
JTOOLS::JRange< double > JZRange
JPosition3D getPosition(const Vec &v)
Get position.