55 for(
G4int DSecLoop=0 ;
59 tempSecondaryTrack = fpParticleChange->
GetSecondary(DSecLoop);
79 fpSecondary->push_back( tempSecondaryTrack );
80 fN2ndariesAtRestDoIt++;
82 delete tempSecondaryTrack;
87 fpSecondary->push_back( tempSecondaryTrack );
98 if(track == 0) return ;
99 fTimeStep = timeStep ;
115 exceptionDescription <<
"No process info found for particle :"
117 G4Exception(
"G4ITStepProcessor::DoStepping",
"ITStepProcessor0012",
127 if(fpProcessInfo->MAXofPostStepLoops == 0
128 && fpProcessInfo->MAXofAlongStepLoops == 0
129 && fpProcessInfo->MAXofAtRestLoops == 0)
150 if( fpProcessInfo->MAXofAtRestLoops>0 &&
151 fpProcessInfo->fpAtRestDoItVector != 0)
172 <<
" !!! Particle Name : "<< fpTrack -> GetDefinition() -> GetParticleName() <<
G4endl
173 <<
"No G4ITStepProcessor::fpITrack found" <<
G4endl;
175 G4Exception(
"G4ITStepProcessor::DoStepping",
"ITStepProcessor0013",
197 G4double GeomStepLength = fpState->fPhysicalStep;
209 fpState->endpointSafOrigin= fpPostStepPoint->
GetPosition();
211 fpState->endpointSafety= std::max( fpState->proposedSafety - GeomStepLength, kCarTolerance);
215 if(
GetIT(fpTrack)->GetTrackingInfo()->IsLeadingStep())
263 fpTrackingManager->
AppendStep(fpTrack,fpStep);
283 for(
size_t np=0; np < fpProcessInfo->MAXofAtRestLoops; np++)
289 if( selectedAtRestDoItVector[fpProcessInfo->MAXofAtRestLoops-np-1] !=
InActivated)
291 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpAtRestDoItVector)[np];
296 = fpCurrentProcess->
AtRestDoIt( *fpTrack, *fpStep);
310 fpParticleChange->
Clear();
336 for(
size_t ci=0 ; ci<fpProcessInfo->MAXofAlongStepLoops ; ci++ )
338 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpAlongStepDoItVector)[ci];
339 if (fpCurrentProcess== 0)
continue;
358 fpParticleChange->
Clear();
368 if(fpProcessInfo->MAXofAtRestLoops>0) fNewStatus =
fStopButAlive;
390 for(
size_t np=0; np < fpProcessInfo->MAXofPostStepLoops; np++)
396 G4int Cond = selectedPostStepDoItVector[fpProcessInfo->MAXofPostStepLoops-np-1];
415 for(
size_t np1=np+1; np1 < fpProcessInfo->MAXofPostStepLoops; np1++)
417 G4int Cond2 = selectedPostStepDoItVector[fpProcessInfo->MAXofPostStepLoops-np1-1];
432 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpPostStepDoItVector)[np];
455 fpParticleChange->
Clear();
466 double physicalStep(0.) ;
468 fpTransportation = fpProcessInfo->fpTransportation;
475 <<
"No G4ITStepProcessor::fpTrack found";
476 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0013",
485 <<
"No G4ITStepProcessor::fITrack" ;
486 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0014",
494 <<
"No G4ITStepProcessor::fITrack->GetTrack()" ;
495 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0015",
503 fpTransportation->
ComputeStep(*fpTrack, *fpStep, fTimeStep, physicalStep) ;
513 fpState->fPhysicalStep = physicalStep ;
520 size_t _MAXofPostStepLoops = fpProcessInfo->MAXofPostStepLoops;
525 for(
size_t np=0; np < _MAXofPostStepLoops; np++)
531 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops-np-1];
550 for(
size_t np1=np+1; np1 < _MAXofPostStepLoops; np1++)
552 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops-np1-1];
572 G4bool tBelowCutEnergyAndSafety =
false;
587 tBelowCutEnergyAndSafety =
true;
598 if( tBelowCutEnergyAndSafety )
class std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
class std::vector< int, std::allocator< int > > G4SelectedAtRestDoItVector
G4IT * GetIT(const G4Track *track)
G4double GetCharge() const
void SetNavigatorState(G4ITNavigatorState_Lock *)
G4ITNavigatorState_Lock * GetNavigatorState()
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
void InvokeAtRestDoItProcs()
void DealWithSecondaries(G4int &)
void Stepping(G4Track *, const double &)
G4double CalculateSafety()
void InvokeTransportationProc()
void InvokePostStepDoItProcs()
void ApplyProductionCut(G4Track *)
void InvokeAlongStepDoItProcs()
void FindTransportationStep()
virtual void AppendStep(G4Track *track, G4Step *step)
virtual void ComputeStep(const G4Track &, const G4Step &, const double timeStep, double &spaceStep)
G4TrackingInformation * GetTrackingInfo()
static G4LossTableManager * Instance()
G4double GetRange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4ProcessManager * GetProcessManager() const
G4bool GetApplyCutsFlag() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4int GetCoupleIndex(const G4MaterialCutsCouple *aCouple) const
static G4int GetIndex(const G4String &name)
void SetSafety(const G4double aValue)
void SetStepStatus(const G4StepStatus aValue)
void SetProcessDefinedStep(const G4VProcess *aValue)
const G4ThreeVector & GetPosition() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void SetStepLength(G4double value)
void AddTotalEnergyDeposit(G4double value)
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
G4TrackStatus GetTrackStatus() const
void SetTrackStatus(const G4TrackStatus aTrackStatus)
void SetStepLength(G4double value)
const G4ThreeVector & GetPosition() const
G4ParticleDefinition * GetDefinition() const
void AddTrackLength(const G4double aValue)
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
void IncrementCurrentStepNumber()
void SetKineticEnergy(const G4double aValue)
G4bool IsGoodForTracking() const
void SetParentID(const G4int aValue)
void SetCreatorProcess(const G4VProcess *aValue)
size_t GetProcessID() const
void SetProcessState(G4ProcessState_Lock *aProcInfo)
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
G4int GetNumberOfSecondaries() const
G4Track * GetSecondary(G4int anIndex) const
G4TrackStatus GetTrackStatus() const
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)=0
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription