|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4VIntersectionLocator is a base class for the calculation of the intersection point with a boundary when PropagationInField is used. It gives the possibility to choose the method of intersection. More...
#include <G4VIntersectionLocator.hh>
Static Public Member Functions | |
| static void | printStatus (const G4FieldTrack &startFT, const G4FieldTrack ¤tFT, G4double requestStep, G4double safety, G4int stepNum, std::ostream &oss, G4int verboseLevel) |
Protected Member Functions | |
| G4FieldTrack | ReEstimateEndpoint (const G4FieldTrack &CurrentStateA, const G4FieldTrack &EstimtdEndStateB, G4double linearDistSq, G4double curveDist) |
| G4bool | CheckAndReEstimateEndpoint (const G4FieldTrack &CurrentStartA, const G4FieldTrack &EstimatedEndB, G4FieldTrack &RevisedEndPoint, G4int &errorCode) |
| G4ThreeVector | GetSurfaceNormal (const G4ThreeVector &CurrentInt_Point, G4bool &validNormal) |
| G4ThreeVector | GetGlobalSurfaceNormal (const G4ThreeVector &CurrentE_Point, G4bool &validNormal) |
| G4bool | AdjustmentOfFoundIntersection (const G4ThreeVector &A, const G4ThreeVector &CurrentE_Point, const G4ThreeVector &CurrentF_Point, const G4ThreeVector &MomentumDir, const G4bool IntersectAF, G4ThreeVector &IntersectionPoint, G4double &NewSafety, G4double &fPrevSafety, G4ThreeVector &fPrevSftOrigin) |
| void | ReportTrialStep (G4int step_no, const G4ThreeVector &ChordAB_v, const G4ThreeVector &ChordEF_v, const G4ThreeVector &NewMomentumDir, const G4ThreeVector &NormalAtEntry, G4bool validNormal) |
| G4bool | LocateGlobalPointWithinVolumeAndCheck (const G4ThreeVector &pos) |
| void | LocateGlobalPointWithinVolumeCheckAndReport (const G4ThreeVector &pos, const G4String &CodeLocationInfo, G4int CheckMode) |
| void | ReportReversedPoints (std::ostringstream &ossMsg, const G4FieldTrack &StartPointVel, const G4FieldTrack &EndPointVel, G4double NewSafety, G4double epsStep, const G4FieldTrack &CurrentA_PointVelocity, const G4FieldTrack &CurrentB_PointVelocity, const G4FieldTrack &SubStart_PointVelocity, const G4ThreeVector &CurrentE_Point, const G4FieldTrack &ApproxIntersecPointV, G4int sbstp_no, G4int sbstp_no_p, G4int depth) |
| void | ReportProgress (std::ostream &oss, const G4FieldTrack &StartPointVel, const G4FieldTrack &EndPointVel, G4int substep_no, const G4FieldTrack &A_PtVel, const G4FieldTrack &B_PtVel, G4double safetyLast, G4int depth=-1) |
| void | ReportImmediateHit (const char *MethodName, const G4ThreeVector &StartPosition, const G4ThreeVector &TrialPoint, G4double tolerance, unsigned long int numCalls) |
Protected Attributes | |
| G4double | kCarTolerance |
| G4int | fVerboseLevel = 0 |
| G4bool | fUseNormalCorrection = false |
| G4bool | fCheckMode = false |
| G4bool | fiUseSafety = false |
| G4Navigator * | fiNavigator |
| G4ChordFinder * | fiChordFinder = nullptr |
| G4double | fiEpsilonStep = -1.0 |
| G4double | fiDeltaIntersection = -1.0 |
| G4Navigator * | fHelpingNavigator |
| G4TouchableHistory * | fpTouchable = nullptr |
G4VIntersectionLocator is a base class for the calculation of the intersection point with a boundary when PropagationInField is used. It gives the possibility to choose the method of intersection.
Definition at line 54 of file G4VIntersectionLocator.hh.
| G4VIntersectionLocator::G4VIntersectionLocator | ( | G4Navigator * | theNavigator | ) |
Constructor and virtual Destructor.
Definition at line 46 of file G4VIntersectionLocator.cc.
Referenced by G4BrentLocator::G4BrentLocator(), G4MultiLevelLocator::G4MultiLevelLocator(), and G4SimpleLocator::G4SimpleLocator().
|
virtual |
Definition at line 65 of file G4VIntersectionLocator.cc.
|
inline |
Adjustment flag accessor/modifier.
|
inline |
Adjustment flag accessor/modifier.
|
protected |
Optional method for adjustment of located intersection point using the surface-normal.
| [in] | A | Chord starting point. |
| [in] | CurrentE_Point | E Chord point. |
| [in] | CurrentF_Point | F Chord point. |
| [in] | MomentumDir | Momentum direction. |
| [in] | IntersectAF | First part intersecting? |
| [in,out] | IntersectionPoint | Intersection point tangent track. |
| [in,out] | NewSafety | New safety distance. |
| [in,out] | fPrevSafety | Previous safety distance. |
| [in,out] | fPrevSftOrigin | Previous safety point origin. |
Definition at line 440 of file G4VIntersectionLocator.cc.
Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
inline |
Definition at line 144 of file G4VIntersectionLocator.hh.
|
protected |
Checks whether EndB is too far from StartA to be reached and if, re-estimates new value for EndB (return in RevisedEndPoint). Reports error if EndB is before StartA (in curve length) In that case return errorCode = 2.
| [in] | CurrentStartA | Start point tangent track. |
| [in] | EstimatedEndB | Estimated end point tangent track. |
| [in] | RevisedEndPoint | Revised end point tangent track. |
| [in] | errorCode | Error code (0=OK, 1=coincident points, 2=error). |
Definition at line 330 of file G4VIntersectionLocator.cc.
Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().
|
pure virtual |
If such an intersection exists, this method calculates the intersection point of the true path of the particle with the surface of the current volume (or of one of its daughters). Should use lateral displacement as measure of convergence.
| [in] | curveStartPointTangent | Start point tangent track. |
| [in] | curveEndPointTangent | End point tangent track. |
| [in] | trialPoint | Trial point. |
| [out] | intersectPointTangent | Intersection point tangent track. |
| [out] | recalculatedEndPoint | Flagging if end point was recomputed. |
| [in,out] | fPreviousSafety | Previous safety distance. |
| [in,out] | fPreviousSftOrigin | Previous safety point origin. |
Implemented in G4BrentLocator, G4MultiLevelLocator, and G4SimpleLocator.
|
inline |
|
inline |
Definition at line 179 of file G4VIntersectionLocator.hh.
Referenced by LocateGlobalPointWithinVolumeCheckAndReport().
|
inline |
|
inline |
Additional inline Get/Set methods for parameters, dependent objects.
Referenced by G4BrentLocator::EstimateIntersectionPoint().
|
inline |
|
protected |
Returns the surface normal of the Intersecting Solid in global coordinates.
| [in] | CurrentInt_Point | Current point. |
| [in,out] | validNormal | Flagging if normal is a valid vector. |
Definition at line 564 of file G4VIntersectionLocator.cc.
Referenced by AdjustmentOfFoundIntersection().
|
inline |
|
protected |
Returns the surface normal. Position must be the intersection point from last call to G4Navigator's ComputeStep() (via IntersectChord). It tries to use cached (last) value in Navigator for speed, if it was kept and valid. The value returned is in global coordinates.
| [in] | CurrentInt_Point | Current point. |
| [in,out] | validNormal | Flagging if normal is a valid vector. |
Definition at line 519 of file G4VIntersectionLocator.cc.
Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
inline |
|
inline |
Intersects the chord from StartPointA to EndPointB and returns whether an intersection occurred.
| [in] | StartPointA | Chord starting point. |
| [in] | EndPointB | Chord end point. |
| [out] | NewSafety | New calculated safety distance. |
| [in,out] | PreviousSafety | Previous safety distance. |
| [in,out] | PreviousSftOrigin | Previous safety point origin. |
| [out] | LinearStepLength | Linear chord length. |
| [out] | IntersectionPoint | Intersection point. |
| [in,out] | calledNavigator | Pointer to flag indicating if the navigator has been called or not. |
Referenced by AdjustmentOfFoundIntersection(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
protected |
Locates a point using the navigator and updates the state of Navigator. By default, it assumes that the point is inside the current volume, and returns true. In check mode, it checks whether the point is inside the volume. If it is inside, it returns true. If not, issues a warning and returns false.
| [in] | pos | The point to locate. |
Definition at line 675 of file G4VIntersectionLocator.cc.
Referenced by LocateGlobalPointWithinVolumeCheckAndReport().
|
protected |
Locates a point using the navigator and updates the state of Navigator, but report information about code location. If CheckMode > 1, report extra information.
| [in] | pos | The point to locate. |
| [in] | CodeLocationInfo | String for code location info. |
| [in] | CheckMode | Not used. |
Definition at line 737 of file G4VIntersectionLocator.cc.
| void G4VIntersectionLocator::printStatus | ( | const G4FieldTrack & | startFT, |
| const G4FieldTrack & | currentFT, | ||
| G4double | requestStep, | ||
| G4double | safety, | ||
| G4int | stepNum ) |
Dumps status of propagator to cout, useful mostly for debugging.
Definition at line 76 of file G4VIntersectionLocator.cc.
|
static |
Dumps status of propagator to any ostream.
Definition at line 92 of file G4VIntersectionLocator.cc.
Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), printStatus(), printStatus(), ReportProgress(), and ReportReversedPoints().
|
protected |
Returns new estimate for state after curveDist starting from CurrentStateA, to replace EstimtdEndStateB, and reports displacement (if field is compiled verbose).
| [in] | CurrentStateA | Start point tangent track. |
| [in] | EstimtdEndStateB | Estimated end point tangent track. |
| [in] | linearDistSq | Not used. |
| [in] | curveDist | Not used. |
Definition at line 189 of file G4VIntersectionLocator.cc.
Referenced by CheckAndReEstimateEndpoint(), G4BrentLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
protected |
Report case: trial point is 'close' to start, within tolerance.
Definition at line 846 of file G4VIntersectionLocator.cc.
Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().
|
protected |
Reports the current status / progress in finding the first intersection.
Definition at line 814 of file G4VIntersectionLocator.cc.
Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().
|
protected |
Builds error message (in ossMsg) to report that point 'B' has gone past 'A'.
Definition at line 762 of file G4VIntersectionLocator.cc.
Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().
|
protected |
Prints a three-line report on the current "sub-step", i.e. trial intersection.
| [in] | step_no | Step number. |
| [in] | ChordAB_v | AB chord. |
| [in] | ChordEF_v | EF chord. |
| [in] | NewMomentumDir | Momentum direction. |
| [in] | NormalAtEntry | Normal vector at entry. |
| [in] | validNormal | Validity flag for normal vector at E. |
Definition at line 619 of file G4VIntersectionLocator.cc.
Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
inline |
Sets/gets check mode. When enabled, uses additional verifications and stricter condictions for ensuring correctness. Effective only when G4VERBOSE is enabled.
Definition at line 178 of file G4VIntersectionLocator.hh.
Referenced by LocateGlobalPointWithinVolumeCheckAndReport().
|
inline |
|
inline |
|
inline |
Setters for parameters which must be set at each step, in case they are changed.
|
inline |
|
inline |
|
inline |
Verbosity control. Controlling verbosity enables checking of the locating of intersections.
|
protected |
Definition at line 364 of file G4VIntersectionLocator.hh.
Referenced by G4MultiLevelLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::G4MultiLevelLocator(), GetCheckMode(), LocateGlobalPointWithinVolumeAndCheck(), and SetCheckMode().
|
protected |
Helper for location.
Definition at line 377 of file G4VIntersectionLocator.hh.
Referenced by G4VIntersectionLocator(), GetGlobalSurfaceNormal(), and ~G4VIntersectionLocator().
|
protected |
Parameters set at each physical step by G4PropagatorInField.
Definition at line 372 of file G4VIntersectionLocator.hh.
|
protected |
Definition at line 374 of file G4VIntersectionLocator.hh.
Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().
|
protected |
Definition at line 373 of file G4VIntersectionLocator.hh.
Referenced by CheckAndReEstimateEndpoint(), and G4MultiLevelLocator::EstimateIntersectionPoint().
|
protected |
Definition at line 367 of file G4VIntersectionLocator.hh.
Referenced by G4VIntersectionLocator().
|
protected |
Definition at line 365 of file G4VIntersectionLocator.hh.
|
protected |
Touchable history hook.
Definition at line 380 of file G4VIntersectionLocator.hh.
Referenced by ~G4VIntersectionLocator().
|
protected |
Definition at line 363 of file G4VIntersectionLocator.hh.
Referenced by AreIntersectionsAdjusted().
|
protected |
Definition at line 362 of file G4VIntersectionLocator.hh.
Referenced by AdjustmentOfFoundIntersection(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), printStatus(), and ReEstimateEndpoint().
|
protected |