58 G4Exception(
"G4TransportationManager::G4TransportationManager()",
60 "Only ONE instance of G4TransportationManager is allowed!");
189 wLV, worldName,
nullptr,
false, 0);
208 if ((*pNav)->GetWorldVolume()->GetName() == worldName) {
return *pNav; }
216 if(aWorld !=
nullptr)
225 =
"World volume with name -" + worldName
226 +
"- does not exist. Create it first by GetParallelWorld() method!";
227 G4Exception(
"G4TransportationManager::GetNavigator(name)",
245 if ((*pNav)->GetWorldVolume() == aWorld) {
return *pNav; }
248 auto pWorld = std::find(
fWorlds.cbegin(),
fWorlds.cend(), aWorld);
258 =
"World volume with name -" + aWorld->
GetName()
259 +
"- does not exist. Create it first by GetParallelWorld() method!";
260 G4Exception(
"G4TransportationManager::GetNavigator(pointer)",
279 G4Exception(
"G4TransportationManager::DeRegisterNavigator()",
281 "The navigator for tracking CANNOT be deregistered!");
298 +
"- not found in memory!";
299 G4Exception(
"G4TransportationManager::DeRegisterNavigator()",
320 +
"- not found in memory!";
321 G4Exception(
"G4TransportationManager::ActivateNavigator()",
331 if (*pActiveNav == aNavigator) {
return id; }
351 (*pNav)->Activate(
false);
357 +
"- not found in memory!";
358 G4Exception(
"G4TransportationManager::DeActivateNavigator()",
381 (*pNav)->Activate(
false);
401 if ( *pWorld==
nullptr ) { *pWorld=
fNavigators[0]->GetWorldVolume(); }
403 for (
auto cpWorld=
fWorlds.cbegin(); cpWorld!=
fWorlds.cend(); ++cpWorld)
405 if ((*cpWorld)->GetName() ==
name ) {
return *cpWorld; }
421 auto pWorld = std::find(
fWorlds.cbegin(),
fWorlds.cend(), aWorld);
439 auto pWorld = std::find(
fWorlds.cbegin(),
fWorlds.cend(), aWorld);
447 =
"World volume -" + aWorld->
GetName() +
"- not found in memory!";
448 G4Exception(
"G4TransportationManager::DeRegisterWorld()",
467 if (*pNav != trackingNavigator) {
delete *pNav; }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4VSolid * GetSolid() const
void Activate(G4bool flag)
G4VExternalNavigation * GetExternalNavigation() const
G4Navigator * Clone() const
void SetWorldVolume(G4VPhysicalVolume *pWorld)
G4VPhysicalVolume * GetWorldVolume() const
void SetNavigatorForPropagating(G4Navigator *SimpleOrMultiNavigator)
G4TransportationManager()
G4bool RegisterWorld(G4VPhysicalVolume *aWorld)
G4GeometryMessenger * fGeomMessenger
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
G4PropagatorInField * fPropagatorInField
std::vector< G4VPhysicalVolume * > fWorlds
static G4TransportationManager * GetTransportationManager()
void SetFieldManager(G4FieldManager *newFieldManager)
static G4TransportationManager * GetInstanceIfExist()
static void SetFirstTrackingNavigator(G4Navigator *nav)
std::vector< G4Navigator * > fNavigators
static G4Navigator * fFirstTrackingNavigator
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
G4SafetyHelper * fSafetyHelper
G4Navigator * GetNavigatorForTracking() const
void DeRegisterWorld(G4VPhysicalVolume *aWorld)
static G4ThreadLocal G4TransportationManager * fTransportationManager
~G4TransportationManager()
G4int ActivateNavigator(G4Navigator *aNavigator)
std::vector< G4Navigator * > fActiveNavigators
void DeActivateNavigator(G4Navigator *aNavigator)
G4Navigator * GetNavigator(const G4String &worldName)
G4FieldManager * fFieldManager
void ClearParallelWorlds()
void DeRegisterNavigator(G4Navigator *aNavigator)
void SetNavigatorForTracking(G4Navigator *newNavigator)
static G4Navigator * GetFirstTrackingNavigator()
const G4RotationMatrix * GetRotation() const
const G4ThreeVector GetTranslation() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
const char * name(G4int ptype)