72 tempSecondaryTrack = fpParticleChange->
GetSecondary(DSecLoop);
93 fpSecondary->push_back( tempSecondaryTrack );
94 fN2ndariesAtRestDoIt++;
98 delete tempSecondaryTrack;
103 fpSecondary->push_back( tempSecondaryTrack );
126 std::size_t initialSize = mainList->
size();
130 for(std::size_t i = 0 ; i < initialSize ; ++i)
139 exceptionDescription <<
"No track was pop back the main track list.";
159#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
160 MemStat mem_first, mem_second, mem_diff;
161 mem_first = MemoryUsage();
166#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
167 MemStat mem_intermediaire = MemoryUsage();
168 mem_diff = mem_intermediaire-mem_first;
169 G4cout <<
"\t\t >> || MEM || In DoIT with track "
175#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
176 mem_second = MemoryUsage();
177 mem_diff = mem_second-mem_first;
178 G4cout <<
"\t >> || MEM || In DoIT with track "
180 <<
", diff is : " << mem_diff <<
G4endl;
187 fLeadingTracks.
Reset();
224 for (std::size_t i = 0; i < fpSecondary->size(); ++i)
226 delete (*fpSecondary)[i];
228 fpSecondary->clear();
243 if (!fpSecondary || fpSecondary->empty())
253 G4TrackVector::iterator secondaries_i = fpSecondary->begin();
255 for (; secondaries_i != fpSecondary->end(); ++secondaries_i)
257 G4Track* secondary = *secondaries_i;
268 MemStat mem_first, mem_second, mem_diff;
272 mem_first = MemoryUsage();
278 MemStat mem_intermediaire = MemoryUsage();
279 mem_diff = mem_intermediaire-mem_first;
280 G4cout <<
"\t\t\t >> || MEM || After CleanProcessor " << track->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
283 if(track == 0)
return;
284 fTimeStep = timeStep;
298 MemStat mem_first, mem_second, mem_diff;
302 mem_first = MemoryUsage();
312 exceptionDescription <<
"No process info found for particle :"
315 "ITStepProcessor0012",
317 exceptionDescription);
348 if(fpVerbose) fpVerbose->
NewStep();
364 MemStat mem_intermediaire = MemoryUsage();
365 mem_diff = mem_intermediaire-mem_first;
366 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After dealing with navigator with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
395 exceptionDescription <<
" !!! TrackID : " << fpTrack->
GetTrackID()
397 <<
" !!! Particle Name : "<< fpTrack -> GetDefinition() -> GetParticleName() <<
G4endl
398 <<
"No G4ITStepProcessor::fpITrack found" <<
G4endl;
401 "ITStepProcessor0013",
403 exceptionDescription);
418 mem_intermediaire = MemoryUsage();
419 mem_diff = mem_intermediaire-mem_first;
420 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After FindTransportationStep() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
436 mem_intermediaire = MemoryUsage();
437 mem_diff = mem_intermediaire-mem_first;
438 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokeAlongStepDoItProcs() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
457 if(
GetIT(fpTrack)->GetTrackingInfo()->IsLeadingStep())
463 mem_intermediaire = MemoryUsage();
464 mem_diff = mem_intermediaire-mem_first;
465 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokePostStepDoItProcs() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
479 mem_intermediaire = MemoryUsage();
480 mem_diff = mem_intermediaire-mem_first;
481 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokeTransportationProc() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
491 fpNavigator->ResetNavigatorState();
494 mem_intermediaire = MemoryUsage();
495 mem_diff = mem_intermediaire-mem_first;
496 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After fpNavigator->SetNavigatorState with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
543 fpTrackingManager->
AppendStep(fpTrack, fpStep);
547 MemStat mem_intermediaire = MemoryUsage();
548 mem_diff = mem_intermediaire-mem_first;
549 G4cout <<
"\t\t\t >> || MEM || End of DoStepping() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
592 fpParticleChange = fpCurrentProcess->
AtRestDoIt(*fpTrack, *fpStep);
609 fpParticleChange->
Clear();
632 MemStat mem_first, mem_second, mem_diff;
636 mem_first = MemoryUsage();
651 if(fpCurrentProcess == 0)
continue;
656 fpParticleChange = fpCurrentProcess->
AlongStepDoIt(*fpTrack, *fpStep);
659 MemStat mem_intermediaire = MemoryUsage();
660 mem_diff = mem_intermediaire-mem_first;
661 G4cout <<
"\t\t\t >> || MEM || After calling AlongStepDoIt for " << fpCurrentProcess->
GetProcessName() <<
" and track "<< fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
683 fpParticleChange->
Clear();
687 MemStat mem_intermediaire = MemoryUsage();
688 mem_diff = mem_intermediaire-mem_first;
689 G4cout <<
"\t\t\t >> || MEM || After looping on processes with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
720 for(std::size_t np = 0; np < _MAXofPostStepLoops; ++np)
726 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops
746 for(std::size_t np1 = np + 1; np1 < _MAXofPostStepLoops; ++np1)
748 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops
768 fpParticleChange = fpCurrentProcess->
PostStepDoIt(*fpTrack, *fpStep);
793 fpParticleChange->
Clear();
804 double physicalStep(0.);
812 exceptionDescription <<
"No G4ITStepProcessor::fpTrack found";
813 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
814 "ITStepProcessor0013",
816 exceptionDescription);
823 exceptionDescription <<
"No G4ITStepProcessor::fITrack";
824 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
825 "ITStepProcessor0014",
827 exceptionDescription);
833 exceptionDescription <<
"No G4ITStepProcessor::fITrack->GetTrack()";
834 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
835 "ITStepProcessor0015",
837 exceptionDescription);
845 fpTransportation->
ComputeStep(*fpTrack, *fpStep, fTimeStep, physicalStep);
871 for(std::size_t np = 0; np < _MAXofPostStepLoops; ++np)
877 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops - np - 1];
894 for(std::size_t np1 = np + 1; np1 < _MAXofPostStepLoops; ++np1)
896 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops - np1 - 1];
915 G4bool tBelowCutEnergyAndSafety =
false;
924 ->GetMaterialCutsCouple());
929 tBelowCutEnergyAndSafety =
true;
940 if(tBelowCutEnergyAndSafety)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
class std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
class std::vector< int, std::allocator< int > > G4SelectedAtRestDoItVector
G4IT * GetIT(const G4Track *track)
@ fKillTrackAndSecondaries
G4GLOB_DLL std::ostream G4cout
G4double GetCharge() const
void RemoveReactionSet(G4Track *track)
static G4ITReactionSet * Instance()
G4ThreeVector fEndpointSafOrigin
G4SelectedPostStepDoItVector fSelectedPostStepDoItVector
G4SelectedAtRestDoItVector fSelectedAtRestDoItVector
void InvokeAtRestDoItProcs()
void DealWithSecondaries(G4int &)
void Stepping(G4Track *, const double &)
G4double CalculateSafety()
void InvokeTransportationProc()
void InvokePostStepDoItProcs()
void DoIt(double timeStep)
void ApplyProductionCut(G4Track *)
void InvokePSDIP(std::size_t)
void InvokeAlongStepDoItProcs()
void FindTransportationStep()
void _PushTrack(G4Track *track)
G4TrackList * GetMainList(Key)
void MergeSecondariesWithMainList()
void AppendStep(G4Track *track, G4Step *step)
void EndTracking(G4Track *)
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
std::size_t entries() const
const std::vector< G4double > * GetEnergyCutsVector(std::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)
G4ParticleDefinition * GetDefinition() const
void AddTrackLength(const G4double aValue)
const G4DynamicParticle * GetDynamicParticle() 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(G4shared_ptr< G4ProcessState_Lock > aProcInfo)
virtual void StepInfoForLeadingTrack()=0
virtual void PostStepDoItAllDone()=0
virtual void DoItStarted()=0
virtual void AlongStepDoItOneByOne()=0
virtual void PreStepVerbose(G4Track *)=0
virtual void PostStepDoItOneByOne()=0
virtual void PostStepVerbose(G4Track *)=0
virtual void AtRestDoItInvoked()=0
virtual void AlongStepDoItAllDone()=0
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
const G4String & GetProcessName() const
G4ProcessVector * fpPostStepDoItVector
std::size_t MAXofAlongStepLoops
std::size_t MAXofAtRestLoops
G4ProcessVector * fpAlongStepDoItVector
G4ITTransportation * fpTransportation
std::size_t MAXofPostStepLoops
G4ProcessVector * fpAtRestDoItVector