#include "Detector.hh"
#include "NBRun.hh"
#include "Physics.hh"
 
Go to the source code of this file.
◆ computeMedianCorrection()
It uses the pmts from a source module and from a target module. 
- Author
 - rgruiz For each possible pair source-target, it computes the a factor that needs to be added to the t0s of all the PMTs in the target module. Finally it computes the median 
 
- Parameters
 - 
  
    | det | detector with old t0s  | 
    | srcs | SUPERPMTs of the emitter DOM  | 
    | tgts | SUPERPMTs of the receiver DOM  | 
  
   
- Returns
 - Median correction factor 
 
Definition at line 23 of file JInterDomCal_utils.hh.
   33   for (
auto & src : srcs){
 
   35     JPMT src_pmt = src->getPMT() ;
 
   37     NBPulse* src_pulse = src->getNBPulse() ;
 
   39     for(
auto & tgt : tgts){
 
   41       JPMT tgt_pmt = tgt->getPMT() ;
 
   43       NBPulse* tgt_pulse = tgt->getNBPulse() ;
 
   51       double delta_t0 = t_flight - delta_traw ;
 
   55       corrections.push_back(delta_t0 - delta_t0_old) ;
 
   61   sort (corrections.begin() , corrections.end()) ;
 
   63   int index = int(0.5*corrections.size()) ;
 
   65   return corrections[index] ;
 
 
 
 
◆ Update_Detector()
Produces a new detector file by updating the existing t0s of the PMTs. 
- Parameters
 - 
  
    | detector | Old detector  | 
    | SuperMods | The SuperModules used to calibrate the detector  | 
  
   
- Returns
 - calibrated detector 
 
Definition at line 76 of file JInterDomCal_utils.hh.
   80   for(
auto & sm : SuperMods){
 
   84     if(sm->get_good_sources().size()>0){
 
   96       for(
int j=0 ; 
j < nPMTs ; 
j++){
 
 
 
 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.