Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ITNavigator2.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4ITNavigator.hh 79045 2014-02-12 13:57:26Z matkara $
27 //
28 // Original author: Paul Kent, July 95/96
29 //
41 //
42 // Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
43 //
44 // WARNING : This class is released as a prototype.
45 // It might strongly evolve or even disappear in the next releases.
46 //
47 // We would be very happy hearing from you, send us your feedback! :)
48 //
49 // History:
50 // - Created. Paul Kent, Jul 95/96
51 // - Zero step protections J.A. / G.C., Nov 2004
52 // - Added check mode G. Cosmo, Mar 2004
53 // - Made Navigator Abstract G. Cosmo, Nov 2003
54 // - G4ITNavigator created M.K., Nov 2012
55 // *********************************************************************
56 
57 #ifndef G4ITNAVIGATOR_HH
58 #define G4ITNAVIGATOR_HH
59 
60 #include "geomdefs.hh"
61 
62 #include "G4ThreeVector.hh"
63 #include "G4AffineTransform.hh"
64 #include "G4RotationMatrix.hh"
65 
66 #include "G4LogicalVolume.hh" // Used in inline methods
67 #include "G4GRSVolume.hh" // " "
68 #include "G4GRSSolid.hh" // " "
69 #include "G4TouchableHandle.hh" // " "
71 
72 #include "G4NavigationHistory.hh"
73 #include "G4NormalNavigation.hh"
74 #include "G4VoxelNavigation.hh"
76 #include "G4ReplicaNavigation.hh"
77 #include "G4RegularNavigation.hh"
78 
79 #include <iostream>
80 #include "G4TrackState.hh"
81 #include <memory>
82 
83 class G4VPhysicalVolume;
84 
86 {
88  {
89  ;
90  }
91 protected:
93  {
94  ;
95  }
97  {
98  ;
99  }
100 };
101 
103 {
104 public:
105  static const G4int fMaxNav = 8; // rename to kMaxNoNav ??
106 
107 public:
108  // with description
109 
110  friend std::ostream& operator <<(std::ostream &os, const G4ITNavigator2 &n);
111 
112  G4ITNavigator2();
113  // Constructor - initialisers and setup.
114 
115  virtual ~G4ITNavigator2();
116  // Destructor. No actions.
117 
118  // !>
121  void NewNavigatorState();
122  void NewNavigatorState(const G4TouchableHistory &h);
123  void ResetNavigatorState();
125  const G4ThreeVector &direction);
126  void CheckNavigatorState() const;
127 
128  inline std::shared_ptr<G4ITNavigatorState_Lock2> GetSnapshotOfState();
129  inline void ResetFromSnapshot(std::shared_ptr<G4ITNavigatorState_Lock2>);
130  // <!
131 
132  virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint,
133  const G4ThreeVector &pDirection,
134  const G4double pCurrentProposedStepLength,
135  G4double &pNewSafety);
136  // Calculate the distance to the next boundary intersected
137  // along the specified NORMALISED vector direction and
138  // from the specified point in the global coordinate
139  // system. LocateGlobalPointAndSetup or LocateGlobalPointWithinVolume
140  // must have been called with the same global point prior to this call.
141  // The isotropic distance to the nearest boundary is also
142  // calculated (usually an underestimate). The current
143  // proposed Step length is used to avoid intersection
144  // calculations: if it can be determined that the nearest
145  // boundary is >pCurrentProposedStepLength away, kInfinity
146  // is returned together with the computed isotropic safety
147  // distance. Geometry must be closed.
148 
149  G4double CheckNextStep(const G4ThreeVector &pGlobalPoint,
150  const G4ThreeVector &pDirection,
151  const G4double pCurrentProposedStepLength,
152  G4double &pNewSafety);
153  // Same as above, but do not disturb the state of the Navigator.
154 
156  const G4ThreeVector &direction,
157  const G4TouchableHistory &h);
158 
159  // Resets the geometrical hierarchy and search for the volumes deepest
160  // in the hierarchy containing the point in the global coordinate space.
161  // The direction is used to check if a volume is entered.
162  // The search begin is the geometrical hierarchy at the location of the
163  // last located point, or the endpoint of the previous Step if
164  // SetGeometricallyLimitedStep() has been called immediately before.
165  //
166  // Important Note: In order to call this the geometry MUST be closed.
167 
168  virtual
170  const G4ThreeVector* direction=0,
171  const G4bool pRelativeSearch=true,
172  const G4bool ignoreDirection=true);
173  // Search the geometrical hierarchy for the volumes deepest in the hierarchy
174  // containing the point in the global coordinate space. Two main cases are:
175  // i) If pRelativeSearch=false it makes use of no previous/state
176  // information. Returns the physical volume containing the point,
177  // with all previous mothers correctly set up.
178  // ii) If pRelativeSearch is set to true, the search begin is the
179  // geometrical hierarchy at the location of the last located point,
180  // or the endpoint of the previous Step if SetGeometricallyLimitedStep()
181  // has been called immediately before.
182  // The direction is used (to check if a volume is entered) if either
183  // - the argument ignoreDirection is false, or
184  // - the Navigator has determined that it is on an edge shared by two or
185  // more volumes. (This is state information.)
186  //
187  // Important Note: In order to call this the geometry MUST be closed.
188 
189  //----------------------------------------------------------------------------
190  EInside InsideCurrentVolume(const G4ThreeVector& globalPoint) const;
191 
192  void GetRandomInCurrentVolume(G4ThreeVector& rndmPoint) const;
193  //----------------------------------------------------------------------------
194 
195  virtual
197  // Notify the Navigator that a track has moved to the new Global point
198  // 'position', that is known to be within the current safety.
199  // No check is performed to ensure that it is within the volume.
200  // This method can be called instead of LocateGlobalPointAndSetup ONLY if
201  // the caller is certain that the new global point (position) is inside the
202  // same volume as the previous position. Usually this can be guaranteed
203  // only if the point is within safety.
204 
206  const G4ThreeVector& position,
207  const G4ThreeVector& direction,
208  G4TouchableHandle& oldTouchableToUpdate,
209  const G4bool RelativeSearch = true);
210  // First, search the geometrical hierarchy like the above method
211  // LocateGlobalPointAndSetup(). Then use the volume found and its
212  // navigation history to update the touchable.
213 
215  const G4ThreeVector& position,
216  const G4ThreeVector& direction,
217  G4VTouchable* touchableToUpdate,
218  const G4bool RelativeSearch = true);
219  // First, search the geometrical hierarchy like the above method
220  // LocateGlobalPointAndSetup(). Then use the volume found and its
221  // navigation history to update the touchable.
222 
224  const G4ThreeVector& position,
225  G4VTouchable* touchableToUpdate,
226  const G4bool RelativeSearch = true);
227  // Same as the method above but missing direction.
228 
229  inline void SetGeometricallyLimitedStep();
230  // Inform the navigator that the previous Step calculated
231  // by the geometry was taken in its entirety.
232 
233  virtual G4double ComputeSafety(const G4ThreeVector &globalpoint,
234  const G4double pProposedMaxLength = DBL_MAX,
235  const G4bool keepState = true);
236  // Calculate the isotropic distance to the nearest boundary from the
237  // specified point in the global coordinate system.
238  // The globalpoint utilised must be within the current volume.
239  // The value returned is usually an underestimate.
240  // The proposed maximum length is used to avoid volume safety
241  // calculations. The geometry must be closed.
242  // To ensure minimum side effects from the call, keepState
243  // must be true.
244 
246  const G4ThreeVector &pGlobalPoint,
247  const G4ThreeVector &pDirection,
248  const G4double CurrentProposedStepLength,
249  G4double *prDistance,
250  G4double *prNewSafety=0) const;
251  // Trial method for checking potential displacement for MS
252  // Check new Globalpoint, to see whether it is in current volume
253  // (mother) and not in potential entering daughter.
254  // If in mother, check distance to boundary along pDirection.
255  // If in entering daughter, check distance back to boundary.
256  // NOTE:
257  // Can be called only after ComputeStep is called - before ReLocation
258  // Deals only with current volume (and potentially entered)
259 
260  inline G4VPhysicalVolume* GetWorldVolume() const;
261  // Return the current world (`topmost') volume.
262 
263  inline void SetWorldVolume(G4VPhysicalVolume* pWorld);
264  // Set the world (`topmost') volume. This must be positioned at
265  // origin (0,0,0) and unrotated.
266 
267  inline G4GRSVolume* CreateGRSVolume() const;
268  inline G4GRSSolid* CreateGRSSolid() const;
271  // `Touchable' creation methods: caller has deletion responsibility.
272 
274  // Returns a reference counted handle to a touchable history.
275 
276  virtual G4ThreeVector GetLocalExitNormal(G4bool* valid);
278  G4bool* valid);
279  virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector& point,
280  G4bool* valid);
281  // Return Exit Surface Normal and validity too.
282  // Can only be called if the Navigator's last Step has crossed a
283  // volume geometrical boundary.
284  // It returns the Normal to the surface pointing out of the volume that
285  // was left behind and/or into the volume that was entered.
286  // Convention:
287  // The *local* normal is in the coordinate system of the *final* volume.
288  // Restriction:
289  // Normals are not available for replica volumes (returns valid= false)
290  // These methods takes full care about how to calculate this normal,
291  // but if the surfaces are not convex it will return valid=false.
292 
293  inline G4int GetVerboseLevel() const;
294  inline void SetVerboseLevel(G4int level);
295  // Get/Set Verbose(ness) level.
296  // [if level>0 && G4VERBOSE, printout can occur]
297 
298  inline G4bool IsActive() const;
299  // Verify if the navigator is active.
300  inline void Activate(G4bool flag);
301  // Activate/inactivate the navigator.
302 
303  inline G4bool EnteredDaughterVolume() const;
304  // The purpose of this function is to inform the caller if the track is
305  // entering a daughter volume while exiting from the current volume.
306  // This method returns
307  // - True only in case 1) above, that is when the Step has caused
308  // the track to arrive at a boundary of a daughter.
309  // - False in cases 2), 3) and 4), i.e. in all other cases.
310  // This function is not guaranteed to work if SetGeometricallyLimitedStep()
311  // was not called when it should have been called.
312  inline G4bool ExitedMotherVolume() const;
313  // Verify if the step has exited the mother volume.
314 
315  inline void CheckMode(G4bool mode);
316  // Run navigation in "check-mode", therefore using additional
317  // verifications and more strict correctness conditions.
318  // Is effective only with G4VERBOSE set.
319  inline G4bool IsCheckModeActive() const;
320  inline void SetPushVerbosity(G4bool mode);
321  // Set/unset verbosity for pushed tracks (default is true).
322 
323  void PrintState() const;
324  // Print the internal state of the Navigator (for debugging).
325  // The level of detail is according to the verbosity.
326 
327  inline const G4AffineTransform& GetGlobalToLocalTransform() const;
328  inline const G4AffineTransform GetLocalToGlobalTransform() const;
329  // Obtain the transformations Global/Local (and inverse).
330  // Clients of these methods must copy the data if they need to keep it.
331 
333  G4int dReplicaNo,
334  EVolume dVolumeType );
335  // Obtain mother to daughter transformation
336 
337  inline void ResetStackAndState();
338  // Reset stack and minimum or navigator state machine necessary for reset
339  // as needed by LocalGlobalPointAndSetup.
340  // [Does not perform clears, resizes, or reset fLastLocatedPointLocal]
341 
342  inline G4int SeverityOfZeroStepping( G4int* noZeroSteps ) const;
343  // Report on severity of error and number of zero steps,
344  // in case Navigator is stuck and is returning zero steps.
345  // Values: 1 (small problem), 5 (correcting),
346  // 9 (ready to abandon), 10 (abandoned)
347 
348  /*
349  void SetSavedState();
350  // ( fValidExitNormal, fExitNormal, fExiting, fEntering,
351  // fBlockedPhysicalVolume, fBlockedReplicaNo, fLastStepWasZero);
352  void RestoreSavedState();
353  // Copy aspects of the state, to enable a non-state changing
354  // call to ComputeStep
355  */
357  // Return the local coordinate of the point in the reference system
358  // of its containing volume that was found by LocalGlobalPointAndSetup.
359  // The local coordinate of the last located track.
360 
361  inline G4ThreeVector NetTranslation() const;
362  inline G4RotationMatrix NetRotation() const;
363  // Compute+return the local->global translation/rotation of current volume.
364 
365  inline void EnableBestSafety( G4bool value= false );
366  // Enable best-possible evaluation of isotropic safety
367 
368 protected:// with description
369 
370  inline G4ThreeVector ComputeLocalPoint(const G4ThreeVector& rGlobPoint) const;
371  // Return position vector in local coordinate system, given a position
372  // vector in world coordinate system.
373 
374  inline G4ThreeVector ComputeLocalAxis(const G4ThreeVector& pVec) const;
375  // Return the local direction of the specified vector in the reference
376  // system of the volume that was found by LocalGlobalPointAndSetup.
377  // The Local Coordinates of point in world coordinate system.
378 
379  virtual void ResetState();
380  // Utility method to reset the navigator state machine.
381 
382  inline EVolume VolumeType(const G4VPhysicalVolume *pVol) const;
383  // Characterise `type' of volume - normal/replicated/parameterised.
384 
385  inline EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const;
386  // Characterise daughter of logical volume.
387 
388  inline G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const;
389  // Get regular structure ID of first daughter
390 
391  virtual void SetupHierarchy();
392  // Renavigate & reset hierarchy described by current history
393  // o Reset volumes
394  // o Recompute transforms and/or solids of replicated/parameterised
395  // volumes.
396 
397 private:
398 
400  G4ITNavigator2& operator=(const G4ITNavigator2&);
401  // Private copy-constructor and assignment operator.
402 
403  void ComputeStepLog(const G4ThreeVector& pGlobalpoint,
404  G4double moveLenSq) const;
405  // Log and checks for steps larger than the tolerance
406 
407 protected:// without description
408 
410  // Geometrical tolerance for surface thickness of shapes.
411 
413  // Verbose(ness) level [if > 0, printout can occur].
414 
415 private:
416 
417  G4bool fActive;
418  // States if the navigator is activated or not.
419 
420  G4int fActionThreshold_NoZeroSteps;
421  // After this many failed/zero steps, act (push etc)
422  G4int fAbandonThreshold_NoZeroSteps;
423  // After this many failed/zero steps, abandon track
424 
425 protected:
426 public:
427  struct G4SaveNavigatorState;
428 
429  //
430  // BEGIN State information
431  //
433  {
437  { ;}
438 
441 
442  void ResetState();
443  void ResetStack();
444  void ResetStackAndState();
445 
447  // Transformation and history of the current path
448  // through the geometrical hierarchy.
449 
451  // A memory of whether in this Step a daughter volume is entered
452  // (set in Compute & Locate).
453  // After Compute: it expects to enter a daughter
454  // After Locate: it has entered a daughter
455 
457  // A similar memory whether the Step exited current "mother" volume
458  // completely, not entering daughter.
459 
461  // Set true if last Step was limited by geometry.
462 
464  // Endpoint of last ComputeStep
465  // can be used for optimisation (e.g. when computing safety).
467  // Position of the end-point of the last call to ComputeStep
468  // in last Local coordinates.
469 
471  // Push flags [if true, means a stuck particle has been pushed].
472 
473  private:
474  friend class G4ITNavigator2;
475  // The friend class would allow G4Navigator to access the private members
476  // of G4NavigatorState but not the classes inheriting from G4Navigator
477 
478  friend struct G4SaveNavigatorState;
479  friend std::ostream& operator << (std::ostream &os,const G4ITNavigator2 &n);
480 
482  // Whether ComputeStep was called since the last call to a Locate method
483  // Uses: - distinguish parts of state which differ before/after calls
484  // to ComputeStep or one of the Locate methods;
485  // - avoid two consecutive calls to compute-step (illegal).
486 
488  // Entering/Exiting volumes blocking/setup
489  // o If exiting
490  // volume ptr & replica number (set & used by Locate..())
491  // used for blocking on redescent of geometry
492  // o If entering
493  // volume ptr & replica number (set by ComputeStep(),used by
494  // Locate..()) of volume for `automatic' entry
495 
498 
500  // Position of the last located point relative to its containing volume.
502  // Whether the last call to Locate methods left the world
503 
504  G4bool fValidExitNormal;// Set true if have leaving volume normal
505  G4ThreeVector fExitNormal;// Leaving volume normal, in the
506  // volume containing the exited
507  // volume's coordinate system
508  G4ThreeVector fGrandMotherExitNormal;// Leaving volume normal, in its
509  // own coordinate system
510  G4bool fChangedGrandMotherRefFrame;// Whether frame is changed
511 
512  G4ThreeVector fExitNormalGlobalFrame;// Leaving volume normal, in the
513  // global coordinate system
514  G4bool fCalculatedExitNormal;// Has it been computed since
515  // the last call to ComputeStep
516  // Covers both Global and GrandMother
517 
518  // Count zero steps - as one or two can occur due to changing momentum at
519  // a boundary or at an edge common between volumes
520  // - several are likely a problem in the geometry
521  // description or in the navigation
522  //
524  // Whether the last ComputeStep moved Zero. Used to check for edges.
525 
527  // Whether the Navigator has detected an edge
529  // Number of preceding moves that were Zero. Reset to 0 after finite step
530 
533  // Memory of last safety origin & value. Used in ComputeStep to ensure
534  // that origin of current Step is in the same volume as the point of the
535  // last relocation
536 
537  //
538  // END State information
539  //
540  };
541 
543 
544  // Save key state information (NOT the navigation history stack)
545  //
547  {
551  { ;}
558 
559  // !>
560 // G4bool sLocatedOnEdge;
561 // G4bool sPushed;
562 // G4int sNumberZeroSteps;
563  // <!
564 
565  // Potentially relevant
566  //
571 
574  };
575 
576  // G4SaveNavigatorState* fpSaveState;
577 
578  // Tracking Invariants
579  //
581  // A link to the topmost physical volume in the detector.
582  // Must be positioned at the origin and unrotated.
583 
584  // Utility information
585  //
587  // Check-mode flag [if true, more strict checks are performed].
588 
590  // Push flag [for verbose].
591 
592  // Helpers/Utility classes
593  //
600 };
601 
602 RegisterTrackState(G4ITNavigator2, G4NavigatorState)
603 
604 #define CheckNavigatorStateIsValid() \
605 if(fpNavigatorState == 0) \
606 { \
607  G4ExceptionDescription exceptionDescription; \
608  exceptionDescription << "The navigator state is NULL. "; \
609  exceptionDescription << "Either NewNavigatorStateAndLocate was not called "; \
610  exceptionDescription << "or the provided navigator state was already NULL."; \
611  G4Exception((G4String("G4Navigator")+G4String(__FUNCTION__)).c_str(),\
612  "NavigatorStateNotValid",FatalException,exceptionDescription); \
613 }
614 
615 #include "G4ITNavigator2.icc"
616 
617 #endif
618 
619 // NOTES:
620 //
621 // The following methods provide detailed information when a Step has
622 // arrived at a geometrical boundary. They distinguish between the different
623 // causes that can result in the track leaving its current volume.
624 //
625 // Four cases are possible:
626 //
627 // 1) The particle has reached a boundary of a daughter of the current volume:
628 // (this could cause the relocation to enter the daughter itself
629 // or a potential granddaughter or further descendant)
630 //
631 // 2) The particle has reached a boundary of the current
632 // volume, exiting into a mother (regardless the level
633 // at which it is located in the tree):
634 //
635 // 3) The particle has reached a boundary of the current
636 // volume, exiting into a volume which is not in its
637 // parental hierarchy:
638 //
639 // 4) The particle is not on a boundary between volumes:
640 // the function returns an exception, and the caller is
641 // reccomended to compare the G4touchables associated
642 // to the preStepPoint and postStepPoint to handle this case.
643 //
644 // G4bool EnteredDaughterVolume()
645 // G4bool IsExitNormalValid()
646 // G4ThreeVector GetLocalExitNormal()
647 //
648 // The expected usefulness of these methods is to allow the caller to
649 // determine how to compute the surface normal at the volume boundary. The two
650 // possibilities are to obtain the normal from:
651 //
652 // i) the solid associated with the volume of the initial point of the Step.
653 // This is valid for cases 2 and 3.
654 // (Note that the initial point is generally the PreStepPoint of a Step).
655 // or
656 //
657 // ii) the solid of the final point, ie of the volume after the relocation.
658 // This is valid for case 1.
659 // (Note that the final point is generally the PreStepPoint of a Step).
660 //
661 // This way the caller can always get a valid normal, pointing outside
662 // the solid for which it is computed, that can be used at his own
663 // discretion.
#define fBlockedPhysicalVolume
#define fValidExitNormal
void LocateGlobalPointAndUpdateTouchableHandle(const G4ThreeVector &position, const G4ThreeVector &direction, G4TouchableHandle &oldTouchableToUpdate, const G4bool RelativeSearch=true)
std::shared_ptr< G4ITNavigatorState_Lock2 > GetSnapshotOfState()
G4ITNavigatorState_Lock2 * GetNavigatorState()
G4VPhysicalVolume * spBlockedPhysicalVolume
#define fExiting
virtual void SetupHierarchy()
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
#define RegisterTrackState(CLASS, STATE)
#define fLocatedOnEdge
const char * p
Definition: xmltok.h:285
void CheckNavigatorState() const
G4VoxelSafety * fpVoxelSafety
void Activate(G4bool flag)
void ResetNavigatorState()
void ResetStackAndState()
friend std::ostream & operator<<(std::ostream &os, const G4ITNavigator2 &n)
G4TouchableHistory * CreateTouchableHistory() const
G4VPhysicalVolume * fTopPhysical
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
#define fLastTriedStepComputation
G4bool IsCheckModeActive() const
G4NavigatorState * fpNavigatorState
G4VPhysicalVolume * NewNavigatorStateAndLocate(const G4ThreeVector &p, const G4ThreeVector &direction)
void SetWorldVolume(G4VPhysicalVolume *pWorld)
#define fExitNormalGlobalFrame
virtual ~G4ITNavigator2()
int G4int
Definition: G4Types.hh:78
void SetGeometricallyLimitedStep()
static const G4int fMaxNav
G4GRSVolume * CreateGRSVolume() const
#define fExitNormal
G4GRSSolid * CreateGRSSolid() const
#define fLastStepWasZero
G4NavigatorState & operator=(const G4NavigatorState &)
G4ThreeVector ComputeLocalAxis(const G4ThreeVector &pVec) const
void GetRandomInCurrentVolume(G4ThreeVector &rndmPoint) const
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4RotationMatrix NetRotation() const
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
#define fEntering
bool G4bool
Definition: G4Types.hh:79
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4ITNavigatorState_Lock2(const G4ITNavigatorState_Lock2 &)
#define fChangedGrandMotherRefFrame
G4RegularNavigation fregularNav
G4NormalNavigation fnormalNav
#define fCalculatedExitNormal
EVolume VolumeType(const G4VPhysicalVolume *pVol) const
G4ReplicaNavigation freplicaNav
G4double kCarTolerance
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
void EnableBestSafety(G4bool value=false)
friend std::ostream & operator<<(std::ostream &os, const G4ITNavigator2 &n)
G4ParameterisedNavigation fparamNav
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
#define fGrandMotherExitNormal
#define fBlockedReplicaNo
EInside InsideCurrentVolume(const G4ThreeVector &globalPoint) const
void PrintState() const
G4bool ExitedMotherVolume() const
G4ThreeVector NetTranslation() const
G4ThreeVector ComputeLocalPoint(const G4ThreeVector &rGlobPoint) const
G4VoxelNavigation fvoxelNav
void ResetFromSnapshot(std::shared_ptr< G4ITNavigatorState_Lock2 >)
#define fPreviousSftOrigin
EInside
Definition: geomdefs.hh:58
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
#define fPreviousSafety
void SetNavigatorState(G4ITNavigatorState_Lock2 *)
const G4AffineTransform & GetGlobalToLocalTransform() const
G4int GetDaughtersRegularStructureId(const G4LogicalVolume *pLog) const
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
G4VPhysicalVolume * GetWorldVolume() const
G4int GetVerboseLevel() const
G4bool EnteredDaughterVolume() const
void CheckMode(G4bool mode)
#define fLocatedOutsideWorld
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &point, G4bool *valid)
virtual void ResetState()
EVolume
Definition: geomdefs.hh:69
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4ThreeVector GetCurrentLocalCoordinate() const
#define fLastLocatedPointLocal
double G4double
Definition: G4Types.hh:76
void NewNavigatorState()
void SetVerboseLevel(G4int level)
G4bool IsActive() const
void LocateGlobalPointAndUpdateTouchable(const G4ThreeVector &position, const G4ThreeVector &direction, G4VTouchable *touchableToUpdate, const G4bool RelativeSearch=true)
#define DBL_MAX
Definition: templates.hh:83
void SetPushVerbosity(G4bool mode)
const G4AffineTransform GetLocalToGlobalTransform() const
G4int SeverityOfZeroStepping(G4int *noZeroSteps) const
#define fNumberZeroSteps
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
EVolume CharacteriseDaughters(const G4LogicalVolume *pLog) const
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume *dVolume, G4int dReplicaNo, EVolume dVolumeType)