71 return std::numeric_limits<T>::has_infinity
72 && value == std::numeric_limits<T>::infinity();
82 fpTrackingManager = 0;
99 fSelectedAtRestDoItVector(
G4VITProcess::GetMaxProcessIndex(), 0),
100 fSelectedPostStepDoItVector(
G4VITProcess::GetMaxProcessIndex(), 0)
119 fSelectedAtRestDoItVector(right.fSelectedAtRestDoItVector),
120 fSelectedPostStepDoItVector(right.fSelectedPostStepDoItVector)
141 if(
this == &right)
return *
this;
173 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it;
175 for(it = fProcessGeneralInfoMap.begin(); it != fProcessGeneralInfoMap.end();
185 fProcessGeneralInfoMap.clear();
192 fInitialized =
false;
202 if(fInitialized)
return;
206 ->GetNavigatorForTracking());
237 if(fpSecondary)
delete fpSecondary;
247 fpVerbose = rhs.fpVerbose;
248 fStoreTrajectory = rhs.fStoreTrajectory;
251 fpTrackingManager = 0;
253 fInitialized =
false;
255 kCarTolerance = rhs.kCarTolerance;
256 fInitialized =
false;
261 fpTrackContainer = 0;
269 fLeadingTracks.
Reset();
283 if(
this == &rhs)
return *
this;
294 G4cout<<
"G4ITStepProcessor::CloneProcesses: is called"<<
G4endl;
301 theParticleIterator->
reset();
303 while((*theParticleIterator)())
310 G4cerr <<
"ERROR - G4ITStepProcessor::GetProcessNumber()" << G4endl<<
" ProcessManager is NULL for particle = "
313 G4Exception(
"G4ITStepProcessor::GetProcessNumber()",
"ITStepProcessor0001",
330 for(
int i = 0; i < processVector->
size(); i++)
332 G4VProcess* base_process = (*processVector)[i];
349 G4cout<<
"G4ITStepProcessor::GetProcessNumber: is called track"<<
G4endl;
353 G4cerr <<
"ERROR - G4SteppingManager::GetProcessNumber()" << G4endl<<
" ProcessManager is NULL for particle = "
356 G4Exception(
"G4SteppingManager::GetProcessNumber()",
"ITStepProcessor0002",
361 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it =
362 fProcessGeneralInfoMap.find(particle);
363 if(it != fProcessGeneralInfoMap.end())
365 G4Exception(
"G4SteppingManager::SetupGeneralProcessInfo()",
366 "ITStepProcessor0003",
380 G4cout <<
"G4ITStepProcessor::GetProcessNumber: #ofAtRest="
392 G4cout <<
"G4ITStepProcessor::GetProcessNumber:#ofAlongStp="
403 G4cout <<
"G4ITStepProcessor::GetProcessNumber: #ofPostStep="
407 if (SizeOfSelectedDoItVector<fpProcessInfo->MAXofAtRestLoops ||
408 SizeOfSelectedDoItVector<fpProcessInfo->MAXofAlongStepLoops ||
409 SizeOfSelectedDoItVector<fpProcessInfo->MAXofPostStepLoops )
411 G4cerr <<
"ERROR - G4ITStepProcessor::GetProcessNumber()" << G4endl
413 <<
" ; is smaller then one of MAXofAtRestLoops= "
417 G4Exception(
"G4ITStepProcessor::GetProcessNumber()",
419 "The array size is smaller than the actual No of processes.");
427 exceptionDescription <<
"No DoIt process found ";
428 G4Exception(
"G4ITStepProcessor::DoStepping",
"ITStepProcessor0005",
443 exceptionDescription <<
"No transportation process found ";
444 G4Exception(
"G4ITStepProcessor::SetupGeneralProcessInfo",
445 "ITStepProcessor0006",
449 fProcessGeneralInfoMap[particle] = fpProcessInfo;
460 fpITrack =
GetIT(fpTrack);
473 errMsg <<
"No IT pointer was attached to the track you try to process.";
475 "ITStepProcessor0007",
491 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it =
492 fProcessGeneralInfoMap.find(particle);
494 if(it == fProcessGeneralInfoMap.end())
498 if(fpProcessInfo == 0)
502 "ITStepProcessor0008",
504 exceptionDescription);
510 fpProcessInfo = it->second;
534 fN2ndariesAtRestDoIt = 0;
535 fN2ndariesAlongStepDoIt = 0;
536 fN2ndariesPostStepDoIt = 0;
548 fAtRestDoItProcTriggered = 0;
551 unsigned int NofInactiveProc=0;
556 if (fpCurrentProcess== 0)
567 lifeTime = fpCurrentProcess->
AtRestGPIL( *fpTrack, &fCondition );
577 if(lifeTime < shortestLifeTime )
579 shortestLifeTime = lifeTime;
580 fAtRestDoItProcTriggered =
G4int(ri);
592 fTimeStep = shortestLifeTime;
598 G4cerr <<
"ERROR - G4ITStepProcessor::InvokeAtRestDoItProcs()" <<
G4endl
599 <<
" No AtRestDoIt process is active!" <<
G4endl;
638 assert(fpTrack != 0);
655 if (
IsInf(fTimeStep))
666 fLeadingTracks.
Reset();
676 fLeadingTracks.
Push(fpTrack);
678 else if(fabs(fILTimeStep - fTimeStep) <
DBL_EPSILON )
686 fLeadingTracks.
Push(fpTrack);
726 fpNavigator->NewNavigatorState();
728 ->GetNavigatorState());
731 fpNavigator->LocateGlobalPointAndSetup(fpTrack->
GetPosition(),
755 ->GetNavigatorState());
760 ->fTouchableHandle()));
762 ->GetNavigatorState());
779 fpNavigator->ResetHierarchyAndLocate(fpTrack->
GetPosition(),
782 ->GetTouchableHandle()()));
821 if(fpCurrentVolume == 0)
826 G4cerr <<
"ERROR - G4ITStepProcessor::SetInitialStep()" <<
G4endl<<
" Primary particle starting at - "
828 <<
" - is outside of the world volume." <<
G4endl;
829 G4Exception(
"G4ITStepProcessor::SetInitialStep()",
"ITStepProcessor0011",
834 G4cout <<
"WARNING - G4ITStepProcessor::SetInitialStep()" <<
G4endl
835 <<
" Initial track position is outside world! - "
976 ->GetNavigatorState());
977 fpNavigator->ResetNavigatorState();
988 double proposedTimeStep =
DBL_MAX;
989 G4VProcess* processWithPostStepGivenByTimeStep(0);
1003 fpCurrentProcess =
dynamic_cast<G4VITProcess*
>((*fpProcessInfo
1005 if(fpCurrentProcess == 0)
1018 fPhysIntLength = fpCurrentProcess->
PostStepGPIL(*fpTrack,
1040 G4Exception(
"G4ITStepProcessor::DefinePhysicalStepLength()",
1041 "ITStepProcessor0008",
1043 "This feature is no more supported");
1070 if(fPhysIntLength < fpState->fPhysicalStep)
1077 fPhysIntLength *= -1;
1078 if(fPhysIntLength < proposedTimeStep)
1080 proposedTimeStep = fPhysIntLength;
1081 fPostStepAtTimeDoItProcTriggered = np;
1082 processWithPostStepGivenByTimeStep = fpCurrentProcess;
1089 fPostStepDoItProcTriggered =
G4int(np);
1102 fpCurrentProcess =
dynamic_cast<G4VITProcess*
>((*fpProcessInfo
1104 if(fpCurrentProcess == 0)
continue;
1113 safetyProposedToAndByProcess,
1121 if(fPhysIntLength < fpState->fPhysicalStep)
1139 if(!fpTransportation)
1142 exceptionDescription <<
"No transportation process found ";
1143 G4Exception(
"G4ITStepProcessor::DoDefinePhysicalStepLength",
1144 "ITStepProcessor0009",
1146 exceptionDescription);
1161 if(!fpTransportation)
1164 exceptionDescription <<
"No transportation process found ";
1165 G4Exception(
"G4ITStepProcessor::DoDefinePhysicalStepLength",
1166 "ITStepProcessor0010",
1168 exceptionDescription);
1176 if(proposedTimeStep < fTimeStep)
1178 if(fPostStepAtTimeDoItProcTriggered < fpProcessInfo->MAXofPostStepLoops)
1189 fTimeStep = proposedTimeStep;
1200 if(fPostStepDoItProcTriggered < fpProcessInfo->MAXofPostStepLoops)
1216 if(safetyProposedToAndByProcess < fpState->fProposedSafety)
1226 fpNavigator->ResetNavigatorState();
G4ITTrackingInteractivity * GetInteractivity()
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
G4ProcessVector * fpAtRestGetPhysIntVector
void SetVertexMomentumDirection(const G4ThreeVector &aValue)
void PrepareLeadingTracks()
void SetProcessDefinedStep(const G4VProcess *aValue)
std::ostringstream G4ExceptionDescription
G4ITTransportation * fpTransportation
void DeleteSecondaryVector()
G4TouchableHandle fTouchableHandle
void SetNavigator(G4ITNavigator *value)
size_t MAXofAlongStepLoops
const G4ThreeVector & GetPosition() const
G4double GetSurfaceTolerance() const
G4TrackStatus GetTrackStatus() const
void SetNextTouchableHandle(const G4TouchableHandle &apValue)
G4ProcessVector * fpAlongStepDoItVector
G4ProcessVector * fpPostStepDoItVector
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4int GetPDGEncoding() const
virtual const G4String & GetName() const =0
void SetPointerToVectorOfAuxiliaryPoints(std::vector< G4ThreeVector > *theNewVectorPointer)
void SetPreviousStepTime(G4double)
void PrepareLeadingTracks()
const G4Step * GetStep() const
void StartTracking(G4Track *)
const G4String & GetParticleName() const
G4SelectedAtRestDoItVector fSelectedAtRestDoItVector
G4SelectedPostStepDoItVector fSelectedPostStepDoItVector
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
G4VPhysicalVolume * GetNextVolume() const
void DefinePhysicalStepLength(G4Track *)
G4double AtRestGPIL(const G4Track &track, G4ForceCondition *condition)
G4StepPoint * GetPreStepPoint() const
void EndTracking(G4Track *)
G4IT * GetIT(const G4Track *track)
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4double GetKineticEnergy() const
static G4ITTransportationManager * GetTransportationManager()
G4GLOB_DLL std::ostream G4cout
void reset(G4bool ifSkipIon=true)
G4int GetCurrentStepNumber() const
G4TrackVector * NewSecondaryVector()
G4ProcessVector * fpAlongStepGetPhysIntVector
const XML_Char int const XML_Char * value
G4VPhysicalVolume * GetPhysicalVolume() const
void ActiveOnlyITProcess()
G4double AlongStepGPIL(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
G4ProcessVector * fpAtRestDoItVector
virtual void ComputeStep(const G4Track &, const G4Step &, const double timeStep, double &spaceStep)
virtual G4int GetRegularStructureId() const =0
virtual void DPSLStarted()=0
void ResetTotalEnergyDeposit()
#define theParticleIterator
void SetVertexKineticEnergy(const G4double aValue)
const G4TouchableHandle & GetNextTouchableHandle() const
virtual void DPSLPostStep()=0
G4ProcessVector * fpPostStepGetPhysIntVector
const G4double kCarTolerance
double GetInteractionTime()
G4double GetGlobalTime() const
G4double GetInteractionTimeLeft()
const G4TouchableHandle & GetTouchableHandle() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void Initialize()
G4TrackingInformation * GetTrackingInfo()
G4double PostStepGPIL(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4double ComputeInteractionLength(double previousTimeStep)
void SetProcessState(G4shared_ptr< G4ProcessState_Lock > aProcInfo)
const G4ThreeVector & GetMomentumDirection() const
G4LogicalVolume * GetLogicalVolume() const
G4TrackVector * GetfSecondary()
static G4ParticleTable * GetParticleTable()
G4ITStepProcessorState & operator=(const G4ITStepProcessorState &)
G4ProcessManager * GetProcessManager() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
void SetVertexPosition(const G4ThreeVector &aValue)
G4StepPoint * GetPostStepPoint() const
G4ITStepProcessor & operator=(const G4ITStepProcessor &other)
size_t MAXofPostStepLoops
virtual void DPSLAlongStep()=0
G4VPhysicalVolume * GetVolume() const
G4VITSteppingVerbose * GetSteppingVerbose()
void DoDefinePhysicalStepLength()
static G4ITTrackHolder * Instance()
virtual ~G4ITStepProcessor()
void InitializeStep(G4Track *aValue)
G4TrackList * GetMainList(Key)
G4double fPreviousStepSize
void SetupGeneralProcessInfo(G4ParticleDefinition *, G4ProcessManager *)
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4bool ProposesTimeStep() const
void SetStepProcessor(const G4ITStepProcessor *stepProcessor)
virtual ~G4ITStepProcessorState()
void ResetLeadingTracks()
size_t GetProcessID() const
G4PTblDicIterator * GetIterator() const
void SetStep(const G4Step *aValue)
G4double GetStepLength() const
static G4GeometryTolerance * GetInstance()
G4ProcessVector * GetProcessList() const
static const size_t SizeOfSelectedDoItVector
void ForceReInitialization()
G4GLOB_DLL std::ostream G4cerr
void SetLogicalVolumeAtVertex(const G4LogicalVolume *)
void CopyPostToPreStepPoint()
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const