Fit function. 
  206    {
  209 
  211 
  213 
  215      
  217 
  218      if (!in.empty()) {
  220      }
  221  
  222      for (JEvt::const_iterator shower = in.begin(); shower != in.end(); ++shower) {
  223 
  225 
  227        const double      time = shower->getT(); 
  228        
  229        for (const auto& module : input.data) {
  230          
  232          pos.sub(vertex);
  233          
  234          if(pos.getLength() <= 
DMax_m){
 
  235            
  237 
  238            for (size_t i = 0; i != module->size(); ++i) {
  239              if (module.getStatus(i)) {
  240                struct {
  241 
  243                  {
  244                    return (hit.
getPMT() == pmt && T_ns(hit.
getT()));
 
  245                  }
  246                    
  248                  const size_t     pmt;
  249 
  250                } match = { JRegressor_t::T_ns + t1, i };
  251 
  252                JPMT pmt = 
module->getPMT(i);
 
  253 
  255 
  256                data.push_back(
JPMTW0(pmt, module.frame.getRate(i), count_if(module.begin(), module.end(), match)));
 
  257                
  258              }
  259            }
  260          }
  261        }
  262 
  264        for (vector<JPMTW0>::const_iterator i = 
data.begin(); i != 
data.end(); ++i) {
 
  265          if (i->getN() != 0) start_dir.add(i->getPosition());
  266        }
  267        
  271        
  273 
  274        for (JOmega3D_t::const_iterator dir = scan_directions.begin(); dir != scan_directions.end(); ++dir) {
  275 
  277 
  279 
  280          for (vector<JPMTW0>::const_iterator i = 
data.begin(); i != 
data.end(); ++i) {  
 
  281 
  284 
  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;
 
  288 
  290            
  291            for (
size_t j=0; 
j!=chi2.size(); ++
j) {
 
  292              
  294 
  295            }
  296 
  297          }
  298 
  299          
  300 
  301          auto p = std::min_element(chi2.begin(), chi2.end());
  302 
  307                               Ev[p-chi2.begin()]));
 
  308 
  309          
  312 
  313        }
  314      }
  315      
  316      
  317 
  319 
  320      copy(input.in.begin(), input.in.end(), back_inserter(out));
 
  321 
  322      return out;
  323    
  324    }
Data structure for PMT geometry, calibration and status.
 
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 & sub(const JVector3D &vector)
Subtract vector.
 
Data structure for normalised vector in positive z-direction.
 
JEvt operator()(const input_type &input)
Fit function.
 
Reduced data structure for L0 hit.
 
JPMT_t getPMT() const
Get PMT.
 
double getT() const
Get calibrated time of hit.
 
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.
 
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 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.
 
double scanAngle_deg
scanning angle step in [deg]
 
size_t numberOfPrefits
number of prefits
 
double DMax_m
maximal distance to optical module [m]