Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ErrorPropagationNavigator Class Reference

#include <G4ErrorPropagationNavigator.hh>

Inheritance diagram for G4ErrorPropagationNavigator:
Collaboration diagram for G4ErrorPropagationNavigator:

Public Member Functions

 G4ErrorPropagationNavigator ()
 
 ~G4ErrorPropagationNavigator ()
 
G4double ComputeStep (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
 
G4double ComputeSafety (const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
 
G4ThreeVector GetGlobalExitNormal (const G4ThreeVector &point, G4bool *valid)
 
G4double TargetSafetyFromPoint (const G4ThreeVector &pGlobalpoint)
 
- Public Member Functions inherited from G4Navigator
 G4Navigator ()
 
virtual ~G4Navigator ()
 
G4double CheckNextStep (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
 
virtual G4VPhysicalVolumeResetHierarchyAndLocate (const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
 
virtual G4VPhysicalVolumeLocateGlobalPointAndSetup (const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
 
virtual void LocateGlobalPointWithinVolume (const G4ThreeVector &position)
 
void LocateGlobalPointAndUpdateTouchableHandle (const G4ThreeVector &position, const G4ThreeVector &direction, G4TouchableHandle &oldTouchableToUpdate, const G4bool RelativeSearch=true)
 
void LocateGlobalPointAndUpdateTouchable (const G4ThreeVector &position, const G4ThreeVector &direction, G4VTouchable *touchableToUpdate, const G4bool RelativeSearch=true)
 
void LocateGlobalPointAndUpdateTouchable (const G4ThreeVector &position, G4VTouchable *touchableToUpdate, const G4bool RelativeSearch=true)
 
void SetGeometricallyLimitedStep ()
 
virtual G4bool RecheckDistanceToCurrentBoundary (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
 
G4VPhysicalVolumeGetWorldVolume () const
 
void SetWorldVolume (G4VPhysicalVolume *pWorld)
 
G4GRSVolumeCreateGRSVolume () const
 
G4GRSSolidCreateGRSSolid () const
 
G4TouchableHistoryCreateTouchableHistory () const
 
G4TouchableHistoryCreateTouchableHistory (const G4NavigationHistory *) const
 
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle () const
 
virtual G4ThreeVector GetLocalExitNormal (G4bool *valid)
 
virtual G4ThreeVector GetLocalExitNormalAndCheck (const G4ThreeVector &point, G4bool *valid)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int level)
 
G4bool IsActive () const
 
void Activate (G4bool flag)
 
G4bool EnteredDaughterVolume () const
 
G4bool ExitedMotherVolume () const
 
void CheckMode (G4bool mode)
 
G4bool IsCheckModeActive () const
 
void SetPushVerbosity (G4bool mode)
 
void PrintState () const
 
const G4AffineTransformGetGlobalToLocalTransform () const
 
const G4AffineTransform GetLocalToGlobalTransform () const
 
G4AffineTransform GetMotherToDaughterTransform (G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)
 
void ResetStackAndState ()
 
G4int SeverityOfZeroStepping (G4int *noZeroSteps) const
 
G4ThreeVector GetCurrentLocalCoordinate () const
 
G4ThreeVector NetTranslation () const
 
G4RotationMatrix NetRotation () const
 
void EnableBestSafety (G4bool value=false)
 

Additional Inherited Members

- Protected Member Functions inherited from G4Navigator
void SetSavedState ()
 
void RestoreSavedState ()
 
virtual void ResetState ()
 
G4ThreeVector ComputeLocalPoint (const G4ThreeVector &rGlobPoint) const
 
G4ThreeVector ComputeLocalAxis (const G4ThreeVector &pVec) const
 
EVolume VolumeType (const G4VPhysicalVolume *pVol) const
 
EVolume CharacteriseDaughters (const G4LogicalVolume *pLog) const
 
G4int GetDaughtersRegularStructureId (const G4LogicalVolume *pLog) const
 
virtual void SetupHierarchy ()
 
- Protected Attributes inherited from G4Navigator
G4double kCarTolerance
 
G4double fMinStep
 
G4double fSqTol
 
G4NavigationHistory fHistory
 
G4bool fEnteredDaughter
 
G4bool fExitedMother
 
G4bool fWasLimitedByGeometry
 
G4ThreeVector fStepEndPoint
 
G4ThreeVector fLastStepEndPointLocal
 
G4int fVerbose
 

Detailed Description

Definition at line 50 of file G4ErrorPropagationNavigator.hh.

Constructor & Destructor Documentation

G4ErrorPropagationNavigator::G4ErrorPropagationNavigator ( )

Definition at line 47 of file G4ErrorPropagationNavigator.cc.

48  : G4Navigator()
49 {
50 }
G4ErrorPropagationNavigator::~G4ErrorPropagationNavigator ( )

Definition at line 54 of file G4ErrorPropagationNavigator.cc.

55 {
56 }

Member Function Documentation

G4double G4ErrorPropagationNavigator::ComputeSafety ( const G4ThreeVector globalpoint,
const G4double  pProposedMaxLength = DBL_MAX,
const G4bool  keepState = true 
)
virtual

Reimplemented from G4Navigator.

Definition at line 155 of file G4ErrorPropagationNavigator.cc.

158 {
159  G4double safetyGeom = G4Navigator::ComputeSafety(pGlobalPoint,
160  pMaxLength, keepState);
161 
162  G4double safetyTarget = TargetSafetyFromPoint( pGlobalPoint );
163 
164  return std::min(safetyGeom, safetyTarget);
165 }
G4double TargetSafetyFromPoint(const G4ThreeVector &pGlobalpoint)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)

Here is the call graph for this function:

G4double G4ErrorPropagationNavigator::ComputeStep ( const G4ThreeVector pGlobalPoint,
const G4ThreeVector pDirection,
const G4double  pCurrentProposedStepLength,
G4double pNewSafety 
)
virtual

Reimplemented from G4Navigator.

Definition at line 61 of file G4ErrorPropagationNavigator.cc.

65 {
66  G4double safetyGeom= DBL_MAX;
67 
68  G4double Step = G4Navigator::ComputeStep(pGlobalPoint, pDirection,
69  pCurrentProposedStepLength,
70  safetyGeom);
71 
72  G4ErrorPropagatorData * g4edata
74 
75  if (g4edata !=0)
76  {
77  const G4ErrorTarget* target = g4edata->GetTarget();
78  if( target != 0 )
79  {
80  G4double StepPlane= target->GetDistanceFromPoint(pGlobalPoint,pDirection);
81 
82  if( StepPlane < 0. ) // Negative means target is crossed, will not be found
83  {
84  StepPlane = DBL_MAX;
85  }
86 #ifdef G4VERBOSE
88  {
89  G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl
90  << " Target step: " << StepPlane
91  << ", Transportation step: " << Step << G4endl;
92  target->Dump( "G4ErrorPropagationNavigator::ComputeStep Target " );
93  }
94 #endif
95 
96  if(StepPlane<Step)
97  {
98 #ifdef G4VERBOSE
100  {
101  G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl
102  << " TargetCloserThanBoundary: " << StepPlane << " < "
103  << Step << G4endl;
104  }
105 #endif
106  Step = StepPlane;
108  }
109  else
110  {
112  }
113  }
114  }
115  G4double safetyTarget = TargetSafetyFromPoint(pGlobalPoint);
116  // Avoid call to G4Navigator::ComputeSafety - which could have side effects
117  pNewSafety= std::min(safetyGeom, safetyTarget);
118 
119 #ifdef G4VERBOSE
120  if( G4ErrorPropagatorData::verbose() >= 3 )
121  {
122  G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl
123  << " Step: " << Step << ", ComputeSafety: " << pNewSafety
124  << G4endl;
125  }
126 #endif
127 
128  return Step;
129 }
const XML_Char * target
Definition: expat.h:268
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
Definition: G4Navigator.cc:747
virtual void Dump(const G4String &msg) const =0
void SetState(G4ErrorState sta)
G4GLOB_DLL std::ostream G4cout
G4double TargetSafetyFromPoint(const G4ThreeVector &pGlobalpoint)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
virtual G4double GetDistanceFromPoint(const G4ThreeVector &, const G4ThreeVector &) const
const G4ErrorTarget * GetTarget(G4bool mustExist=0) const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4ErrorPropagatorData * GetErrorPropagatorData()
#define DBL_MAX
Definition: templates.hh:83

Here is the call graph for this function:

G4ThreeVector G4ErrorPropagationNavigator::GetGlobalExitNormal ( const G4ThreeVector point,
G4bool valid 
)
virtual

Reimplemented from G4Navigator.

Definition at line 170 of file G4ErrorPropagationNavigator.cc.

171 {
172  G4ErrorPropagatorData *g4edata
174  const G4ErrorTarget* target = 0;
175 
176  G4ThreeVector normal(0.0, 0.0, 0.0);
177  G4double distance= 0;
178 
179  // Determine which 'geometry' limited the step
180  if (g4edata)
181  {
182  target = g4edata->GetTarget();
183  if(target)
184  {
185  distance = target->GetDistanceFromPoint(point);
186  }
187  }
188 
189  if( distance > kCarTolerance // Not reached the target.
190  || (!target) )
191  // If a target does not exist, this seems the best we can do
192  {
194  }
195  else
196  {
197  switch( target->GetType() )
198  {
200  // The volume is in the 'real' mass geometry
202  break;
203  case G4ErrorTarget_TrkL:
204  normal= G4ThreeVector( 0.0, 0.0, 0.0);
205  *valid= false;
206  G4Exception("G4ErrorPropagationNavigator::GetGlobalExitNormal",
207  "Geometry1003",
208  JustWarning, "Unexpected value of Target type");
209  break;
212  const G4ErrorSurfaceTarget* surfaceTarget=
213  static_cast<const G4ErrorSurfaceTarget*>(target);
214  normal= surfaceTarget->GetTangentPlane(point).normal().unit();
215  *valid= true;
216  break;
217 
218 // default:
219 // normal= G4ThreeVector( 0.0, 0.0, 0.0);
220 // *valid= false;
221 // G4Exception("G4ErrorPropagationNavigator::GetGlobalExitNormal",
222 // "Geometry:003",
223 // FatalException, "Impossible value of Target type");
224 // exit(1);
225 // break;
226  }
227  }
228  return normal;
229 }
const XML_Char * target
Definition: expat.h:268
CLHEP::Hep3Vector G4ThreeVector
Normal3D< T > normal() const
Definition: Plane3D.h:90
G4ErrorTargetType GetType() const
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:77
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double kCarTolerance
Definition: G4Navigator.hh:361
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
virtual G4double GetDistanceFromPoint(const G4ThreeVector &, const G4ThreeVector &) const
const G4ErrorTarget * GetTarget(G4bool mustExist=0) const
double G4double
Definition: G4Types.hh:76
static G4ErrorPropagatorData * GetErrorPropagatorData()
virtual G4Plane3D GetTangentPlane(const G4ThreeVector &point) const =0

Here is the call graph for this function:

G4double G4ErrorPropagationNavigator::TargetSafetyFromPoint ( const G4ThreeVector pGlobalpoint)

Definition at line 134 of file G4ErrorPropagationNavigator.cc.

135 {
136  G4double safety= DBL_MAX;
137 
138  G4ErrorPropagatorData *g4edata
140 
141  if (g4edata !=0)
142  {
143  const G4ErrorTarget* target = g4edata->GetTarget();
144  if( target != 0 )
145  {
146  safety = target->GetDistanceFromPoint(pGlobalpoint);
147  }
148  }
149  return safety;
150 }
const XML_Char * target
Definition: expat.h:268
virtual G4double GetDistanceFromPoint(const G4ThreeVector &, const G4ThreeVector &) const
const G4ErrorTarget * GetTarget(G4bool mustExist=0) const
double G4double
Definition: G4Types.hh:76
static G4ErrorPropagatorData * GetErrorPropagatorData()
#define DBL_MAX
Definition: templates.hh:83

Here is the call graph for this function:

Here is the caller graph for this function:


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