|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4ChordFinder is a class that provides Runge-Kutta integration of motion ODE and also has a method that returns an approximate point on the curve near to a (chord) point. More...
#include <G4ChordFinder.hh>
Public Types | |
| enum | kIntegrationType { kDefaultDriverType =0 , kFSALStepperType =1 , kTemplatedStepperType , kRegularStepperType , kBfieldDriverType , kQss2DriverType , kQss3DriverType } |
Static Public Member Functions | |
| static void | SetVerboseConstruction (G4bool v=true) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const G4ChordFinder &cf) |
G4ChordFinder is a class that provides Runge-Kutta integration of motion ODE and also has a method that returns an approximate point on the curve near to a (chord) point.
Definition at line 58 of file G4ChordFinder.hh.
| Enumerator | |
|---|---|
| kDefaultDriverType | |
| kFSALStepperType | |
| kTemplatedStepperType | |
| kRegularStepperType | |
| kBfieldDriverType | |
| kQss2DriverType | |
| kQss3DriverType | |
Definition at line 62 of file G4ChordFinder.hh.
|
explicit |
The most flexible constructor, which allows the user to specify any type of field, equation, stepper and integration driver.
| [in] | pIntegrationDriver | Pointer to the integrator driver to use. |
Definition at line 78 of file G4ChordFinder.cc.
Referenced by G4ChordFinder(), OnComputeStep(), operator<<, and operator=().
| G4ChordFinder::G4ChordFinder | ( | G4MagneticField * | itsMagField, |
| G4double | stepMinimum = G4FieldDefaults::kMinimumStep, | ||
| G4MagIntegratorStepper * | pItsStepper = nullptr, | ||
| G4int | stepperDriverChoice = kTemplatedStepperType ) |
Constructor that creates defaults for all "children" classes. The type of equation of motion is fixed. A default type of stepper (Dormand Prince since release 10.4) is used, and the corresponding integration driver.
| [in] | itsMagField | Pointer to the magnetic field. |
| [in] | stepMinimum | Pointer to the magnetic field. |
| [in] | pItsStepper | Optional pointer to the stepper algorithm. |
| [in] | stepperDriverChoice | Type of stepper driver. |
Definition at line 93 of file G4ChordFinder.cc.
| G4ChordFinder::~G4ChordFinder | ( | ) |
Destructor.
Definition at line 415 of file G4ChordFinder.cc.
|
delete |
Copy constructor and assignment operator not allowed.
|
inline |
Computes the step to take, based on chord limits. Uses ODE solver's driver to find the endpoint that satisfies the chord criterion that: d_chord < delta_chord.
| [in,out] | yCurrent | The current track in field. |
| [in] | stepInitial | Proposed initial step length. |
| [in] | epsStep_Relative | Requested accuracy. |
| [in] | latestSafetyOrigin | Last safety origin point. Unused. |
| [in] | lasestSafetyRadius | Last safety distance. Unused. |
Referenced by G4PropagatorInField::ComputeStep().
| G4FieldTrack G4ChordFinder::ApproxCurvePointS | ( | const G4FieldTrack & | curveAPointVelocity, |
| const G4FieldTrack & | curveBPointVelocity, | ||
| const G4FieldTrack & | ApproxCurveV, | ||
| const G4ThreeVector & | currentEPoint, | ||
| const G4ThreeVector & | currentFPoint, | ||
| const G4ThreeVector & | PointG, | ||
| G4bool | first, | ||
| G4double | epsStep ) |
Uses the Brent algorithm when possible, to determine the closest point on the curve. Given a starting curve point A (CurveA_PointVelocity), curve point B (CurveB_PointVelocity), a point E which is (generally) not on the curve and a point F which is on the curve (first approximation), find new point S on the curve closer to point E. While advancing towards S utilise 'eps_step' as a measure of the relative accuracy of each Step.
Definition at line 428 of file G4ChordFinder.cc.
Referenced by G4BrentLocator::EstimateIntersectionPoint().
| G4FieldTrack G4ChordFinder::ApproxCurvePointV | ( | const G4FieldTrack & | curveAPointVelocity, |
| const G4FieldTrack & | curveBPointVelocity, | ||
| const G4ThreeVector & | currentEPoint, | ||
| G4double | epsStep ) |
If r=|AE|/|AB|, and s=true path lenght (AB) returns the point that is r*s along the curve.
Definition at line 538 of file G4ChordFinder.cc.
Referenced by ApproxCurvePointS(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
inline |
Accessors and modifiers.
Referenced by G4PropagatorInField::ComputeStep().
|
inline |
|
inline |
Calculates the inverse parabolic through the three points (x,y) and returns the value x that, for the inverse parabolic, corresponds to y=0.
Referenced by ApproxCurvePointS().
|
inline |
Dispatch interface method for computing step.
Referenced by G4PropagatorInField::ComputeStep().
|
delete |
|
inline |
Clears the internal state (last step estimate).
Referenced by G4FieldManagerStore::ClearAllChordFindersState().
|
inline |
Referenced by G4PropagatorInField::ComputeStep().
|
inline |
Sets the verbosity.
|
static |
Sets verbosity for constructor.
Definition at line 646 of file G4ChordFinder.cc.
|
friend |
Writes out to stream the parameters/state of the driver.
Definition at line 653 of file G4ChordFinder.cc.