71 tempSecondaryTrack = fpParticleChange->
GetSecondary(DSecLoop);
92 fpSecondary->push_back( tempSecondaryTrack );
93 fN2ndariesAtRestDoIt++;
97 delete tempSecondaryTrack;
102 fpSecondary->push_back( tempSecondaryTrack );
125 std::size_t initialSize = mainList->
size();
129 for(std::size_t i = 0 ; i < initialSize ; ++i)
135 if (track ==
nullptr)
138 exceptionDescription <<
"No track was pop back the main track list.";
158#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
159 MemStat mem_first, mem_second, mem_diff;
160 mem_first = MemoryUsage();
165#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
166 MemStat mem_intermediaire = MemoryUsage();
167 mem_diff = mem_intermediaire-mem_first;
168 G4cout <<
"\t\t >> || MEM || In DoIT with track "
174#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
175 mem_second = MemoryUsage();
176 mem_diff = mem_second-mem_first;
177 G4cout <<
"\t >> || MEM || In DoIT with track "
179 <<
", diff is : " << mem_diff <<
G4endl;
186 fLeadingTracks.
Reset();
193 if (fpTrack ==
nullptr)
221 if (fpSecondary !=
nullptr)
223 for (
auto & i : *fpSecondary)
227 fpSecondary->clear();
242 if ((fpSecondary ==
nullptr) || fpSecondary->empty())
252 auto secondaries_i = fpSecondary->begin();
254 for (; secondaries_i != fpSecondary->end(); ++secondaries_i)
256 G4Track* secondary = *secondaries_i;
267 MemStat mem_first, mem_second, mem_diff;
271 mem_first = MemoryUsage();
277 MemStat mem_intermediaire = MemoryUsage();
278 mem_diff = mem_intermediaire-mem_first;
279 G4cout <<
"\t\t\t >> || MEM || After CleanProcessor " << track->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
282 if(track ==
nullptr)
return;
283 fTimeStep = timeStep;
297 MemStat mem_first, mem_second, mem_diff;
301 mem_first = MemoryUsage();
308 if(fpProcessInfo ==
nullptr)
311 exceptionDescription <<
"No process info found for particle :"
314 "ITStepProcessor0012",
316 exceptionDescription);
347 if(fpVerbose !=
nullptr) fpVerbose->
NewStep();
363 MemStat mem_intermediaire = MemoryUsage();
364 mem_diff = mem_intermediaire-mem_first;
365 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After dealing with navigator with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
391 if(fpITrack ==
nullptr)
394 exceptionDescription <<
" !!! TrackID : " << fpTrack->
GetTrackID()
396 <<
" !!! Particle Name : "<< fpTrack -> GetDefinition() -> GetParticleName() <<
G4endl
397 <<
"No G4ITStepProcessor::fpITrack found" <<
G4endl;
400 "ITStepProcessor0013",
402 exceptionDescription);
417 mem_intermediaire = MemoryUsage();
418 mem_diff = mem_intermediaire-mem_first;
419 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After FindTransportationStep() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
435 mem_intermediaire = MemoryUsage();
436 mem_diff = mem_intermediaire-mem_first;
437 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokeAlongStepDoItProcs() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
456 if(
GetIT(fpTrack)->GetTrackingInfo()->IsLeadingStep())
462 mem_intermediaire = MemoryUsage();
463 mem_diff = mem_intermediaire-mem_first;
464 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokePostStepDoItProcs() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
478 mem_intermediaire = MemoryUsage();
479 mem_diff = mem_intermediaire-mem_first;
480 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After InvokeTransportationProc() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
490 fpNavigator->ResetNavigatorState();
493 mem_intermediaire = MemoryUsage();
494 mem_diff = mem_intermediaire-mem_first;
495 G4cout <<
"\t\t\t >> || MEM || G4ITStepProcessor::DoStepping || After fpNavigator->SetNavigatorState with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
542 fpTrackingManager->
AppendStep(fpTrack, fpStep);
546 MemStat mem_intermediaire = MemoryUsage();
547 mem_diff = mem_intermediaire-mem_first;
548 G4cout <<
"\t\t\t >> || MEM || End of DoStepping() with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
591 fpParticleChange = fpCurrentProcess->
AtRestDoIt(*fpTrack, *fpStep);
608 fpParticleChange->
Clear();
631 MemStat mem_first, mem_second, mem_diff;
635 mem_first = MemoryUsage();
650 if(fpCurrentProcess ==
nullptr)
continue;
655 fpParticleChange = fpCurrentProcess->
AlongStepDoIt(*fpTrack, *fpStep);
658 MemStat mem_intermediaire = MemoryUsage();
659 mem_diff = mem_intermediaire-mem_first;
660 G4cout <<
"\t\t\t >> || MEM || After calling AlongStepDoIt for " << fpCurrentProcess->
GetProcessName() <<
" and track "<< fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
682 fpParticleChange->
Clear();
686 MemStat mem_intermediaire = MemoryUsage();
687 mem_diff = mem_intermediaire-mem_first;
688 G4cout <<
"\t\t\t >> || MEM || After looping on processes with " << fpTrack->
GetTrackID() <<
", diff is : " << mem_diff <<
G4endl;
719 for(std::size_t np = 0; np < _MAXofPostStepLoops; ++np)
725 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops
745 for(std::size_t np1 = np + 1; np1 < _MAXofPostStepLoops; ++np1)
747 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops
767 fpParticleChange = fpCurrentProcess->
PostStepDoIt(*fpTrack, *fpStep);
792 fpParticleChange->
Clear();
803 double physicalStep(0.);
808 if(fpTrack ==
nullptr)
811 exceptionDescription <<
"No G4ITStepProcessor::fpTrack found";
812 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
813 "ITStepProcessor0013",
815 exceptionDescription);
819 if(fpITrack ==
nullptr)
822 exceptionDescription <<
"No G4ITStepProcessor::fITrack";
823 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
824 "ITStepProcessor0014",
826 exceptionDescription);
829 if((fpITrack->
GetTrack()) ==
nullptr)
832 exceptionDescription <<
"No G4ITStepProcessor::fITrack->GetTrack()";
833 G4Exception(
"G4ITStepProcessor::FindTransportationStep",
834 "ITStepProcessor0015",
836 exceptionDescription);
840 if(fpTransportation !=
nullptr)
844 fpTransportation->
ComputeStep(*fpTrack, *fpStep, fTimeStep, physicalStep);
870 for(std::size_t np = 0; np < _MAXofPostStepLoops; ++np)
876 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops - np - 1];
893 for(std::size_t np1 = np + 1; np1 < _MAXofPostStepLoops; ++np1)
895 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops - np1 - 1];
914 G4bool tBelowCutEnergyAndSafety =
false;
923 ->GetMaterialCutsCouple());
928 tBelowCutEnergyAndSafety =
true;
939 if(tBelowCutEnergyAndSafety)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
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