Project
Loading...
Searching...
No Matches
o2::simsetup::VecGeomG4Navigator Class Reference

#include <VecGeomG4Navigator.h>

Inherits o2::simsetup::VecGeomG4NavigatorBase.

Public Member Functions

 VecGeomG4Navigator (VecGeomG4Map const &map, double pushDepth, bool zeroSafety)
 
 ~VecGeomG4Navigator () override
 
G4double ComputeStep (const G4ThreeVector &globalPoint, const G4ThreeVector &direction, const G4double proposedStepLength, G4double &newSafety) override
 
G4VPhysicalVolume * ResetHierarchyAndLocate (const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &history) override
 
G4VPhysicalVolume * LocateGlobalPointAndSetup (const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool relativeSearch=true, const G4bool ignoreDirection=true) override
 
void LocateGlobalPointWithinVolume (const G4ThreeVector &position) override
 
G4double ComputeSafety (const G4ThreeVector &globalPoint, const G4double proposedMaxLength=DBL_MAX, const G4bool keepState=true) override
 
G4ThreeVector GetLocalExitNormal (G4bool *valid) override
 
G4ThreeVector GetGlobalExitNormal (const G4ThreeVector &point, G4bool *valid) override
 

Additional Inherited Members

- Protected Types inherited from o2::simsetup::VecGeomG4NavigatorBase
using V3 = vecgeom::Vector3D< double >
 
- Protected Member Functions inherited from o2::simsetup::VecGeomG4NavigatorBase
 VecGeomG4NavigatorBase (VecGeomG4Map const &map)
 
G4VPhysicalVolume * historyFromState (vecgeom::NavigationState const &state)
 
bool stateFromHistory (vecgeom::NavigationState &state) const
 
- Static Protected Member Functions inherited from o2::simsetup::VecGeomG4NavigatorBase
static V3 toVG (const G4ThreeVector &p)
 
static V3 toDir (const G4ThreeVector &d)
 
static bool directionLeaves (const V3 &n, const V3 &dir)
 
static bool directionLeaves (vecgeom::NavigationState const &exited, const V3 &point, const V3 &dir)
 The same, with the normal taken from exited, which has the volume left on top.
 
- Protected Attributes inherited from o2::simsetup::VecGeomG4NavigatorBase
VecGeomG4Map const & mMap
 
- Static Protected Attributes inherited from o2::simsetup::VecGeomG4NavigatorBase
static constexpr double kG4ToVG = 1. / CLHEP::cm
 
static constexpr double kVGToG4 = CLHEP::cm
 

Detailed Description

A Geant4 tracking navigator that answers every navigation query from VecGeom while keeping the Geant4 navigation history, the touchable the scoring code reads, in step with the VecGeom state. Selected with G4.vecgeomNavigator=kRelocating, the default. It works as G4VecGeomNav's TG4VecGeomNavigator does:

  • ComputeStep leaves the current volume alone. It records whether the step ends on a boundary and, for a daughter hit, the state that enters it.
  • The locate on a boundary relocates: into the recorded daughter, or out of the current volume. The point is first pushed across the face by a small depth, and afterwards leaves every volume it is flush with and heading out of. As in Geant4, the volume left is blocked only in the first ComputeStep after the exit, and only while the direction points away from it.
  • Safety is zero only at the boundary point itself.

Unlike TG4VecGeomNavigator, the VecGeom geometry is converted from TGeo, not from Geant4, so one VecGeom placement can stand for a chain of g4root volumes (VecGeomG4Map).

Definition at line 35 of file VecGeomG4Navigator.h.

Constructor & Destructor Documentation

◆ VecGeomG4Navigator()

o2::simsetup::VecGeomG4Navigator::VecGeomG4Navigator ( VecGeomG4Map const &  map,
double  pushDepth,
bool  zeroSafety 
)
Parameters
pushDepthhow far past a face (cm, measured across it) a boundary point is pushed before it is located.
zeroSafetyanswers zero to every safety query.

Definition at line 48 of file VecGeomG4Navigator.cxx.

◆ ~VecGeomG4Navigator()

o2::simsetup::VecGeomG4Navigator::~VecGeomG4Navigator ( )
override

Definition at line 54 of file VecGeomG4Navigator.cxx.

Member Function Documentation

◆ ComputeSafety()

G4double o2::simsetup::VecGeomG4Navigator::ComputeSafety ( const G4ThreeVector &  globalPoint,
const G4double  proposedMaxLength = DBL_MAX,
const G4bool  keepState = true 
)
override

Definition at line 419 of file VecGeomG4Navigator.cxx.

◆ ComputeStep()

G4double o2::simsetup::VecGeomG4Navigator::ComputeStep ( const G4ThreeVector &  globalPoint,
const G4ThreeVector &  direction,
const G4double  proposedStepLength,
G4double &  newSafety 
)
override

Definition at line 110 of file VecGeomG4Navigator.cxx.

◆ GetGlobalExitNormal()

G4ThreeVector o2::simsetup::VecGeomG4Navigator::GetGlobalExitNormal ( const G4ThreeVector &  point,
G4bool *  valid 
)
override

Definition at line 497 of file VecGeomG4Navigator.cxx.

◆ GetLocalExitNormal()

G4ThreeVector o2::simsetup::VecGeomG4Navigator::GetLocalExitNormal ( G4bool *  valid)
override

Definition at line 478 of file VecGeomG4Navigator.cxx.

◆ LocateGlobalPointAndSetup()

G4VPhysicalVolume * o2::simsetup::VecGeomG4Navigator::LocateGlobalPointAndSetup ( const G4ThreeVector &  point,
const G4ThreeVector *  direction = nullptr,
const G4bool  relativeSearch = true,
const G4bool  ignoreDirection = true 
)
override

Definition at line 286 of file VecGeomG4Navigator.cxx.

◆ LocateGlobalPointWithinVolume()

void o2::simsetup::VecGeomG4Navigator::LocateGlobalPointWithinVolume ( const G4ThreeVector &  position)
override

Definition at line 406 of file VecGeomG4Navigator.cxx.

◆ ResetHierarchyAndLocate()

G4VPhysicalVolume * o2::simsetup::VecGeomG4Navigator::ResetHierarchyAndLocate ( const G4ThreeVector &  point,
const G4ThreeVector &  direction,
const G4TouchableHistory &  history 
)
override

Definition at line 360 of file VecGeomG4Navigator.cxx.


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