54 for(
G4int DSecLoop=0 ;
58 tempSecondaryTrack = fpParticleChange->
GetSecondary(DSecLoop);
78 fpSecondary->push_back( tempSecondaryTrack );
79 fN2ndariesAtRestDoIt++;
81 delete tempSecondaryTrack;
86 fpSecondary->push_back( tempSecondaryTrack );
97 if(track == 0) return ;
98 fTimeStep = timeStep ;
114 exceptionDescription <<
"No process info found for particle :"
116 G4Exception(
"G4ITStepProcessor::DoStepping",
"ITStepProcessor0012",
126 if(fpProcessInfo->MAXofPostStepLoops == 0
127 && fpProcessInfo->MAXofAlongStepLoops == 0
128 && fpProcessInfo->MAXofAtRestLoops == 0)
149 if( fpProcessInfo->MAXofAtRestLoops>0 &&
150 fpProcessInfo->fpAtRestDoItVector != 0)
171 <<
" !!! Particle Name : "<< fpTrack -> GetDefinition() -> GetParticleName() <<
G4endl
172 <<
"No G4ITStepProcessor::fpITrack found" <<
G4endl;
174 G4Exception(
"G4ITStepProcessor::DoStepping",
"ITStepProcessor0013",
196 G4double GeomStepLength = fpState->fPhysicalStep;
208 fpState->endpointSafOrigin= fpPostStepPoint->
GetPosition();
210 fpState->endpointSafety=
std::max( fpState->proposedSafety - GeomStepLength, kCarTolerance);
214 if(
GetIT(fpTrack)->GetTrackingInfo()->IsLeadingStep())
262 fpTrackingManager->
AppendStep(fpTrack,fpStep);
282 for(
size_t np=0; np < fpProcessInfo->MAXofAtRestLoops; np++)
288 if( selectedAtRestDoItVector[fpProcessInfo->MAXofAtRestLoops-np-1] !=
InActivated)
290 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpAtRestDoItVector)[np];
295 = fpCurrentProcess->
AtRestDoIt( *fpTrack, *fpStep);
309 fpParticleChange->
Clear();
335 for(
size_t ci=0 ; ci<fpProcessInfo->MAXofAlongStepLoops ; ci++ )
337 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpAlongStepDoItVector)[ci];
338 if (fpCurrentProcess== 0)
continue;
357 fpParticleChange->
Clear();
367 if(fpProcessInfo->MAXofAtRestLoops>0) fNewStatus =
fStopButAlive;
389 for(
size_t np=0; np < fpProcessInfo->MAXofPostStepLoops; np++)
395 G4int Cond = selectedPostStepDoItVector[fpProcessInfo->MAXofPostStepLoops-np-1];
414 for(
size_t np1=np+1; np1 < fpProcessInfo->MAXofPostStepLoops; np1++)
416 G4int Cond2 = selectedPostStepDoItVector[fpProcessInfo->MAXofPostStepLoops-np1-1];
431 fpCurrentProcess = (
G4VITProcess*) (*fpProcessInfo->fpPostStepDoItVector)[np];
454 fpParticleChange->
Clear();
465 double physicalStep(0.) ;
467 fpTransportation = fpProcessInfo->fpTransportation;
474 <<
"No G4ITStepProcessor::fpTrack found";
475 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0013",
484 <<
"No G4ITStepProcessor::fITrack" ;
485 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0014",
493 <<
"No G4ITStepProcessor::fITrack->GetTrack()" ;
494 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
"ITStepProcessor0015",
502 fpTransportation->
ComputeStep(*fpTrack, *fpStep, fTimeStep, physicalStep) ;
512 fpState->fPhysicalStep = physicalStep ;
519 size_t _MAXofPostStepLoops = fpProcessInfo->MAXofPostStepLoops;
524 for(
size_t np=0; np < _MAXofPostStepLoops; np++)
530 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops-np-1];
549 for(
size_t np1=np+1; np1 < _MAXofPostStepLoops; np1++)
551 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops-np1-1];
571 G4bool tBelowCutEnergyAndSafety =
false;
586 tBelowCutEnergyAndSafety =
true;
597 if( tBelowCutEnergyAndSafety )
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4ParticleDefinition * GetDefinition() const
void SetStepLength(G4double value)
virtual G4VPhysicalVolume * ResetHierarchyAndLocate(const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
G4int GetNumberOfSecondaries() const
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
static G4LossTableManager * Instance()
G4Track * GetSecondary(G4int anIndex) const
static G4int GetIndex(const G4String &name)
void SetProcessDefinedStep(const G4VProcess *aValue)
std::ostringstream G4ExceptionDescription
G4double GetStepLength() const
const G4DynamicParticle * GetDynamicParticle() const
class std::vector< int, std::allocator< int > > G4SelectedAtRestDoItVector
void InvokeAlongStepDoItProcs()
const G4ThreeVector & GetPosition() const
G4TrackStatus GetTrackStatus() const
G4ProcessManager * GetProcessManager() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void SetStepStatus(const G4StepStatus aValue)
const G4String & GetParticleName() const
void SetCreatorProcess(const G4VProcess *aValue)
G4double CalculateSafety()
G4ITNavigatorState_Lock * GetNavigatorState()
G4IT * GetIT(const G4Track *track)
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4double GetKineticEnergy() const
class std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
const G4ThreeVector & GetPosition() const
virtual void ComputeStep(const G4Track &, const G4Step &, const double timeStep, double &spaceStep)
void ApplyProductionCut(G4Track *)
void SetStepLength(G4double value)
G4int GetCoupleIndex(const G4MaterialCutsCouple *aCouple) const
void FindTransportationStep()
G4double GetCharge() const
void DealWithSecondaries(G4int &)
void InvokeTransportationProc()
void SetProcessState(G4ProcessState_Lock *aProcInfo)
const G4TouchableHandle & GetTouchableHandle() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4TrackingInformation * GetTrackingInfo()
static G4ProductionCutsTable * GetProductionCutsTable()
const G4ThreeVector & GetMomentumDirection() const
void IncrementCurrentStepNumber()
void InvokeAtRestDoItProcs()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)=0
void Stepping(G4Track *, const double &)
void SetParentID(const G4int aValue)
G4StepPoint * GetPostStepPoint() const
void AddTotalEnergyDeposit(G4double value)
void InvokePostStepDoItProcs()
void SetNavigatorState(G4ITNavigatorState_Lock *)
G4bool IsGoodForTracking() const
G4bool GetApplyCutsFlag() const
G4TrackStatus GetTrackStatus() const
void AddTrackLength(const G4double aValue)
void SetKineticEnergy(const G4double aValue)
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
void SetSafety(const G4double aValue)
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
size_t GetProcessID() const
G4double GetRange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
virtual void AppendStep(G4Track *track, G4Step *step)
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)=0