1#ifndef JSHOWERDIRECTIONPREFIT_INCLUDE 
    2#define JSHOWERDIRECTIONPREFIT_INCLUDE 
   79    public JRegressor<JShower3EZ, JAbstractMinimiser>
 
   85    using JRegressor_t::operator();
 
  130                           const storage_type&                         storage,
 
  131                           const int                                   debug = 0):
 
  137      JRegressor_t::debug  = 
debug;
 
  138      JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
 
  147      for (
int i = 0; i != 
En; ++i) {
 
 
  173      const JBuildL0 <JHitR0>   buildL0;
 
  180      for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
 
  182        if (router.
hasModule(i->getModuleID())) {
 
  184          buffer(*i, router.
getModule(i->getModuleID()));
 
  186          buildL0(buffer, back_inserter(data[i->getModuleID()]));
 
  191        if (!module.empty()) {
 
 
  222      for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
 
  227        const double      time = shower->getT(); 
 
  229        for (
const auto& module : input.
data) {
 
  238            for (
size_t i = 0; i != 
module->size(); ++i) {
 
  239              if (module.getStatus(i)) {
 
  244                    return (hit.
getPMT() == pmt && T_ns(hit.
getT()));
 
  250                } match = { JRegressor_t::T_ns + t1, i };
 
  252                JPMT pmt = 
module->getPMT(i);
 
  256                data.push_back(
JPMTW0(pmt, module.frame.getRate(i), count_if(module.begin(), module.end(), match)));
 
  264        for (vector<JPMTW0>::const_iterator i = data.begin(); i != data.end(); ++i) {
 
  265          if (i->getN() != 0) start_dir.
add(i->getPosition());
 
  274        for (JOmega3D_t::const_iterator dir = scan_directions.begin(); dir != scan_directions.end(); ++dir) {
 
  280          for (vector<JPMTW0>::const_iterator i = data.begin(); i != data.end(); ++i) {  
 
  285            JNPE_t::result_type H1 = (*this).getH1(sh, pmt);
 
  286            JNPE_t::result_type H0 = (*this).getH0(pmt.
getR());  
 
  287            const bool hit = pmt.
getN() != 0;
 
  291            for (
size_t j=0; 
j!=chi2.size(); ++
j) {
 
  301          auto p = std::min_element(chi2.begin(), chi2.end());
 
  307                               Ev[p-chi2.begin()]));
 
  320      copy(input.
in.begin(), input.
in.end(), back_inserter(out));
 
 
 
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.
 
JVector3D & add(const JVector3D &vector)
Add vector.
 
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.
 
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
 
std::vector< module_type > detector_type
 
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
 
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
Get default summary frame.
 
Reduced data structure for L0 hit.
 
JPMT_t getPMT() const
Get PMT.
 
double getT() const
Get calibrated time of hit.
 
2-dimensional frame with time calibrated data from one optical module.
 
Data storage class for rate measurements of all PMTs in one module.
 
static const int JSHOWERDIRECTIONPREFIT
 
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration from any Jpp application
 
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration from any Jpp application
 
void copy(const Head &from, JHead &to)
Copy header from from to to.
 
double getChi2(const double P)
Get chi2 corresponding to given probability.
 
JTrack3E JShower3E
Type definition of 3D shower with energy.
 
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.
 
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 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]