1#ifndef JSHOWERPREFIT_INCLUDE 
    2#define JSHOWERPREFIT_INCLUDE 
  128      buildL0(
JDAQTimeslice(event, 
true),  router, back_inserter(buffer));  
 
  129      buildL2(
JDAQTimeslice(event, 
false), router, back_inserter(dataL1));  
 
  131      copy(dataL1.begin(), dataL1.end(), back_inserter(dataL0));
 
  134        for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
 
  136            dataL0.push_back(*i); 
 
 
  153      const double STANDARD_DEVIATIONS       = 3.0;
 
  166      for (buffer_type::const_iterator 
root = dataL1.begin(); 
root != dataL1.end(); ++
root) {
 
  172        for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
 
  174          if(( 
root->getModuleIdentifier() != i->getModuleIdentifier() ) && matching(*i)){
 
  179        buffer_type::iterator __end1 = 
clusterizeWeight(data.begin() + 1, data.end(), match3G);
 
  184        double    chi2 = numeric_limits<double>::max();
 
  185        int       NDF  = 
distance(data.begin(), __end1) - JEstimator_t::NUMBER_OF_PARAMETERS;
 
  186        int       N    = 
getCount(data.begin(), __end1);
 
  191            double ymin = numeric_limits<double>::max();
 
  193            buffer_type::iterator __end2 = __end1;
 
  196                   JEstimator_t::NUMBER_OF_PARAMETERS; ++
n, --__end2) {
 
  203                  fit(data.begin(), __end2);
 
  211                    NDF  = 
distance(data.begin(), __end2) - JEstimator_t::NUMBER_OF_PARAMETERS;
 
  219              ymin -= STANDARD_DEVIATIONS * STANDARD_DEVIATIONS;
 
  224            const int number_of_outliers = 
distance(data.begin(), __end1) - JEstimator_t::NUMBER_OF_PARAMETERS - 1;
 
  226            buffer_type::iterator __end2 = __end1;
 
  228            for (
int n = 0; 
n <= number_of_outliers; ++
n) {       
 
  232                fit(data.begin(), __end2);
 
  235                NDF  = 
distance(data.begin(), __end2) - JEstimator_t::NUMBER_OF_PARAMETERS;
 
  242              buffer_type::iterator imax = __end2;
 
  244              for (buffer_type::iterator i = data.begin() + 1; i != __end2; ++i) {
 
  254              if (ymax > STANDARD_DEVIATIONS * STANDARD_DEVIATIONS) {   
 
  256                swap(*imax, *__end2);     
 
  275      size_t solutions = out.size();
 
  277      for(
size_t i=0; i < solutions; i++){
 
  282                if (x != 0 || y != 0 || z != 0 || t != 0) {
 
  284                  out.push_back(
getFit(event(),
 
  306        JFIT::JEvt::iterator __end = out.end();
 
  314          out.erase(__end, out.end());
 
 
 
Algorithms for hit clustering and sorting.
 
Coverage of dynamical detector calibration.
 
Reduced data structure for L1 hit.
 
Match operator for Cherenkov light from shower in any direction.
 
Direct access to module in detector data structure.
 
Linear fit of JFIT::JPoint4D.
 
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.
 
Router for direct addressing of module data in detector data structure.
 
Template definition of linear fit.
 
Data structure for set of track fit results.
 
void select(const JSelector_t &selector)
Select fits.
 
Data structure for vertex fit.
 
Data structure for position in three dimensions.
 
Data structure for normalised vector in positive z-direction.
 
The template JSharedPointer class can be used to share a pointer to an object.
 
class to handle first step of the shower reconstruction in ORCA: it reconstructs the shower vertex,...
 
JShowerPrefit(const JShowerPrefitParameters_t ¶meters, const int debug=0)
Parameterized constructor.
 
JTRIGGER::JHitR1 hit_type
 
input_type getInput(const JModuleRouter &router, const KM3NETDAQ::JDAQEvent &event, const coverage_type &coverage) const
Get input data.
 
std::vector< hit_type > buffer_type
 
JEvt operator()(const input_type &input)
Fit function.
 
Auxiliary class to convert binary JMatch operator and given hit to unary match operator.
 
Reduced data structure for L1 hit.
 
double getT() const
Get calibrated time of hit.
 
int getModuleID() const
Get module identifier.
 
static const int JSHOWERPREFIT
 
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.
 
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.
 
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.
 
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
 
Auxiliary classes and methods for triggering.
 
JBinder2nd< JHit_t > JBind2nd(const JMatch< JHit_t > &match, const JHit_t &second)
Auxiliary method to create JBinder2nd object.
 
JHitIterator_t clusterizeWeight(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match)
Partition data according given binary match operator.
 
KM3NeT DAQ data structures and auxiliaries.
 
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.
 
Data structure for fit parameters.
 
double sigma_ns
time resolution [ns]
 
int factoryLimit
factory limit for combinatorics
 
int numberOfOutliers
maximum number of outliers
 
int time_grid_ns
edge [ns] of the time grid
 
int pos_step_m
step in [m] of position grid
 
int pos_grid_m
edge [m] of the position grid
 
double DMax_m
maximal distance to optical module [m]
 
size_t numberOfPrefits
number of prefits
 
double ctMin
minimal cosine space angle between PMT axes
 
size_t numberOfGrids
number of prefits to be used to build a grid around
 
double TMaxLocal_ns
time window for local coincidences [ns]
 
double TMaxExtra_ns
time window for extra coincidences [ns]
 
size_t numberOfL1
minimal number of L1
 
int time_step_ns
step in [ns] of time grid
 
Auxiliary class to match hit to root hit.
 
bool operator()(const hit_type &hit) const
Test match.
 
match_t(const hit_type &root, const double TMax_ns)
Constructor.
 
Auxiliary data structure for sorting of hits.
 
Data structure for L2 parameters.