Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::IntersectionFactory Namespace Reference

Functions

Intersection getEarlierTrajectoryIntersection (const ThreeVector &x0, const ThreeVector &p, const G4double r)
 Compute the first intersection of a straight particle trajectory with a sphere.
 
Intersection getLaterTrajectoryIntersection (const ThreeVector &x0, const ThreeVector &p, const G4double r)
 Compute the second intersection of a straight particle trajectory with a sphere.
 
std::pair< Intersection, IntersectiongetTrajectoryIntersections (const ThreeVector &x0, const ThreeVector &p, const G4double r)
 Compute both intersections of a straight particle trajectory with a sphere.
 

Function Documentation

◆ getEarlierTrajectoryIntersection()

Intersection G4INCL::IntersectionFactory::getEarlierTrajectoryIntersection ( const ThreeVector x0,
const ThreeVector p,
const G4double  r 
)
inline

Compute the first intersection of a straight particle trajectory with a sphere.

Parameters
x0the starting position of the trajectory
pthe trajectory direction
rthe radius of the sphere (centred in the origin)
Returns
an Intersection. The G4bool is true if an intersection exists, in which case its position is stored in the ThreeVector and its time in the G4double.

Definition at line 124 of file G4INCLIntersection.hh.

124 {
125 return getTrajectoryIntersection(x0, p, r, true);
126 }

Referenced by G4INCL::CoulombNone::bringToSurface().

◆ getLaterTrajectoryIntersection()

Intersection G4INCL::IntersectionFactory::getLaterTrajectoryIntersection ( const ThreeVector x0,
const ThreeVector p,
const G4double  r 
)
inline

Compute the second intersection of a straight particle trajectory with a sphere.

Parameters
x0the starting position of the trajectory
pthe trajectory direction
rthe radius of the sphere (centred in the origin)
Returns
an Intersection. The G4bool is true if an intersection exists, in which case its position is stored in the ThreeVector and its time in the G4double.

Definition at line 128 of file G4INCLIntersection.hh.

128 {
129 return getTrajectoryIntersection(x0, p, r, false);
130 }

Referenced by G4INCL::StandardPropagationModel::getReflectionTime().

◆ getTrajectoryIntersections()

std::pair< Intersection, Intersection > G4INCL::IntersectionFactory::getTrajectoryIntersections ( const ThreeVector x0,
const ThreeVector p,
const G4double  r 
)
inline

Compute both intersections of a straight particle trajectory with a sphere.

Parameters
x0the starting position of the trajectory
pthe trajectory direction
rthe radius of the sphere (centred in the origin)
Returns
an Intersection. The G4bool is true if an intersection exists, in which case its position is stored in the ThreeVector and its time in the G4double.

Definition at line 132 of file G4INCLIntersection.hh.

132 {
133 return std::make_pair(
134 getTrajectoryIntersection(x0, p, r, true),
135 getTrajectoryIntersection(x0, p, r, false)
136 );
137 }