56 fWorldVolume ( nullptr ),
57 fIsTrackingTime ( false ),
58 fIsFirstStep ( false ),
59 fGhostNavigator ( nullptr ),
60 fGhostNavigatorIndex ( -1 ),
61 fIsGhostGeometry ( false ),
62 fGhostSafety ( -1.0 ),
64 fFastSimulationManager( nullptr ),
65 fFastSimulationTrigger( false )
76 <<
"' is created, and will message geometry with world volume `"
87 fWorldVolume ( nullptr ),
88 fIsTrackingTime ( false ),
89 fIsFirstStep ( false ),
90 fGhostNavigator ( nullptr ),
91 fGhostNavigatorIndex ( -1 ),
92 fIsGhostGeometry ( false ),
93 fGhostSafety ( -1.0 ),
95 fFastSimulationManager( nullptr ),
96 fFastSimulationTrigger( false )
107 <<
"' is created, and will message geometry with world volume `"
118 fWorldVolume ( nullptr ),
119 fIsTrackingTime ( false ),
120 fIsFirstStep ( false ),
121 fGhostNavigator ( nullptr ),
122 fGhostNavigatorIndex ( -1 ),
123 fIsGhostGeometry ( false ),
124 fGhostSafety ( -1.0 ),
126 fFastSimulationManager( nullptr ),
127 fFastSimulationTrigger( false )
138 <<
"' is created, and will message geometry with world volume `"
159 <<
"': changing of world volume at tracking time is not allowed." <<
G4endl;
160 G4Exception(
"G4FastSimulationManagerProcess::SetWorldVolume(const G4String)",
171 tellWhatIsWrong <<
"Volume newWorldName = `" << newWorldName
172 <<
"' is not a parallel world nor the mass world volume."
174 G4Exception(
"G4FastSimulationManagerProcess::SetWorldVolume(const G4String)",
182 <<
"': changing world volume from '" << fWorldVolume->
GetName()
183 <<
"' to `" << newWorld <<
"'." <<
G4endl;
185 <<
"': setting world volume from to `"<< newWorld->
GetName() <<
"'." <<
G4endl;
187 fWorldVolume = newWorld;
198 tellWhatIsWrong <<
"Null pointer passed for world volume." <<
G4endl;
199 G4Exception(
"G4FastSimulationManagerProcess::SetWorldVolume(const G4VPhysicalVolume* newWorld)",
212 fIsTrackingTime =
true;
217 fGhostNavigator = transportationManager->
GetNavigator(fWorldVolume);
219 if (fIsGhostGeometry) fGhostNavigatorIndex = transportationManager->
ActivateNavigator(fGhostNavigator);
220 else fGhostNavigatorIndex = -1;
230 fIsTrackingTime =
false;
250 if ( fIsGhostGeometry ) currentVolume = fPathFinder->
GetLocatedVolume(fGhostNavigatorIndex);
256 if( fFastSimulationManager )
260 if( fFastSimulationTrigger )
309 if ( fIsGhostGeometry )
312 if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ =
new G4FieldTrack (
'0') ;
316 if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ =
new ELimited ;
317 ELimited &eLimited = *eLimited_G4MT_TLS_;
319 if (previousStepSize > 0.) fGhostSafety -= previousStepSize;
320 if (fGhostSafety < 0.) fGhostSafety = 0.0;
325 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.)
328 returnedStep = currentMinimumStep;
329 proposedSafety = fGhostSafety - currentMinimumStep;
335 returnedStep = fPathFinder->
ComputeStep(fFieldTrack,
337 fGhostNavigatorIndex,
345 proposedSafety = fGhostSafety;
366 return &fDummyParticleChange;
381 if ( fIsGhostGeometry ) currentVolume = fPathFinder->
GetLocatedVolume(fGhostNavigatorIndex);
384 if( fFastSimulationManager )
388 if( fFastSimulationTrigger )
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
@ NotCandidateForSelection
G4GLOB_DLL std::ostream G4cout
G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
virtual ~G4FastSimulationManagerProcess()
void SetWorldVolume(G4String)
G4FastSimulationManagerProcess(const G4String &processName="G4FastSimulationManagerProcess", G4ProcessType theType=fParameterisation)
void StartTracking(G4Track *)
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &step)
G4VParticleChange * InvokePostStepDoIt()
G4VParticleChange * InvokeAtRestDoIt()
G4bool PostStepGetFastSimulationManagerTrigger(const G4Track &, const G4Navigator *a=0)
G4bool AtRestGetFastSimulationManagerTrigger(const G4Track &, const G4Navigator *a=0)
static void Update(G4FieldTrack *, const G4Track *)
G4ThreeVector GetPosition() const
void RemoveFSMP(G4FastSimulationManagerProcess *)
void AddFSMP(G4FastSimulationManagerProcess *)
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()
G4FastSimulationManager * GetFastSimulationManager() const
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
G4VPhysicalVolume * GetWorldVolume() const
G4VPhysicalVolume * GetLocatedVolume(G4int navId) const
G4double ComputeStep(const G4FieldTrack &pFieldTrack, G4double pCurrentProposedStepLength, G4int navigatorId, G4int stepNo, G4double &pNewSafety, ELimited &limitedStep, G4FieldTrack &EndState, G4VPhysicalVolume *currentVolume)
void PrepareNewTrack(const G4ThreeVector &position, const G4ThreeVector &direction, G4VPhysicalVolume *massStartVol=nullptr)
static G4PathFinder * GetInstance()
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetPosition() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetMomentumDirection() const
static G4TransportationManager * GetTransportationManager()
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
G4Navigator * GetNavigatorForTracking() const
G4int ActivateNavigator(G4Navigator *aNavigator)
void DeActivateNavigator(G4Navigator *aNavigator)
G4Navigator * GetNavigator(const G4String &worldName)
void ProposeTrackStatus(G4TrackStatus status)
virtual void Initialize(const G4Track &)
G4TrackStatus GetTrackStatus() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
void SetProcessSubType(G4int)
const G4String & GetProcessName() const