37G4MoleculeLocator::G4MoleculeLocator()
39 fNavigator = std::make_unique<G4ITNavigator>();
44 if (fpInstance ==
nullptr) {
48 if (!fpInstance->fIsInitialized) {
49 fpInstance->Initialize();
54void G4MoleculeLocator::Initialize()
57 ->GetNavigatorForTracking()
59 fIsInitialized =
true;
66 if (pITrack ==
nullptr) {
68 "The track passed to this method appears to not hold an IT (molecule) object!");
71 std::unique_ptr<G4ITNavigatorState_Lock> tmpStateHolder;
75 fNavigator->NewNavigatorState();
76 tmpStateHolder = std::unique_ptr<G4ITNavigatorState_Lock>(fNavigator->GetNavigatorState());
82 fNavigator->LocateGlobalPointAndSetup(pTrack->
GetPosition(), &direction,
false,
false);
92 if (pITrack ==
nullptr) {
94 "The track passed to this method appears to not hold an IT (molecule) object!");
97 fNavigator->NewNavigatorState();
102 fNavigator->LocateGlobalPointAndSetup(pTrack->
GetPosition(), &direction,
false,
false);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4IT * GetIT(const G4Track *track)
G4TemplateRNGHelper< G4long > * G4TemplateRNGHelper< G4long >::instance
CLHEP::Hep3Vector G4ThreeVector
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4TouchableHandle is a type providing reference counting mechanism for any kind of touchable objects....
static G4ITTransportationManager * GetTransportationManager()
G4TrackingInformation * GetTrackingInfo()
void LocateMoleculeSetStateAndTouchable(G4Track *)
G4TouchableHandle LocateMoleculeTrack(const G4Track *)
static G4MoleculeLocator * Instance()
void SetNextTouchableHandle(const G4TouchableHandle &apValue)
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4ThreeVector & GetMomentumDirection() const