43 fParallelWorldSafety( 0.0 ),
44 fIsTrackingTime ( false ),
65 <<
"': adding a parallel world volume at tracking time is not allowed." <<
G4endl;
66 G4Exception(
"G4ParallelGeometriesLimiterProcess::AddParallelWorld(const G4String& parallelWorldName)",
82 tellWhatIsWrong <<
"Volume `" << parallelWorldName
83 <<
"' is not a parallel world nor the mass world volume."
85 G4Exception(
"G4ParallelGeometriesLimiterProcess::SetWorldVolume(const G4String)",
96 <<
"': trying to add the world volume for tracking as a parallel world." <<
G4endl;
97 G4Exception(
"G4ParallelGeometriesLimiterProcess::AddParallelWorld(const G4String& parallelWorldName)",
108 if ( knownWorld == newWorld ) isNew =
false;
110 if ( isNew ) fParallelWorlds.push_back( newWorld );
115 <<
"': trying to re-add the parallel world volume `" << parallelWorldName <<
"'." <<
G4endl;
116 G4Exception(
"G4ParallelGeometriesLimiterProcess::AddParallelWorld(const G4String& parallelWorldName)",
135 <<
"': removing a parallel world volume at tracking time is not allowed." <<
G4endl;
136 G4Exception(
"G4ParallelGeometriesLimiterProcess::RemoveParallelWorld(const G4String& parallelWorldName)",
153 <<
"': trying to remove an inexisting parallel world '" << parallelWorldName <<
"'." <<
G4endl;
154 G4Exception(
"G4ParallelGeometriesLimiterProcess::RemoveParallelWorld(const G4String& parallelWorldName)",
165 if ( knownWorld == newWorld )
break;
169 if ( iWorld == fParallelWorlds.size() )
173 <<
"': trying to remove an non-registerered parallel world '" << parallelWorldName <<
"'." <<
G4endl;
174 G4Exception(
"G4ParallelGeometriesLimiterProcess::RemoveParallelWorld(const G4String& parallelWorldName)",
182 fParallelWorlds.erase( fParallelWorlds.begin() + iWorld );
270 if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ =
new G4FieldTrack (
'0') ;
274 if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ =
new ELimited ;
275 ELimited &eLimited = *eLimited_G4MT_TLS_;
281 if ( previousStepSize > 0.0 )
285 parallelWorldSafety -= previousStepSize;
286 if ( parallelWorldSafety < 0. ) parallelWorldSafety = 0.0;
299 returnedStep = currentMinimumStep;
305 G4double smallestReturnedStep = -1.0;
322 if ( ( smallestReturnedStep < 0.0 ) || ( tmpReturnedStep <= smallestReturnedStep ) )
324 smallestReturnedStep = tmpReturnedStep;
325 eLimitedForSmallestStep = eLimited;
346 if ( eLimitedForSmallestStep ==
kDoNot )
348 returnedStep = currentMinimumStep;
351 if ( eLimitedForSmallestStep ==
kUnique ||
355 returnedStep = smallestReturnedStep;
359 returnedStep = smallestReturnedStep* (1.0 + 1.0e-9);
397 ed <<
" Trying to add more than one G4ParallelGeometriesLimiterProcess process to the process manager " << mgr
399 G4Exception(
" G4ParallelGeometriesLimiterProcess::SetProcessManager(...)",
413 if ( world == parallelWorld )
G4ParallelGeometriesLimiterProcess(const G4String &processName="biasLimiter")
std::ostringstream G4ExceptionDescription
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
G4VPhysicalVolume * GetLocatedVolume(G4int navId) const
void StartTracking(G4Track *)
G4int GetParallelWorldIndex(const G4VPhysicalVolume *parallelWorld) const
const G4String & GetParticleName() const
G4double fParallelWorldSafety
G4Navigator * GetNavigatorForTracking() const
G4int GetCurrentStepNumber() const
G4double condition(const G4ErrorSymMatrix &m)
void AddParallelWorld(const G4String ¶llelWorldName)
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
G4double ComputeStep(const G4FieldTrack &pFieldTrack, G4double pCurrentProposedStepLength, G4int navigatorId, G4int stepNo, G4double &pNewSafety, ELimited &limitedStep, G4FieldTrack &EndState, G4VPhysicalVolume *currentVolume)
G4ParticleChangeForNothing fDummyParticleChange
std::vector< G4Navigator * > fParallelWorldNavigators
std::vector< G4double > fParallelWorldSafeties
virtual void Initialize(const G4Track &track)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
G4PathFinder * fPathFinder
virtual void SetProcessManager(const G4ProcessManager *)
std::vector< G4VPhysicalVolume * > fParallelWorlds
std::vector< G4bool > fParallelWorldWasLimiting
G4ParticleDefinition * GetParticleType() const
const G4String & GetProcessName() const
const G4ThreeVector & GetPosition() const
std::vector< G4bool > fParallelWorldIsLimiting
static G4TransportationManager * GetTransportationManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ParallelGeometriesLimiterProcess * fParallelGeometriesLimiterProcess
std::vector< G4int > fParallelWorldNavigatorIndeces
static G4MapCache< const G4ProcessManager *, G4BiasingProcessSharedData * > fSharedDataMap
void PrepareNewTrack(const G4ThreeVector &position, const G4ThreeVector &direction, G4VPhysicalVolume *massStartVol=0)
G4int ActivateNavigator(G4Navigator *aNavigator)
std::vector< const G4VPhysicalVolume * > fPreviousVolumes
G4TransportationManager * fTransportationManager
std::vector< const G4VPhysicalVolume * > fCurrentVolumes
G4VPhysicalVolume * GetWorldVolume() const
const G4ThreeVector & GetMomentumDirection() const
static G4PathFinder * GetInstance()
void DeActivateNavigator(G4Navigator *aNavigator)
G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &step)
const G4Navigator * GetNavigator(G4int worldIndex) const
G4VPhysicalVolume * GetVolume() const
static void Update(G4FieldTrack *, const G4Track *)
void RemoveParallelWorld(const G4String ¶llelWorldName)