Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ChordFinderSaf.cc File Reference
#include "G4ChordFinderSaf.hh"
#include <iomanip>
Include dependency graph for G4ChordFinderSaf.cc:

Go to the source code of this file.

Functions

G4double CalculatePointSafety (G4ThreeVector safetyOrigin, G4double safetyRadius, G4ThreeVector point)
 
G4bool CalculatePointInside (G4ThreeVector safetyOrigin, G4double safetyRadius, G4ThreeVector point)
 

Function Documentation

G4bool CalculatePointInside ( G4ThreeVector  safetyOrigin,
G4double  safetyRadius,
G4ThreeVector  point 
)

Definition at line 108 of file G4ChordFinderSaf.cc.

111 {
112  G4ThreeVector OriginShift = point - safetyOrigin ;
113  return ( OriginShift.mag2() < safetyRadius*safetyRadius );
114 }
double mag2() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4double CalculatePointSafety ( G4ThreeVector  safetyOrigin,
G4double  safetyRadius,
G4ThreeVector  point 
)

Definition at line 91 of file G4ChordFinderSaf.cc.

94 {
95  G4double pointSafety= 0.0;
96 
97  G4ThreeVector OriginShift = point - safetyOrigin ;
98  G4double MagSqShift = OriginShift.mag2() ;
99  if( MagSqShift < sqr(safetyRadius) ){
100  pointSafety = safetyRadius - std::sqrt(MagSqShift) ;
101  }
102 
103  return pointSafety;
104 }
double mag2() const
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function: