17#ifndef ROOT_TG4RootNavigator
18#define ROOT_TG4RootNavigator
22#include "G4Navigator.hh"
30class G4TrackingManager;
73 virtual G4double
ComputeStep(
const G4ThreeVector& pGlobalPoint,
74 const G4ThreeVector& pDirection,
const G4double pCurrentProposedStepLength,
75 G4double& pNewSafety);
77 const G4ThreeVector& direction,
const G4TouchableHistory& h);
79 const G4ThreeVector& point,
const G4ThreeVector* direction = 0,
80 const G4bool pRelativeSearch =
true,
const G4bool ignoreDirection =
true);
88 const G4ThreeVector& globalpoint,
const G4double pProposedMaxLength);
89 virtual G4double
ComputeSafety(
const G4ThreeVector& globalpoint,
90 const G4double pProposedMaxLength,
const G4bool keepState);
94 const G4ThreeVector& point, G4bool* valid);
114 std::function<Bool_t(Int_t)> restoreGeoStateFunction);
Builder creating a pseudo G4 geometry starting from a TGeo geometry.
GEANT4 navigator using directly a TGeo geometry.
virtual ~TG4RootNavigator()
G4VPhysicalVolume * SynchronizeHistory()
G4double fLastSafety
Last computed safety.
void SetG4TrackingManager(G4TrackingManager *trackingManager)
Set current G4TrackingManager.
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength)
TG4RootDetectorConstruction * fDetConstruction
virtual G4ThreeVector GetLocalExitNormal(G4bool *valid)
virtual G4TouchableHandle CreateTouchableHistoryHandle() const
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
G4NavigationHistory * GetHistory()
Return the navigation history.
TGeoNode * SynchronizeGeoManager()
TGeoManager * fGeometry
TGeo geometry manager.
TGeoNavigator * fNavigator
TGeo navigator.
void SetGeometryRestoreFunction(std::function< Bool_t(Int_t)> restoreGeoStateFunction)
Int_t fNzeroSteps
Number of zero steps in ComputeStep.
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &point, G4bool *valid)
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4ThreeVector fNextPoint
Crossing point with next boundary.
G4ThreeVector fSafetyOrig
Last computed safety origin.
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4TrackingManager * fG4TrackingManager
Store pointer to G4TrackingManager.
std::function< Bool_t(Int_t)> fRestoreGeoStateFunction
virtual G4double ComputeStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
Bool_t fStepExiting
Next step is exiting current volume.
void SetDetectorConstruction(TG4RootDetectorConstruction *dc)
Bool_t fStepEntering
Next step is entering daughter.