Geant4  10.02.p02
G4VIntersectionLocator Class Referenceabstract

#include <G4VIntersectionLocator.hh>

+ Inheritance diagram for G4VIntersectionLocator:
+ Collaboration diagram for G4VIntersectionLocator:

Public Member Functions

 G4VIntersectionLocator (G4Navigator *theNavigator)
 
virtual ~G4VIntersectionLocator ()
 
virtual G4bool EstimateIntersectionPoint (const G4FieldTrack &curveStartPointTangent, const G4FieldTrack &curveEndPointTangent, const G4ThreeVector &trialPoint, G4FieldTrack &intersectPointTangent, G4bool &recalculatedEndPoint, G4double &fPreviousSafety, G4ThreeVector &fPreviousSftOrigin)=0
 
void printStatus (const G4FieldTrack &startFT, const G4FieldTrack &currentFT, G4double requestStep, G4double safety, G4int stepNum)
 
G4bool IntersectChord (const G4ThreeVector &StartPointA, const G4ThreeVector &EndPointB, G4double &NewSafety, G4double &PreviousSafety, G4ThreeVector &PreviousSftOrigin, G4double &LinearStepLength, G4ThreeVector &IntersectionPoint, G4bool *calledNavigator=0)
 
void SetEpsilonStepFor (G4double EpsilonStep)
 
void SetDeltaIntersectionFor (G4double deltaIntersection)
 
void SetNavigatorFor (G4Navigator *fNavigator)
 
void SetChordFinderFor (G4ChordFinder *fCFinder)
 
void SetVerboseFor (G4int fVerbose)
 
G4int GetVerboseFor ()
 
G4double GetDeltaIntersectionFor ()
 
G4double GetEpsilonStepFor ()
 
G4Navigator * GetNavigatorFor ()
 
G4ChordFinder * GetChordFinderFor ()
 
void SetSafetyParametersFor (G4bool UseSafety)
 
void AddAdjustementOfFoundIntersection (G4bool UseCorrection)
 
G4bool GetAdjustementOfFoundIntersection ()
 
void AdjustIntersections (G4bool UseCorrection)
 
G4bool AreIntersectionsAdjusted ()
 

Static Public Member Functions

static void printStatus (const G4FieldTrack &startFT, const G4FieldTrack &currentFT, 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 SetCheckMode (G4bool value)
 
G4bool GetCheckMode ()
 
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, double tolerance, unsigned long int numCalls)
 

Protected Attributes

G4double kCarTolerance
 
G4int fVerboseLevel
 
G4bool fUseNormalCorrection
 
G4bool fCheckMode
 
G4Navigator * fiNavigator
 
G4ChordFinder * fiChordFinder
 
G4double fiEpsilonStep
 
G4double fiDeltaIntersection
 
G4bool fiUseSafety
 
G4Navigator * fHelpingNavigator
 
G4TouchableHistory * fpTouchable
 

Private Member Functions

G4ThreeVector GetLocalSurfaceNormal (const G4ThreeVector &CurrentE_Point, G4bool &validNormal)
 
G4ThreeVector GetLastSurfaceNormal (const G4ThreeVector &intersectPoint, G4bool &validNormal) const
 

Detailed Description

Definition at line 56 of file G4VIntersectionLocator.hh.

Constructor & Destructor Documentation

G4VIntersectionLocator::G4VIntersectionLocator ( G4Navigator *  theNavigator)

Definition at line 47 of file G4VIntersectionLocator.cc.

References fHelpingNavigator, G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), and kCarTolerance.

+ Here is the call graph for this function:

G4VIntersectionLocator::~G4VIntersectionLocator ( )
virtual

Definition at line 66 of file G4VIntersectionLocator.cc.

References fHelpingNavigator, and fpTouchable.

Member Function Documentation

void G4VIntersectionLocator::AddAdjustementOfFoundIntersection ( G4bool  UseCorrection)
inline
void G4VIntersectionLocator::AdjustIntersections ( G4bool  UseCorrection)
inline
G4bool G4VIntersectionLocator::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 
)
protected

Definition at line 441 of file G4VIntersectionLocator.cc.

References fVerboseLevel, G4cerr, G4endl, GetGlobalSurfaceNormal(), GetNavigatorFor(), IntersectChord(), kCarTolerance, G4InuclParticleNames::lambda, and G4Navigator::LocateGlobalPointWithinVolume().

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4VIntersectionLocator::AreIntersectionsAdjusted ( )
inline

Definition at line 126 of file G4VIntersectionLocator.hh.

References fUseNormalCorrection.

G4bool G4VIntersectionLocator::CheckAndReEstimateEndpoint ( const G4FieldTrack &  CurrentStartA,
const G4FieldTrack &  EstimatedEndB,
G4FieldTrack &  RevisedEndPoint,
G4int &  errorCode 
)
protected

Definition at line 326 of file G4VIntersectionLocator.cc.

References fiEpsilonStep, G4Exception(), G4FieldTrack::GetCurveLength(), G4FieldTrack::GetPosition(), JustWarning, and ReEstimateEndpoint().

Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual G4bool G4VIntersectionLocator::EstimateIntersectionPoint ( const G4FieldTrack &  curveStartPointTangent,
const G4FieldTrack &  curveEndPointTangent,
const G4ThreeVector &  trialPoint,
G4FieldTrack &  intersectPointTangent,
G4bool &  recalculatedEndPoint,
G4double &  fPreviousSafety,
G4ThreeVector &  fPreviousSftOrigin 
)
pure virtual
G4bool G4VIntersectionLocator::GetAdjustementOfFoundIntersection ( )
inline

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the caller graph for this function:

G4bool G4VIntersectionLocator::GetCheckMode ( )
inlineprotected

Definition at line 210 of file G4VIntersectionLocator.hh.

References fCheckMode.

Referenced by LocateGlobalPointWithinVolumeCheckAndReport().

+ Here is the caller graph for this function:

G4ChordFinder* G4VIntersectionLocator::GetChordFinderFor ( )
inline

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), and ReEstimateEndpoint().

+ Here is the caller graph for this function:

G4double G4VIntersectionLocator::GetDeltaIntersectionFor ( )
inline

Referenced by G4BrentLocator::EstimateIntersectionPoint().

+ Here is the caller graph for this function:

G4double G4VIntersectionLocator::GetEpsilonStepFor ( )
inline

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), and ReEstimateEndpoint().

+ Here is the caller graph for this function:

G4ThreeVector G4VIntersectionLocator::GetGlobalSurfaceNormal ( const G4ThreeVector &  CurrentE_Point,
G4bool &  validNormal 
)
protected

Definition at line 566 of file G4VIntersectionLocator.cc.

References fHelpingNavigator, G4endl, G4Exception(), GetLocalSurfaceNormal(), G4Navigator::GetLocalToGlobalTransform(), JustWarning, G4AffineTransform::NetRotation(), G4AffineTransform::NetTranslation(), perThousand, and G4AffineTransform::TransformAxis().

Referenced by AdjustmentOfFoundIntersection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4VIntersectionLocator::GetLastSurfaceNormal ( const G4ThreeVector &  intersectPoint,
G4bool &  validNormal 
) const
private

Definition at line 608 of file G4VIntersectionLocator.cc.

References fiNavigator, and G4Navigator::GetGlobalExitNormal().

Referenced by GetSurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4VIntersectionLocator::GetLocalSurfaceNormal ( const G4ThreeVector &  CurrentE_Point,
G4bool &  validNormal 
)
private

Definition at line 383 of file G4VIntersectionLocator.cc.

References G4Navigator::CreateTouchableHistory(), G4VSolid::DistanceToOut(), fHelpingNavigator, fpTouchable, G4cerr, G4endl, G4TouchableHistory::GetHistory(), G4VPhysicalVolume::GetLogicalVolume(), GetNavigatorFor(), G4LogicalVolume::GetSolid(), G4NavigationHistory::GetTopTransform(), G4VSolid::Inside(), kCarTolerance, kSurface, G4Navigator::LocateGlobalPointAndSetup(), perThousand, G4Navigator::SetWorldVolume(), G4VSolid::SurfaceNormal(), and G4AffineTransform::TransformPoint().

Referenced by GetGlobalSurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Navigator* G4VIntersectionLocator::GetNavigatorFor ( )
inline

Referenced by AdjustmentOfFoundIntersection(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), GetLocalSurfaceNormal(), and LocateGlobalPointWithinVolumeAndCheck().

+ Here is the caller graph for this function:

G4ThreeVector G4VIntersectionLocator::GetSurfaceNormal ( const G4ThreeVector &  CurrentInt_Point,
G4bool &  validNormal 
)
protected

Definition at line 521 of file G4VIntersectionLocator.cc.

References G4endl, G4Exception(), GetLastSurfaceNormal(), JustWarning, and perThousand.

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4VIntersectionLocator::GetVerboseFor ( )
inline
G4bool G4VIntersectionLocator::IntersectChord ( const G4ThreeVector &  StartPointA,
const G4ThreeVector &  EndPointB,
G4double &  NewSafety,
G4double &  PreviousSafety,
G4ThreeVector &  PreviousSftOrigin,
G4double &  LinearStepLength,
G4ThreeVector &  IntersectionPoint,
G4bool *  calledNavigator = 0 
)
inline

Referenced by AdjustmentOfFoundIntersection(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the caller graph for this function:

G4bool G4VIntersectionLocator::LocateGlobalPointWithinVolumeAndCheck ( const G4ThreeVector &  pos)
protected

Definition at line 682 of file G4VIntersectionLocator.cc.

References G4Navigator::CheckMode(), G4Navigator::CreateTouchableHistoryHandle(), G4VSolid::DistanceToIn(), fCheckMode, G4cerr, G4endl, G4VPhysicalVolume::GetCopyNo(), G4Navigator::GetGlobalToLocalTransform(), GetNavigatorFor(), G4VSolid::Inside(), G4Navigator::IsCheckModeActive(), kInside, kSurface, G4Navigator::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointWithinVolume(), and G4AffineTransform::TransformPoint().

Referenced by LocateGlobalPointWithinVolumeCheckAndReport().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VIntersectionLocator::LocateGlobalPointWithinVolumeCheckAndReport ( const G4ThreeVector &  pos,
const G4String &  CodeLocationInfo,
G4int  CheckMode 
)
protected

Definition at line 741 of file G4VIntersectionLocator.cc.

References G4cerr, G4endl, GetCheckMode(), LocateGlobalPointWithinVolumeAndCheck(), and SetCheckMode().

+ Here is the call graph for this function:

void G4VIntersectionLocator::printStatus ( const G4FieldTrack &  startFT,
const G4FieldTrack &  currentFT,
G4double  requestStep,
G4double  safety,
G4int  stepNum 
)

Definition at line 77 of file G4VIntersectionLocator.cc.

References fVerboseLevel, and G4cout.

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), printStatus(), ReportProgress(), and ReportReversedPoints().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::printStatus ( const G4FieldTrack &  startFT,
const G4FieldTrack &  currentFT,
G4double  requestStep,
G4double  safety,
G4int  stepNum,
std::ostream &  oss,
G4int  verboseLevel 
)
static

Definition at line 93 of file G4VIntersectionLocator.cc.

References G4endl, G4FieldTrack::GetCurveLength(), G4FieldTrack::GetMomentum(), G4FieldTrack::GetMomentumDir(), G4FieldTrack::GetPosition(), and printStatus().

+ Here is the call graph for this function:

G4FieldTrack G4VIntersectionLocator::ReEstimateEndpoint ( const G4FieldTrack &  CurrentStateA,
const G4FieldTrack &  EstimtdEndStateB,
G4double  linearDistSq,
G4double  curveDist 
)
protected

Definition at line 191 of file G4VIntersectionLocator.cc.

References G4MagInt_Driver::AccurateAdvance(), fVerboseLevel, G4cout, G4endl, G4Exception(), G4ThreadLocal, GetChordFinderFor(), G4FieldTrack::GetCurveLength(), GetEpsilonStepFor(), G4ChordFinder::GetIntegrationDriver(), G4FieldTrack::GetPosition(), JustWarning, and kCarTolerance.

Referenced by CheckAndReEstimateEndpoint(), G4BrentLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VIntersectionLocator::ReportImmediateHit ( const char *  MethodName,
const G4ThreeVector &  StartPosition,
const G4ThreeVector &  TrialPoint,
double  tolerance,
unsigned long int  numCalls 
)
protected

Definition at line 848 of file G4VIntersectionLocator.cc.

References DBL_MAX, G4cout, G4endl, G4ThreadLocal, and G4AutoDelete::Register().

Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VIntersectionLocator::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 
)
protected

Definition at line 814 of file G4VIntersectionLocator.cc.

References G4endl, and printStatus().

Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VIntersectionLocator::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 
)
protected

Definition at line 767 of file G4VIntersectionLocator.cc.

References G4endl, G4FieldTrack::GetCurveLength(), and printStatus().

Referenced by G4MultiLevelLocator::EstimateIntersectionPoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VIntersectionLocator::ReportTrialStep ( G4int  step_no,
const G4ThreeVector &  ChordAB_v,
const G4ThreeVector &  ChordEF_v,
const G4ThreeVector &  NewMomentumDir,
const G4ThreeVector &  NormalAtEntry,
G4bool  validNormal 
)
protected

Definition at line 623 of file G4VIntersectionLocator.cc.

References G4cerr, G4cout, G4endl, and perThousand.

Referenced by G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), and G4SimpleLocator::EstimateIntersectionPoint().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetCheckMode ( G4bool  value)
inlineprotected

Definition at line 209 of file G4VIntersectionLocator.hh.

References fCheckMode.

Referenced by LocateGlobalPointWithinVolumeCheckAndReport().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetChordFinderFor ( G4ChordFinder *  fCFinder)
inline

Referenced by G4PropagatorInField::RefreshIntersectionLocator().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetDeltaIntersectionFor ( G4double  deltaIntersection)
inline

Referenced by G4PropagatorInField::RefreshIntersectionLocator().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetEpsilonStepFor ( G4double  EpsilonStep)
inline

Referenced by G4PropagatorInField::RefreshIntersectionLocator().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetNavigatorFor ( G4Navigator *  fNavigator)
inline

Referenced by G4ErrorPropagatorManager::StartNavigator().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetSafetyParametersFor ( G4bool  UseSafety)
inline

Referenced by G4PropagatorInField::RefreshIntersectionLocator().

+ Here is the caller graph for this function:

void G4VIntersectionLocator::SetVerboseFor ( G4int  fVerbose)
inline

Member Data Documentation

G4bool G4VIntersectionLocator::fCheckMode
protected
G4Navigator* G4VIntersectionLocator::fHelpingNavigator
protected
G4ChordFinder* G4VIntersectionLocator::fiChordFinder
protected

Definition at line 268 of file G4VIntersectionLocator.hh.

G4double G4VIntersectionLocator::fiEpsilonStep
protected
G4Navigator* G4VIntersectionLocator::fiNavigator
protected

Definition at line 266 of file G4VIntersectionLocator.hh.

Referenced by GetLastSurfaceNormal().

G4bool G4VIntersectionLocator::fiUseSafety
protected

Definition at line 271 of file G4VIntersectionLocator.hh.

G4TouchableHistory* G4VIntersectionLocator::fpTouchable
protected

Definition at line 278 of file G4VIntersectionLocator.hh.

Referenced by GetLocalSurfaceNormal(), and ~G4VIntersectionLocator().

G4bool G4VIntersectionLocator::fUseNormalCorrection
protected

Definition at line 263 of file G4VIntersectionLocator.hh.

Referenced by AreIntersectionsAdjusted().


The documentation for this class was generated from the following files: