#include <cmath>
#include <iostream>
#include <sstream>
#include "Rtypes.h"
Go to the source code of this file.
 | 
| struct   | Vec | 
|   | The Vec class is a straightforward 3-d vector, which also works in pyroot.  More...
  | 
|   | 
  
  
      
        
          | std::ostream& operator<<  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const Vec &  | 
          v  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Write vector to output stream. 
- Parameters
 - 
  
  
 
- Returns
 - output stream 
 
Definition at line 284 of file Vec.hh.
  286   out << v.
x << 
" " << v.
y << 
" " << v.
z << 
" ";
 
 
 
 
  
  
      
        
          | std::istream& operator>>  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          Vec &  | 
          v  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Read vector from input stream. 
- Parameters
 - 
  
  
 
- Returns
 - input stream 
 
Definition at line 297 of file Vec.hh.
  299   in >> v.
x >> v.
y >> v.
z ; 
return in;
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
 
 
 
  
  
      
        
          | double cos_angle_between  | 
          ( | 
          const Vec &  | 
          a,  | 
         
        
           | 
           | 
          const Vec &  | 
          b  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Get cosine of space angle between two vectors. 
- Parameters
 - 
  
    | a | first vector  | 
    | b | second vector  | 
  
   
- Returns
 - cosine 
 
Definition at line 309 of file Vec.hh.
  311   const double n = a.
len() * b.
len();
 
double len() const 
Get length. 
 
double dot(const Vec &v) const 
Get dot product. 
 
 
 
 
  
  
      
        
          | double angle_between  | 
          ( | 
          const Vec &  | 
          a,  | 
         
        
           | 
           | 
          const Vec &  | 
          b  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Get space angle between two vectors. 
- Parameters
 - 
  
    | a | first vector  | 
    | b | second vector  | 
  
   
- Returns
 - angle [rad] 
 
Definition at line 322 of file Vec.hh.
  325   if ( c < -1 ) 
return M_PI;
 
  326   if ( c > 1  ) 
return 0;
 
double cos_angle_between(const Vec &a, const Vec &b)
Get cosine of space angle between two vectors. 
 
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
 
 
 
 
  
  
      
        
          | Vec operator+  | 
          ( | 
          const Vec &  | 
          a,  | 
         
        
           | 
           | 
          const Vec &  | 
          b  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Add two vectors. 
- Parameters
 - 
  
    | a | first vector  | 
    | b | second vector  | 
  
   
- Returns
 - vector 
 
Definition at line 337 of file Vec.hh.
  337 { 
Vec r(a); 
return r+=b;}
 
The Vec class is a straightforward 3-d vector, which also works in pyroot. 
 
 
 
 
  
  
      
        
          | Vec operator-  | 
          ( | 
          const Vec &  | 
          a,  | 
         
        
           | 
           | 
          const Vec &  | 
          b  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Subtract two vectors. 
- Parameters
 - 
  
    | a | first vector  | 
    | b | second vector  | 
  
   
- Returns
 - vector 
 
Definition at line 346 of file Vec.hh.
  346 { 
Vec r(a); 
return r-=b;}
 
The Vec class is a straightforward 3-d vector, which also works in pyroot. 
 
 
 
 
  
  
      
        
          | Vec operator*  | 
          ( | 
          double  | 
          a,  | 
         
        
           | 
           | 
          const Vec &  | 
          v  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Multiply vector. 
- Parameters
 - 
  
  
 
- Returns
 - vector 
 
Definition at line 355 of file Vec.hh.
The Vec class is a straightforward 3-d vector, which also works in pyroot. 
 
 
 
 
  
  
      
        
          | Vec operator*  | 
          ( | 
          const Vec &  | 
          v,  | 
         
        
           | 
           | 
          double  | 
          a  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Multiply vector. 
- Parameters
 - 
  
  
 
- Returns
 - vector 
 
Definition at line 364 of file Vec.hh.
The Vec class is a straightforward 3-d vector, which also works in pyroot. 
 
 
 
 
  
  
      
        
          | Vec operator/  | 
          ( | 
          const Vec &  | 
          v,  | 
         
        
           | 
           | 
          double  | 
          a  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Divide vector. 
- Parameters
 - 
  
  
 
- Returns
 - vector 
 
Definition at line 373 of file Vec.hh.
The Vec class is a straightforward 3-d vector, which also works in pyroot.