1#ifndef JSHOWERDIRECTIONPREFIT_INCLUDE
2#define JSHOWERDIRECTIONPREFIT_INCLUDE
79 public JRegressor<JShower3EZ, JAbstractMinimiser>
85 using JRegressor_t::operator();
131 const storage_type& storage,
132 const int debug = 0):
138 JRegressor_t::debug =
debug;
139 JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
148 for (
int i = 0; i !=
En; ++i) {
181 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
183 if (router.
hasModule(i->getModuleID())) {
185 buffer(*i, router.
getModule(i->getModuleID()));
223 for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
228 const double time = shower->getT();
239 for (
size_t i = 0; i !=
module->size(); ++i) {
240 if (
module.getStatus(i)) {
245 return (
hit.getPMT() == pmt && T_ns(
hit.getT()));
248 const JTimeRange T_ns;
251 } match = { JRegressor_t::T_ns + t1, i };
253 JPMT pmt =
module->getPMT(i);
266 if (i->getN() != 0)
start_dir.add(i->getPosition());
286 JNPE_t::result_type
H1 = (*this).getH1(sh, pmt);
287 JNPE_t::result_type
H0 = (*this).getH0(pmt.
getR());
288 const bool hit = pmt.
getN() != 0;
292 for (
size_t j=0;
j!=chi2.size(); ++
j) {
302 auto p = std::min_element(chi2.begin(), chi2.end());
308 Ev[p-chi2.begin()]));
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.
Basic data structure for L0 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.
Properties of KM3NeT PMT and deep-sea water.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Data structure for PMT geometry, calibration and status.
Data structure for fit of energy.
Data structure for set of track fit results.
void select(const JSelector_t &selector)
Select fits.
Data structure for fit of straight line in positive z-direction with energy.
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
Data structure for direction in three dimensions.
Direction set covering (part of) solid angle.
Data structure for position in three dimensions.
Data structure for vector in three dimensions.
double getLength() const
Get length.
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Data structure for normalised vector in positive z-direction.
const JClass_t & getReference() const
Get reference to object.
Template definition of a multi-dimensional oscillation probability interpolation table.
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
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< module_type > detector_type
JEvt operator()(const input_type &input)
Fit function.
JShowerDirectionPrefit(const JShowerDirectionPrefitParameters_t ¶meters, const storage_type &storage, const int debug=0)
Parameterized constructor.
JRegressor< JShower3EZ, JAbstractMinimiser > JRegressor_t
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
const JDAQSummaryFrame & getSummaryFrame(const JDAQModuleIdentifier &module) const
Get summary frame.
Reduced data structure for L0 hit.
Data storage class for rate measurements of all PMTs in one module.
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
double getChi2(const double P)
Get chi2 corresponding to given probability.
static const double PI
Mathematical constants.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
const double getInverseSpeedOfLight()
Get inverse speed of light.
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 for handling PMT geometry, rate and response.
int getN() const
Get number of hits.
double getR() const
Get rate.
Template definition of a data regressor of given model.
Auxiliary class for handling module response.
Data structure for fit parameters.
double scanAngle_deg
scanning angle step in [deg]
double Emin_GeV
minimum energy to scan
double TMin_ns
minimum time for local coincidences [ns]
double TMax_ns
maximum time for local coincidences [ns]
double R_Hz
default rate [Hz]
double Emax_GeV
maximum energy to scan
int En
number of points to scan in energy range
double VMax_npe
maximum number of of photo-electrons
size_t numberOfPrefits
number of prefits
double DMax_m
maximal distance to optical module [m]