Geant4-11
Public Member Functions | Protected Member Functions | Private Attributes | Friends
G4ITStepProcessor Class Reference

#include <G4ITStepProcessor.hh>

Public Member Functions

void CleanProcessor ()
 
G4double ComputeInteractionLength (double previousTimeStep)
 
void DefinePhysicalStepLength (G4Track *)
 
void DoIt (double timeStep)
 
void ExtractDoItData ()
 
void FindTransportationStep ()
 
void ForceReInitialization ()
 
 G4ITStepProcessor ()
 
size_t GetAtRestDoItProcTriggered () const
 
G4ForceCondition GetCondition () const
 
const G4VITProcessGetCurrentProcess () const
 
const ProcessGeneralInfoGetCurrentProcessInfo () const
 
const G4VPhysicalVolumeGetCurrentVolume () const
 
G4GPILSelection GetGPILSelection () const
 
G4double GetILTimeStep ()
 
double GetInteractionTime ()
 
G4int GetN2ndariesAlongStepDoIt () const
 
G4int GetN2ndariesAtRestDoIt () const
 
G4int GetN2ndariesPostStepDoIt () const
 
const G4VParticleChangeGetParticleChange () const
 
G4double GetPhysIntLength () const
 
size_t GetPostStepAtTimeDoItProcTriggered () const
 
size_t GetPostStepDoItProcTriggered () const
 
const G4ITStepProcessorStateGetProcessorState () const
 
G4TrackVectorGetSecondaries () const
 
G4StepGetStep ()
 
const G4StepGetStep () const
 
G4TrackGetTrack ()
 
const G4TrackGetTrack () const
 
G4ITTrackingManagerGetTrackingManager ()
 
virtual void Initialize ()
 
void PrepareLeadingTracks ()
 
void ResetLeadingTracks ()
 
void SetPreviousStepTime (G4double)
 
void SetStep (G4Step *val)
 
void SetTrackingManager (G4ITTrackingManager *trackMan)
 
void Stepping (G4Track *, const double &)
 
virtual ~G4ITStepProcessor ()
 

Protected Member Functions

void ActiveOnlyITProcess ()
 
void ActiveOnlyITProcess (G4ProcessManager *)
 
void ApplyProductionCut (G4Track *)
 
G4double CalculateSafety ()
 
void ClearProcessInfo ()
 
void DealWithSecondaries (G4int &)
 
void DoDefinePhysicalStepLength ()
 
void DoStepping ()
 
void ExtractILData ()
 
 G4ITStepProcessor (const G4ITStepProcessor &other)
 
void GetAtRestIL ()
 
void GetProcessInfo ()
 
void InitDefineStep ()
 
void InvokeAlongStepDoItProcs ()
 
void InvokeAtRestDoItProcs ()
 
void InvokePostStepDoItProcs ()
 
void InvokePSDIP (size_t)
 
void InvokeTransportationProc ()
 
G4ITStepProcessoroperator= (const G4ITStepProcessor &other)
 
void PushSecondaries ()
 
void ResetSecondaries ()
 
void SetInitialStep ()
 
void SetNavigator (G4ITNavigator *value)
 
void SetTrack (G4Track *)
 
void SetupGeneralProcessInfo (G4ParticleDefinition *, G4ProcessManager *)
 
void SetupMembers ()
 

Private Attributes

size_t fAtRestDoItProcTriggered
 
G4ForceCondition fCondition
 
G4GPILSelection fGPILSelection
 
G4double fILTimeStep
 
G4bool fInitialized
 
G4ITLeadingTracks fLeadingTracks
 
G4int fN2ndariesAlongStepDoIt
 
G4int fN2ndariesAtRestDoIt
 
G4int fN2ndariesPostStepDoIt
 
G4VITProcessfpCurrentProcess
 
G4VPhysicalVolumefpCurrentVolume
 
G4double fPhysIntLength
 
G4ITfpITrack
 
G4ITNavigator * fpNavigator
 
size_t fPostStepAtTimeDoItProcTriggered
 
size_t fPostStepDoItProcTriggered
 
G4VParticleChangefpParticleChange
 
G4StepPointfpPostStepPoint
 
G4StepPointfpPreStepPoint
 
ProcessGeneralInfofpProcessInfo
 
G4double fPreviousTimeStep
 
std::map< const G4ParticleDefinition *, ProcessGeneralInfo * > fProcessGeneralInfoMap
 
G4TrackVectorfpSecondary
 
G4ITStepProcessorStatefpState
 
G4StepfpStep
 
G4TrackfpTrack
 
G4ITTrackHolderfpTrackContainer
 
G4TrackingInformationfpTrackingInfo
 
G4ITTrackingManagerfpTrackingManager
 
G4ITTransportationfpTransportation
 
G4VITSteppingVerbosefpVerbose
 
G4int fStoreTrajectory
 
G4double fTimeStep
 
G4double kCarTolerance
 

Friends

class G4Scheduler
 

Detailed Description

Its role is the same as G4StepManager :

Definition at line 153 of file G4ITStepProcessor.hh.

Constructor & Destructor Documentation

◆ G4ITStepProcessor() [1/2]

G4ITStepProcessor::G4ITStepProcessor ( )

Definition at line 76 of file G4ITStepProcessor.cc.

77{
78 fpVerbose = 0;
79 // fpUserSteppingAction = 0 ;
82 fpNavigator = 0;
83 kCarTolerance = -1.;
84 fInitialized = false;
88
91}
G4ITNavigator * fpNavigator
G4VITSteppingVerbose * fpVerbose
G4ITTrackingManager * fpTrackingManager
G4ITTrackHolder * fpTrackContainer
#define DBL_MAX
Definition: templates.hh:62

References CleanProcessor(), DBL_MAX, fILTimeStep, fInitialized, fpNavigator, fPreviousTimeStep, fpTrackContainer, fpTrackingManager, fpVerbose, fStoreTrajectory, kCarTolerance, and ResetSecondaries().

◆ ~G4ITStepProcessor()

G4ITStepProcessor::~G4ITStepProcessor ( )
virtual

Definition at line 228 of file G4ITStepProcessor.cc.

229{
230 if(fpStep)
231 {
233 delete fpStep;
234 }
235
236 if(fpSecondary) delete fpSecondary;
238 //G4ITTransportationManager::DeleteInstance();
239
240 // if(fpUserSteppingAction) delete fpUserSteppingAction;
241}
G4TrackVector * fpSecondary
void DeleteSecondaryVector()

References ClearProcessInfo(), G4Step::DeleteSecondaryVector(), fpSecondary, and fpStep.

◆ G4ITStepProcessor() [2/2]

G4ITStepProcessor::G4ITStepProcessor ( const G4ITStepProcessor other)
protected

Definition at line 244 of file G4ITStepProcessor.cc.

245{
246 fpVerbose = rhs.fpVerbose;
247 fStoreTrajectory = rhs.fStoreTrajectory;
248
249 // fpUserSteppingAction = 0 ;
251 fpNavigator = 0;
252 fInitialized = false;
253
254 kCarTolerance = rhs.kCarTolerance;
255 fInitialized = false;
257
262}

References CleanProcessor(), DBL_MAX, fILTimeStep, fInitialized, fpNavigator, fPreviousTimeStep, fpTrackContainer, fpTrackingManager, fpVerbose, fStoreTrajectory, kCarTolerance, and ResetSecondaries().

Member Function Documentation

◆ ActiveOnlyITProcess() [1/2]

void G4ITStepProcessor::ActiveOnlyITProcess ( )
protected

Definition at line 289 of file G4ITStepProcessor.cc.

290{
291 // Method not used for the time being
292#ifdef debug
293 G4cout<<"G4ITStepProcessor::CloneProcesses: is called"<<G4endl;
294#endif
295
298 ->GetIterator();
299
300 theParticleIterator->reset();
301 // TODO : Ne faire la boucle que sur les IT **** !!!
302 while((*theParticleIterator)())
303 {
304 G4ParticleDefinition* particle = theParticleIterator->value();
305 G4ProcessManager* pm = particle->GetProcessManager();
306
307 if(!pm)
308 {
309 G4cerr << "ERROR - G4ITStepProcessor::GetProcessNumber()" << G4endl<< " ProcessManager is NULL for particle = "
310 << particle->GetParticleName() << ", PDG_code = "
311 << particle->GetPDGEncoding() << G4endl;
312 G4Exception("G4ITStepProcessor::GetProcessNumber()", "ITStepProcessor0001",
313 FatalException, "Process Manager is not found.");
314 return;
315 }
316
318 }
319}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define theParticleIterator
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()

References ActiveOnlyITProcess(), FatalException, G4cerr, G4cout, G4endl, G4Exception(), G4ParticleTable::GetIterator(), G4ParticleDefinition::GetParticleName(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetProcessManager(), and theParticleIterator.

Referenced by ActiveOnlyITProcess().

◆ ActiveOnlyITProcess() [2/2]

void G4ITStepProcessor::ActiveOnlyITProcess ( G4ProcessManager processManager)
protected

Definition at line 323 of file G4ITStepProcessor.cc.

324{
325 // Method not used for the time being
326 G4ProcessVector* processVector = processManager->GetProcessList();
327
328 G4VITProcess* itProcess = 0;
329 for(std::size_t i = 0; i < processVector->size(); ++i)
330 {
331 G4VProcess* base_process = (*processVector)[i];
332 itProcess = dynamic_cast<G4VITProcess*>(base_process);
333
334 if(!itProcess)
335 {
336 processManager->SetProcessActivation(base_process, false);
337 }
338 }
339}
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
G4ProcessVector * GetProcessList() const
std::size_t size() const

References G4ProcessManager::GetProcessList(), G4ProcessManager::SetProcessActivation(), and G4ProcessVector::size().

◆ ApplyProductionCut()

void G4ITStepProcessor::ApplyProductionCut ( G4Track aSecondary)
protected

Definition at line 913 of file G4ITStepProcessor2.cc.

914{
915 G4bool tBelowCutEnergyAndSafety = false;
916 G4int tPtclIdx = G4ProductionCuts::GetIndex(aSecondary->GetDefinition());
917 if(tPtclIdx < 0)
918 {
919 return;
920 }
921 G4ProductionCutsTable* tCutsTbl =
923 G4int tCoupleIdx = tCutsTbl->GetCoupleIndex(fpPreStepPoint
924 ->GetMaterialCutsCouple());
925 G4double tProdThreshold =
926 (*(tCutsTbl->GetEnergyCutsVector(tPtclIdx)))[tCoupleIdx];
927 if(aSecondary->GetKineticEnergy() < tProdThreshold)
928 {
929 tBelowCutEnergyAndSafety = true;
930 if(std::abs(aSecondary->GetDynamicParticle()->GetCharge()) > DBL_MIN)
931 {
932 G4double currentRange
934 aSecondary->GetKineticEnergy(),
936 tBelowCutEnergyAndSafety = (currentRange < CalculateSafety() );
937 }
938 }
939
940 if(tBelowCutEnergyAndSafety)
941 {
942 if(!(aSecondary->IsGoodForTracking()))
943 {
944 // Add kinetic energy to the total energy deposit
946 aSecondary->SetKineticEnergy(0.0);
947 }
948 }
949}
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double GetCharge() const
G4StepPoint * fpPreStepPoint
static G4LossTableManager * Instance()
G4double GetRange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
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)
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void AddTotalEnergyDeposit(G4double value)
G4ParticleDefinition * GetDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
void SetKineticEnergy(const G4double aValue)
G4bool IsGoodForTracking() const
#define DBL_MIN
Definition: templates.hh:54

References G4Step::AddTotalEnergyDeposit(), CalculateSafety(), DBL_MIN, fpPreStepPoint, fpStep, G4DynamicParticle::GetCharge(), G4ProductionCutsTable::GetCoupleIndex(), G4Track::GetDefinition(), G4Track::GetDynamicParticle(), G4ProductionCutsTable::GetEnergyCutsVector(), G4ProductionCuts::GetIndex(), G4Track::GetKineticEnergy(), G4StepPoint::GetMaterialCutsCouple(), G4ProductionCutsTable::GetProductionCutsTable(), G4LossTableManager::GetRange(), G4LossTableManager::Instance(), G4Track::IsGoodForTracking(), and G4Track::SetKineticEnergy().

Referenced by DealWithSecondaries().

◆ CalculateSafety()

G4double G4ITStepProcessor::CalculateSafety ( )
inlineprotected

Definition at line 441 of file G4ITStepProcessor.hh.

442{
444 - fpPostStepPoint->GetPosition()).mag(),
446}
G4ThreeVector fEndpointSafOrigin
G4ITStepProcessorState * fpState
G4StepPoint * fpPostStepPoint
const G4ThreeVector & GetPosition() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments

References G4ITStepProcessorState::fEndpointSafety, G4ITStepProcessorState::fEndpointSafOrigin, fpPostStepPoint, fpState, G4StepPoint::GetPosition(), kCarTolerance, and G4INCL::Math::max().

Referenced by ApplyProductionCut(), and InvokePSDIP().

◆ CleanProcessor()

void G4ITStepProcessor::CleanProcessor ( )
inline

Definition at line 457 of file G4ITStepProcessor.hh.

458{
461
462 fpState = 0;
463 fpTrack = 0;
464 fpTrackingInfo = 0;
465 fpITrack = 0;
466 fpStep = 0;
467 fpPreStepPoint = 0;
468 fpPostStepPoint = 0;
469
471
472 fpCurrentVolume = 0;
473 // fpSensitive = 0;
474
475 fpSecondary = 0;
476
478
480 fpProcessInfo = 0;
481
487}
@ NotForced
@ NotCandidateForSelection
G4VITProcess * fpCurrentProcess
G4VParticleChange * fpParticleChange
ProcessGeneralInfo * fpProcessInfo
G4ITTransportation * fpTransportation
G4GPILSelection fGPILSelection
G4ForceCondition fCondition
G4TrackingInformation * fpTrackingInfo
size_t fPostStepAtTimeDoItProcTriggered
G4VPhysicalVolume * fpCurrentVolume
#define INT_MAX
Definition: templates.hh:90

References DBL_MAX, fAtRestDoItProcTriggered, fCondition, fGPILSelection, fpCurrentProcess, fpCurrentVolume, fPhysIntLength, fpITrack, fPostStepAtTimeDoItProcTriggered, fPostStepDoItProcTriggered, fpParticleChange, fpPostStepPoint, fpPreStepPoint, fpProcessInfo, fpSecondary, fpState, fpStep, fpTrack, fpTrackingInfo, fpTransportation, fTimeStep, INT_MAX, NotCandidateForSelection, and NotForced.

Referenced by ExtractDoItData(), ExtractILData(), G4ITStepProcessor(), Initialize(), and Stepping().

◆ ClearProcessInfo()

void G4ITStepProcessor::ClearProcessInfo ( )
protected

Definition at line 170 of file G4ITStepProcessor.cc.

171{
172 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it;
173
174 for(it = fProcessGeneralInfoMap.begin(); it != fProcessGeneralInfoMap.end();
175 it++)
176 {
177 if(it->second)
178 {
179 delete it->second;
180 it->second = 0;
181 }
182 }
183
185}
std::map< const G4ParticleDefinition *, ProcessGeneralInfo * > fProcessGeneralInfoMap

References fProcessGeneralInfoMap.

Referenced by ForceReInitialization(), and ~G4ITStepProcessor().

◆ ComputeInteractionLength()

G4double G4ITStepProcessor::ComputeInteractionLength ( double  previousTimeStep)

Definition at line 603 of file G4ITStepProcessor.cc.

604{
606 G4TrackManyList::iterator it = mainList ->begin();
607 G4TrackManyList::iterator end = mainList ->end();
608
609 SetPreviousStepTime(previousTimeStep);
610
612
613 for (; it != end; )
614 {
615 G4Track * track = *it;
616
617#ifdef DEBUG
618 G4cout << "*CIL* " << GetIT(track)->GetName()
619 << " ID: " << track->GetTrackID()
620 << " at time : " << track->GetGlobalTime()
621 << G4endl;
622#endif
623
624 ++it;
626
628 }
629
630 return fILTimeStep;
631}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
void SetPreviousStepTime(G4double)
void DefinePhysicalStepLength(G4Track *)
G4TrackList * GetMainList(Key)
virtual const G4String & GetName() const =0
G4int GetTrackID() const
G4double GetGlobalTime() const

References G4ManyFastLists< OBJECT >::begin(), DBL_MAX, DefinePhysicalStepLength(), G4ManyFastLists< OBJECT >::end(), ExtractILData(), fILTimeStep, fpTrackContainer, G4cout, G4endl, G4Track::GetGlobalTime(), GetIT(), G4ITTrackHolder::GetMainList(), G4IT::GetName(), G4Track::GetTrackID(), and SetPreviousStepTime().

Referenced by G4Scheduler::Stepping().

◆ DealWithSecondaries()

void G4ITStepProcessor::DealWithSecondaries ( G4int counter)
protected

Definition at line 64 of file G4ITStepProcessor2.cc.

65{
66 // Now Store the secondaries from ParticleChange to SecondaryList
67 G4Track* tempSecondaryTrack;
68
69 for(G4int DSecLoop = 0; DSecLoop < fpParticleChange->GetNumberOfSecondaries();
70 DSecLoop++)
71 {
72 tempSecondaryTrack = fpParticleChange->GetSecondary(DSecLoop);
73
74 if(tempSecondaryTrack->GetDefinition()->GetApplyCutsFlag())
75 {
76 ApplyProductionCut(tempSecondaryTrack);
77 }
78
79 // Set parentID
80 tempSecondaryTrack->SetParentID(fpTrack->GetTrackID());
81
82 // Set the process pointer which created this track
83 tempSecondaryTrack->SetCreatorProcess(fpCurrentProcess);
84
85 // If this 2ndry particle has 'zero' kinetic energy, make sure
86 // it invokes a rest process at the beginning of the tracking
87 if(tempSecondaryTrack->GetKineticEnergy() <= DBL_MIN)
88 {
89 G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
90 if (pm->GetAtRestProcessVector()->entries()>0)
91 {
92 tempSecondaryTrack->SetTrackStatus( fStopButAlive );
93 fpSecondary->push_back( tempSecondaryTrack );
95 }
96 else
97 {
98 delete tempSecondaryTrack;
99 }
100 }
101 else
102 {
103 fpSecondary->push_back( tempSecondaryTrack );
104 counter++;
105 }
106 } //end of loop on secondary
107}
@ fStopButAlive
void ApplyProductionCut(G4Track *)
G4bool GetApplyCutsFlag() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
std::size_t entries() const
void SetTrackStatus(const G4TrackStatus aTrackStatus)
void SetParentID(const G4int aValue)
void SetCreatorProcess(const G4VProcess *aValue)
G4int GetNumberOfSecondaries() const
G4Track * GetSecondary(G4int anIndex) const

References ApplyProductionCut(), DBL_MIN, G4ProcessVector::entries(), fN2ndariesAtRestDoIt, fpCurrentProcess, fpParticleChange, fpSecondary, fpTrack, fStopButAlive, G4ParticleDefinition::GetApplyCutsFlag(), G4ProcessManager::GetAtRestProcessVector(), G4Track::GetDefinition(), G4Track::GetKineticEnergy(), G4VParticleChange::GetNumberOfSecondaries(), G4ParticleDefinition::GetProcessManager(), G4VParticleChange::GetSecondary(), G4Track::GetTrackID(), G4Track::SetCreatorProcess(), G4Track::SetParentID(), and G4Track::SetTrackStatus().

Referenced by InvokeAlongStepDoItProcs(), InvokeAtRestDoItProcs(), and InvokePSDIP().

◆ DefinePhysicalStepLength()

void G4ITStepProcessor::DefinePhysicalStepLength ( G4Track track)

Definition at line 698 of file G4ITStepProcessor.cc.

699{
700 SetTrack(track);
702}
void SetTrack(G4Track *)

References DoDefinePhysicalStepLength(), and SetTrack().

Referenced by ComputeInteractionLength().

◆ DoDefinePhysicalStepLength()

void G4ITStepProcessor::DoDefinePhysicalStepLength ( )
protected

Definition at line 956 of file G4ITStepProcessor.cc.

957{
958
960
961#ifdef G4VERBOSE
962 // !!!!! Verbose
964#endif
965
966 G4TrackStatus trackStatus = fpTrack->GetTrackStatus();
967
968 if(trackStatus == fStopAndKill)
969 {
970 return;
971 }
972
973 if(trackStatus == fStopButAlive)
974 {
976 ->GetNavigatorState());
977 fpNavigator->ResetNavigatorState();
978 return GetAtRestIL();
979 }
980
981 // Find minimum Step length and corresponding time
982 // demanded by active disc./cont. processes
983
984 // ReSet the counter etc.
985 fpState->fPhysicalStep = DBL_MAX; // Initialize by a huge number
986 fPhysIntLength = DBL_MAX; // Initialize by a huge number
987
988 double proposedTimeStep = DBL_MAX;
989 G4VProcess* processWithPostStepGivenByTimeStep(0);
990
991 // GPIL for PostStep
994
995 // G4cout << "fpProcessInfo->MAXofPostStepLoops : "
996 // << fpProcessInfo->MAXofPostStepLoops
997 // << " mol : " << fpITrack -> GetName()
998 // << " id : " << fpTrack->GetTrackID()
999 // << G4endl;
1000
1001 for(size_t np = 0; np < fpProcessInfo->MAXofPostStepLoops; np++)
1002 {
1005 if(fpCurrentProcess == 0)
1006 {
1008 continue;
1009 } // NULL means the process is inactivated by a user on fly.
1010
1013 ->GetProcessID()));
1014
1015 // G4cout << "Is going to call : "
1016 // << fpCurrentProcess -> GetProcessName()
1017 // << G4endl;
1020 &fCondition);
1021
1022#ifdef G4VERBOSE
1023 // !!!!! Verbose
1025#endif
1026
1028 //fpCurrentProcess->SetProcessState(0);
1029
1030 switch(fCondition)
1031 {
1032 case ExclusivelyForced: // Will need special treatment
1036 break;
1037
1038 case Conditionally:
1039 // (fpState->fSelectedPostStepDoItVector)[np] = Conditionally;
1040 G4Exception("G4ITStepProcessor::DefinePhysicalStepLength()",
1041 "ITStepProcessor0008",
1043 "This feature is no more supported");
1044 break;
1045
1046 case Forced:
1048 break;
1049
1050 case StronglyForced:
1052 break;
1053
1054 default:
1056 break;
1057 }
1058
1060 {
1061 for(size_t nrest = np + 1; nrest < fpProcessInfo->MAXofPostStepLoops;
1062 nrest++)
1063 {
1065 }
1066 return; // Please note the 'return' at here !!!
1067 }
1068 else
1069 {
1070 if(fPhysIntLength < fpState->fPhysicalStep)
1071 {
1072 // To avoid checking whether the process is actually
1073 // proposing a time step, the returned time steps are
1074 // negative (just for tagging)
1076 {
1077 fPhysIntLength *= -1;
1078 if(fPhysIntLength < proposedTimeStep)
1079 {
1080 proposedTimeStep = fPhysIntLength;
1082 processWithPostStepGivenByTimeStep = fpCurrentProcess;
1083 }
1084 }
1085 else
1086 {
1091 }
1092 }
1093 }
1094 }
1095
1096 // GPIL for AlongStep
1098 G4double safetyProposedToAndByProcess = fpState->fProposedSafety;
1099
1100 for(size_t kp = 0; kp < fpProcessInfo->MAXofAlongStepLoops; kp++)
1101 {
1104 if(fpCurrentProcess == 0) continue;
1105 // NULL means the process is inactivated by a user on fly.
1106
1113 safetyProposedToAndByProcess,
1115
1116#ifdef G4VERBOSE
1117 // !!!!! Verbose
1119#endif
1120
1121 if(fPhysIntLength < fpState->fPhysicalStep)
1122 {
1124 // Should save PS and TS in IT
1125
1126 // Check if the process wants to be the GPIL winner. For example,
1127 // multi-scattering proposes Step limit, but won't be the winner.
1129 {
1132 }
1133
1134 // Transportation is assumed to be the last process in the vector
1135 if(kp == fpProcessInfo->MAXofAlongStepLoops - 1)
1136 {
1138
1139 if(!fpTransportation)
1140 {
1141 G4ExceptionDescription exceptionDescription;
1142 exceptionDescription << "No transportation process found ";
1143 G4Exception("G4ITStepProcessor::DoDefinePhysicalStepLength",
1144 "ITStepProcessor0009",
1146 exceptionDescription);
1147 }
1148
1150
1153 }
1154 }
1155 else
1156 {
1157 if(kp == fpProcessInfo->MAXofAlongStepLoops - 1)
1158 {
1160
1161 if(!fpTransportation)
1162 {
1163 G4ExceptionDescription exceptionDescription;
1164 exceptionDescription << "No transportation process found ";
1165 G4Exception("G4ITStepProcessor::DoDefinePhysicalStepLength",
1166 "ITStepProcessor0010",
1168 exceptionDescription);
1169 }
1170
1172 }
1173 }
1174
1175 // Handle PostStep processes sending back time steps rather than space length
1176 if(proposedTimeStep < fTimeStep)
1177 {
1178 if(fPostStepAtTimeDoItProcTriggered < fpProcessInfo->MAXofPostStepLoops)
1179 {
1181 {
1183 NotForced;
1184 // (fpState->fSelectedPostStepDoItVector)[fPostStepDoItProcTriggered] = InActivated;
1185
1187 fpStep->GetPostStepPoint()->SetProcessDefinedStep(processWithPostStepGivenByTimeStep);
1188
1189 fTimeStep = proposedTimeStep;
1190
1192 *fpStep,
1193 fTimeStep,
1195 }
1196 }
1197 }
1198 else
1199 {
1200 if(fPostStepDoItProcTriggered < fpProcessInfo->MAXofPostStepLoops)
1201 {
1203 {
1205 NotForced;
1206 }
1207 }
1208 }
1209
1210// fpCurrentProcess->SetProcessState(0);
1212
1213 // Make sure to check the safety, even if Step is not limited
1214 // by this process. J. Apostolakis, June 20, 1998
1215 //
1216 if(safetyProposedToAndByProcess < fpState->fProposedSafety)
1217 // proposedSafety keeps the smallest value:
1218 fpState->fProposedSafety = safetyProposedToAndByProcess;
1219 else
1220 // safetyProposedToAndByProcess always proposes a valid safety:
1221 safetyProposedToAndByProcess = fpState->fProposedSafety;
1222
1223 }
1224
1225 fpITrack->GetTrackingInfo()->SetNavigatorState(fpNavigator->GetNavigatorState());
1226 fpNavigator->ResetNavigatorState();
1227}
@ FatalErrorInArgument
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
@ InActivated
@ StronglyForced
@ Conditionally
@ ExclusivelyForced
@ Forced
@ CandidateForSelection
@ fGeomBoundary
Definition: G4StepStatus.hh:43
@ fWorldBoundary
Definition: G4StepStatus.hh:41
@ fPostStepDoItProc
Definition: G4StepStatus.hh:49
@ fAlongStepDoItProc
Definition: G4StepStatus.hh:47
@ fExclusivelyForcedProc
Definition: G4StepStatus.hh:53
G4TrackStatus
@ fStopAndKill
G4SelectedPostStepDoItVector fSelectedPostStepDoItVector
virtual void ComputeStep(const G4Track &, const G4Step &, const double timeStep, double &spaceStep)
G4TrackingInformation * GetTrackingInfo()
Definition: G4IT.hh:143
void SetProcessDefinedStep(const G4VProcess *aValue)
G4StepPoint * GetPostStepPoint() const
G4TrackStatus GetTrackStatus() const
G4VPhysicalVolume * GetNextVolume() const
G4shared_ptr< G4ProcessState_Lock > GetProcessState(size_t index)
void SetNavigatorState(G4ITNavigatorState_Lock *)
G4bool ProposesTimeStep() const
size_t GetProcessID() const
void ResetProcessState()
void SetProcessState(G4shared_ptr< G4ProcessState_Lock > aProcInfo)
G4double GetInteractionTimeLeft()
virtual void DPSLAlongStep()=0
virtual void DPSLStarted()=0
virtual void DPSLPostStep()=0
G4double PostStepGPIL(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
Definition: G4VProcess.hh:479
G4double AlongStepGPIL(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
Definition: G4VProcess.hh:461
G4ProcessVector * fpPostStepGetPhysIntVector
G4ProcessVector * fpAlongStepGetPhysIntVector

References G4VProcess::AlongStepGPIL(), CandidateForSelection, G4ITTransportation::ComputeStep(), Conditionally, DBL_MAX, G4VITSteppingVerbose::DPSLAlongStep(), G4VITSteppingVerbose::DPSLPostStep(), G4VITSteppingVerbose::DPSLStarted(), ExclusivelyForced, fAlongStepDoItProc, FatalErrorInArgument, FatalException, fCondition, fExclusivelyForcedProc, fGeomBoundary, fGPILSelection, Forced, ProcessGeneralInfo::fpAlongStepGetPhysIntVector, fpCurrentProcess, G4ITStepProcessorState::fPhysicalStep, fPhysIntLength, fpITrack, fpNavigator, fPostStepAtTimeDoItProcTriggered, fPostStepDoItProc, fPostStepDoItProcTriggered, ProcessGeneralInfo::fpPostStepGetPhysIntVector, fpProcessInfo, G4ITStepProcessorState::fPreviousStepSize, G4ITStepProcessorState::fProposedSafety, fpState, fpStep, fpTrack, fpTrackingInfo, fpTransportation, fpVerbose, G4ITStepProcessorState::fSelectedPostStepDoItVector, G4ITStepProcessorState::fStepStatus, fStopAndKill, fStopButAlive, fTimeStep, fWorldBoundary, G4Exception(), GetAtRestIL(), G4VITProcess::GetInteractionTimeLeft(), G4Track::GetNextVolume(), G4Step::GetPostStepPoint(), G4VITProcess::GetProcessID(), G4TrackingInformation::GetProcessState(), G4IT::GetTrackingInfo(), G4Track::GetTrackStatus(), InActivated, InitDefineStep(), ProcessGeneralInfo::MAXofAlongStepLoops, ProcessGeneralInfo::MAXofPostStepLoops, NotForced, G4VProcess::PostStepGPIL(), G4VITProcess::ProposesTimeStep(), G4VITProcess::ResetProcessState(), G4TrackingInformation::SetNavigatorState(), G4StepPoint::SetProcessDefinedStep(), G4VITProcess::SetProcessState(), and StronglyForced.

Referenced by DefinePhysicalStepLength().

◆ DoIt()

void G4ITStepProcessor::DoIt ( double  timeStep)

Definition at line 111 of file G4ITStepProcessor2.cc.

120{
122
124 G4TrackManyList::iterator it = mainList->end();
125 it--;
126 size_t initialSize = mainList->size();
127
128// G4cout << "initialSize = " << initialSize << G4endl;
129
130 for(size_t i = 0 ; i < initialSize ; ++i)
131 {
132
133// G4cout << "i = " << i << G4endl;
134
135 G4Track* track = *it;
136 if (!track)
137 {
138 G4ExceptionDescription exceptionDescription;
139 exceptionDescription << "No track was pop back the main track list.";
140 G4Exception("G4ITStepProcessor::DoIt", "NO_TRACK",
141 FatalException, exceptionDescription);
142 }
143 // G4TrackManyList::iterator next_it (it);
144 // next_it--;
145 // it = next_it;
146
147 it--;
148 // Must be called before EndTracking(track)
149 // Otherwise the iterator will point to the list of killed tracks
150
151 if(track->GetTrackStatus() == fStopAndKill)
152 {
154// G4cout << GetIT(track)->GetName() << G4endl;
155// G4cout << " ************************ CONTINUE ********************" << G4endl;
156 continue;
157 }
158
159#if defined (DEBUG_MEM) && defined (DEBUG_MEM_DOIT)
160 MemStat mem_first, mem_second, mem_diff;
161 mem_first = MemoryUsage();
162#endif
163
164 Stepping(track, timeStep);
165
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 "
170 << track->GetTrackID() << ", diff is : " << mem_diff << G4endl;
171#endif
172
174
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 "
179 << track->GetTrackID()
180 << ", diff is : " << mem_diff << G4endl;
181#endif
182 }
183
184
186 fpTrackContainer->KillTracks(); // (18-06-15 : MK) Remove it ?
188}
void Stepping(G4Track *, const double &)
G4ITLeadingTracks fLeadingTracks
void MergeSecondariesWithMainList()
void EndTracking(G4Track *)
size_t size() const
virtual void DoItStarted()=0
MemStat MemoryUsage()
Definition: G4MemStat.cc:55

References G4VITSteppingVerbose::DoItStarted(), G4ManyFastLists< OBJECT >::end(), G4ITTrackingManager::EndTracking(), ExtractDoItData(), FatalException, fLeadingTracks, fpTrackContainer, fpTrackingManager, fpVerbose, fStopAndKill, G4cout, G4endl, G4Exception(), G4ITTrackHolder::GetMainList(), G4Track::GetTrackID(), G4Track::GetTrackStatus(), G4ITTrackHolder::KillTracks(), G4MemStat::MemoryUsage(), G4ITTrackHolder::MergeSecondariesWithMainList(), G4ITLeadingTracks::Reset(), G4ManyFastLists< OBJECT >::size(), and Stepping().

Referenced by G4Scheduler::Stepping().

◆ DoStepping()

void G4ITStepProcessor::DoStepping ( )
protected

Definition at line 293 of file G4ITStepProcessor2.cc.

294{
295 SetupMembers();
296
297#ifdef DEBUG_MEM
298 MemStat mem_first, mem_second, mem_diff;
299#endif
300
301#ifdef DEBUG_MEM
302 mem_first = MemoryUsage();
303#endif
304
305#ifdef G4VERBOSE
307#endif
308
309 if(!fpProcessInfo)
310 {
311 G4ExceptionDescription exceptionDescription;
312 exceptionDescription << "No process info found for particle :"
314 G4Exception("G4ITStepProcessor::DoStepping",
315 "ITStepProcessor0012",
317 exceptionDescription);
318 return;
319 }
320// else if(fpTrack->GetTrackStatus() == fStopAndKill)
321// {
322// fpState->fStepStatus = fUndefined;
323// return;
324// }
325
329 {/*
330 G4ExceptionDescription exceptionDescription;
331 exceptionDescription << "No process was found for particle :"
332 << fpTrack->GetDefinition()->GetParticleName();
333 G4Exception("G4ITStepProcessor::DoStepping",
334 "ITStepProcessorNoProcess",
335 JustWarning,
336 exceptionDescription);
337
338 fpTrack->SetTrackStatus(fStopAndKill);
339 fpState->fStepStatus = fUndefined;*/
340 return;
341 }
342
343 //--------
344 // Prelude
345 //--------
346#ifdef G4VERBOSE
347 // !!!!! Verbose
349#endif
350
351 //---------------------------------
352 // AtRestStep, AlongStep and PostStep Processes
353 //---------------------------------
354
355 fpNavigator->SetNavigatorState(fpITrack->GetTrackingInfo()->GetNavigatorState());
356// fpNavigator->ResetHierarchyAndLocate( fpTrack->GetPosition(),
357// fpTrack->GetMomentumDirection(),
358// *((G4TouchableHistory*)fpTrack->GetTouchableHandle()()) );
359// fpNavigator->SetNavigatorState(fpITrack->GetTrackingInfo()->GetNavigatorState());
360 // We reset the navigator state before checking for AtRest
361 // in case a AtRest processe would use a navigator info
362
363#ifdef DEBUG_MEM
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;
367#endif
368
370 {
372 != 0) // second condition to make coverity happy
373 {
374 //-----------------
375 // AtRestStepDoIt
376 //-----------------
380
381#ifdef G4VERBOSE
382 // !!!!! Verbose
384#endif
385
386 }
387 // Make sure the track is killed
388 // fpTrack->SetTrackStatus(fStopAndKill);
389 }
390 else // if(fTimeStep > 0.) // Bye, because PostStepIL can return 0 => time =0
391 {
392 if(fpITrack == 0)
393 {
394 G4ExceptionDescription exceptionDescription;
395 exceptionDescription << " !!! TrackID : " << fpTrack->GetTrackID()
396 << G4endl<< " !!! Track status : "<< fpTrack->GetTrackStatus() << G4endl
397 << " !!! Particle Name : "<< fpTrack -> GetDefinition() -> GetParticleName() << G4endl
398 << "No G4ITStepProcessor::fpITrack found" << G4endl;
399
400 G4Exception("G4ITStepProcessor::DoStepping",
401 "ITStepProcessor0013",
403 exceptionDescription);
404 return; // to make coverity happy
405 }
406
407 if(fpITrack->GetTrackingInfo()->IsLeadingStep() == false)
408 {
409 // In case the track has NOT the minimum step length
410 // Given the final step time, the transportation
411 // will compute the final position of the particle
415 }
416
417#ifdef DEBUG_MEM
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;
421#endif
422
423 // Store the Step length (geometrical length) to G4Step and G4Track
426
427 G4double GeomStepLength = fpState->fPhysicalStep;
428
429 // Store StepStatus to PostStepPoint
431
432 // Invoke AlongStepDoIt
434
435#ifdef DEBUG_MEM
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;
439#endif
440
441#ifdef G4VERBOSE
442 // !!!!! Verbose
444#endif
445
446 // Update track by taking into account all changes by AlongStepDoIt
447 // fpStep->UpdateTrack(); // done in InvokeAlongStepDoItProcs
448
449 // Update safety after invocation of all AlongStepDoIts
451
453 std::max(fpState->fProposedSafety - GeomStepLength, kCarTolerance);
454
456
457 if(GetIT(fpTrack)->GetTrackingInfo()->IsLeadingStep())
458 {
459 // Invoke PostStepDoIt including G4ITTransportation::PSDI
461
462#ifdef DEBUG_MEM
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;
466#endif
467#ifdef G4VERBOSE
468 // !!!!! Verbose
470#endif
471 }
472 else
473 {
474 // Only invoke transportation and all other forced processes
477
478#ifdef DEBUG_MEM
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;
482#endif
483 }
484
485#ifdef G4VERBOSE
486 // !!!!! Verbose
488#endif
489 }
490
491 fpNavigator->ResetNavigatorState();
492
493#ifdef DEBUG_MEM
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;
497#endif
498
499 //-------
500 // Finale
501 //-------
502
503 // Update 'TrackLength' and remeber the Step length of the current Step
506
507//#ifdef G4VERBOSE
508// // !!!!! Verbose
509// if(fpVerbose) fpVerbose->StepInfo();
510//#endif
511
512#ifdef G4VERBOSE
514#endif
515
516// G4cout << " G4ITStepProcessor::DoStepping -- " <<fpTrack->GetTrackID() << " tps = " << fpTrack->GetGlobalTime() << G4endl;
517
518 // Send G4Step information to Hit/Dig if the volume is sensitive
519 /***
520 fpCurrentVolume = fpStep->GetPreStepPoint()->GetPhysicalVolume();
521 StepControlFlag = fpStep->GetControlFlag();
522
523 if( fpCurrentVolume != 0 && StepControlFlag != AvoidHitInvocation)
524 {
525 fpSensitive = fpStep->GetPreStepPoint()->
526 GetSensitiveDetector();
527 if( fpSensitive != 0 )
528 {
529 fpSensitive->Hit(fpStep);
530 }
531 }
532
533 User intervention process.
534 if( fpUserSteppingAction != 0 )
535 {
536 fpUserSteppingAction->UserSteppingAction(fpStep);
537 }
538 G4UserSteppingAction* regionalAction
539 = fpStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()
540 ->GetRegionalSteppingAction();
541 if( regionalAction ) regionalAction->UserSteppingAction(fpStep);
542 ***/
544 // Stepping process finish. Return the value of the StepStatus.
545
546#ifdef DEBUG_MEM
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;
550#endif
551
552 // return fpState->fStepStatus;
553}
@ fAtRestDoItProc
Definition: G4StepStatus.hh:45
void AppendStep(G4Track *track, G4Step *step)
void SetSafety(const G4double aValue)
void SetStepStatus(const G4StepStatus aValue)
void SetStepLength(G4double value)
G4double GetStepLength() const
void SetStepLength(G4double value)
void AddTrackLength(const G4double aValue)
void IncrementCurrentStepNumber()
G4ITNavigatorState_Lock * GetNavigatorState() const
virtual void StepInfoForLeadingTrack()=0
virtual void PostStepDoItAllDone()=0
virtual void PreStepVerbose(G4Track *)=0
virtual void PostStepVerbose(G4Track *)=0
virtual void AtRestDoItInvoked()=0
virtual void NewStep()=0
virtual void AlongStepDoItAllDone()=0
G4ProcessVector * fpAtRestDoItVector

References G4Track::AddTrackLength(), G4VITSteppingVerbose::AlongStepDoItAllDone(), G4ITTrackingManager::AppendStep(), G4VITSteppingVerbose::AtRestDoItInvoked(), FatalErrorInArgument, fAtRestDoItProc, G4ITStepProcessorState::fEndpointSafety, G4ITStepProcessorState::fEndpointSafOrigin, FindTransportationStep(), ProcessGeneralInfo::fpAtRestDoItVector, G4ITStepProcessorState::fPhysicalStep, fpITrack, fpNavigator, fPostStepDoItProc, fpPostStepPoint, fpProcessInfo, G4ITStepProcessorState::fProposedSafety, fpState, fpStep, fpTrack, fpTrackingManager, fpTransportation, fpVerbose, G4ITStepProcessorState::fStepStatus, fStopButAlive, G4cout, G4endl, G4Exception(), G4Track::GetDefinition(), GetIT(), G4TrackingInformation::GetNavigatorState(), G4ParticleDefinition::GetParticleName(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetStepLength(), G4Track::GetTrackID(), G4IT::GetTrackingInfo(), G4Track::GetTrackStatus(), G4Track::IncrementCurrentStepNumber(), InvokeAlongStepDoItProcs(), InvokeAtRestDoItProcs(), InvokePostStepDoItProcs(), InvokeTransportationProc(), G4TrackingInformation::IsLeadingStep(), kCarTolerance, G4INCL::Math::max(), ProcessGeneralInfo::MAXofAlongStepLoops, ProcessGeneralInfo::MAXofAtRestLoops, ProcessGeneralInfo::MAXofPostStepLoops, G4MemStat::MemoryUsage(), G4VITSteppingVerbose::NewStep(), G4VITSteppingVerbose::PostStepDoItAllDone(), G4VITSteppingVerbose::PostStepVerbose(), G4VITSteppingVerbose::PreStepVerbose(), G4StepPoint::SetProcessDefinedStep(), G4StepPoint::SetSafety(), G4Step::SetStepLength(), G4Track::SetStepLength(), G4StepPoint::SetStepStatus(), SetupMembers(), and G4VITSteppingVerbose::StepInfoForLeadingTrack().

Referenced by Stepping().

◆ ExtractDoItData()

void G4ITStepProcessor::ExtractDoItData ( )

Definition at line 192 of file G4ITStepProcessor2.cc.

193{
194 if (!fpTrack)
195 {
197 return;
198 }
199
201
202 switch (status)
203 {
204 case fAlive:
205 case fStopButAlive:
206 case fSuspend:
208 default:
210 break;
211
212 case fStopAndKill:
215// G4TrackList::Pop(fpTrack);
217// fTrackContainer->PushToKill(fpTrack);
218 break;
219
222 if (fpSecondary)
223 {
224 for (size_t i = 0; i < fpSecondary->size(); ++i)
225 {
226 delete (*fpSecondary)[i];
227 }
228 fpSecondary->clear();
229 }
230// G4TrackList::Pop(fpTrack);
232// fTrackContainer->PushToKill(fpTrack);
233 break;
234 }
235
237}
@ fKillTrackAndSecondaries
@ fSuspend
@ fAlive
@ fPostponeToNextEvent
void RemoveReactionSet(G4Track *track)
static G4ITReactionSet * Instance()

References CleanProcessor(), G4ITTrackingManager::EndTracking(), fAlive, fKillTrackAndSecondaries, fPostponeToNextEvent, fpSecondary, fpTrack, fpTrackingManager, fStopAndKill, fStopButAlive, fSuspend, G4Track::GetTrackStatus(), G4ITReactionSet::Instance(), PushSecondaries(), and G4ITReactionSet::RemoveReactionSet().

Referenced by DoIt().

◆ ExtractILData()

void G4ITStepProcessor::ExtractILData ( )
protected

Definition at line 635 of file G4ITStepProcessor.cc.

636{
637 assert(fpTrack != 0);
638 if (fpTrack == 0)
639 {
641 return;
642 }
643
644 // assert(fpTrack->GetTrackStatus() != fStopAndKill);
645
647 {
648// trackContainer->GetMainList()->pop(fpTrack);
651 return;
652 }
653
654 if (IsInf(fTimeStep))
655 {
656 // G4cout << "!!!!!!!!!!!! IS INF " << track->GetTrackID() << G4endl;
658 return;
659 }
660 else if (fTimeStep < fILTimeStep - DBL_EPSILON)
661 {
662 // G4cout << "!!!!!!!!!!!! TEMPS DIFFERENTS "
663 // << track->GetTrackID() << G4endl;
664
666
668
669// G4cout << "Will set leading step to true for time :"
670// << SP -> GetInteractionTime() << " against fTimeStep : "
671// << G4BestUnit(fILTimeStep, "Time") << " the trackID is : " << track->GetTrackID()
672// << G4endl;
673
674// GetIT(fpTrack)->GetTrackingInfo()->SetLeadingStep(true);
676 }
677 else if(fabs(fILTimeStep - fTimeStep) < DBL_EPSILON )
678 {
679
680 // G4cout << "!!!!!!!!!!!! MEME TEMPS " << track->GetTrackID() << G4endl;
681 // G4cout << "Will set leading step to true for time :"
682 // << SP -> GetInteractionTime() << " against fTimeStep : "
683 // << fTimeStep << " the trackID is : " << track->GetTrackID()<< G4endl;
684// GetIT(fpTrack)->GetTrackingInfo()->SetLeadingStep(true);
686 }
687 // else
688 // {
689 // G4cout << "!!!! Bigger time : " << "currentTime : "<<fILTimeStep
690 // << " proposedTime : " << SP -> GetInteractionTime() << G4endl;
691 // }
692
694}
bool IsInf(T value)
void Push(G4Track *)
#define DBL_EPSILON
Definition: templates.hh:66

References CleanProcessor(), DBL_EPSILON, G4ITTrackingManager::EndTracking(), fILTimeStep, fLeadingTracks, fpTrack, fpTrackingManager, fStopAndKill, fTimeStep, GetInteractionTime(), G4Track::GetTrackStatus(), IsInf(), G4ITLeadingTracks::Push(), and G4ITLeadingTracks::Reset().

Referenced by ComputeInteractionLength().

◆ FindTransportationStep()

void G4ITStepProcessor::FindTransportationStep ( )

Definition at line 802 of file G4ITStepProcessor2.cc.

803{
804 double physicalStep(0.);
805
807 // dynamic_cast<G4ITTransportation*>((fpProcessInfo->fpAlongStepGetPhysIntVector)[MAXofAlongStepLoops-1]);
808
809 if(!fpTrack)
810 {
811 G4ExceptionDescription exceptionDescription;
812 exceptionDescription << "No G4ITStepProcessor::fpTrack found";
813 G4Exception("G4ITStepProcessor::FindTransportationStep",
814 "ITStepProcessor0013",
816 exceptionDescription);
817 return;
818
819 }
820 if(!fpITrack)
821 {
822 G4ExceptionDescription exceptionDescription;
823 exceptionDescription << "No G4ITStepProcessor::fITrack";
824 G4Exception("G4ITStepProcessor::FindTransportationStep",
825 "ITStepProcessor0014",
827 exceptionDescription);
828 return;
829 }
830 if(!(fpITrack->GetTrack()))
831 {
832 G4ExceptionDescription exceptionDescription;
833 exceptionDescription << "No G4ITStepProcessor::fITrack->GetTrack()";
834 G4Exception("G4ITStepProcessor::FindTransportationStep",
835 "ITStepProcessor0015",
837 exceptionDescription);
838 return;
839 }
840
842 {
844 ->GetProcessID()));
846
847// fpTransportation->SetProcessState(0);
849 }
850
851 if(physicalStep >= DBL_MAX)
852 {
853// G4cout << "---- 2) Setting stop and kill for " << GetIT(fpTrack)->GetName() << G4endl;
854 fpTrack -> SetTrackStatus(fStopAndKill);
855 return;
856 }
857
858 fpState->fPhysicalStep = physicalStep;
859}
G4Track * GetTrack()
Definition: G4IT.hh:218
G4ITTransportation * fpTransportation

References G4ITTransportation::ComputeStep(), DBL_MAX, FatalErrorInArgument, G4ITStepProcessorState::fPhysicalStep, fpITrack, fpProcessInfo, fpState, fpStep, fpTrack, fpTrackingInfo, ProcessGeneralInfo::fpTransportation, fpTransportation, fStopAndKill, fTimeStep, G4Exception(), G4VITProcess::GetProcessID(), G4TrackingInformation::GetProcessState(), G4IT::GetTrack(), G4VITProcess::ResetProcessState(), and G4VITProcess::SetProcessState().

Referenced by DoStepping().

◆ ForceReInitialization()

void G4ITStepProcessor::ForceReInitialization ( )

Definition at line 189 of file G4ITStepProcessor.cc.

190{
191 fInitialized = false;
193 Initialize();
194}
virtual void Initialize()

References ClearProcessInfo(), fInitialized, and Initialize().

◆ GetAtRestDoItProcTriggered()

size_t G4ITStepProcessor::GetAtRestDoItProcTriggered ( ) const
inline

Definition at line 220 of file G4ITStepProcessor.hh.

221 {
223 }

References fAtRestDoItProcTriggered.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetAtRestIL()

void G4ITStepProcessor::GetAtRestIL ( )
protected

Definition at line 540 of file G4ITStepProcessor.cc.

541{
542 // Select the rest process which has the shortest time before
543 // it is invoked. In rest processes, GPIL()
544 // returns the time before a process occurs.
545 G4double lifeTime(DBL_MAX), shortestLifeTime (DBL_MAX);
546
548 shortestLifeTime = DBL_MAX;
549
550 unsigned int NofInactiveProc=0;
551
552 for( size_t ri=0; ri < fpProcessInfo->MAXofAtRestLoops; ri++ )
553 {
555 if (fpCurrentProcess== 0)
556 {
558 NofInactiveProc++;
559 continue;
560 } // NULL means the process is inactivated by a user on fly.
561
565
568
569 if(fCondition==Forced)
570 {
572 }
573 else
574 {
576 if(lifeTime < shortestLifeTime )
577 {
578 shortestLifeTime = lifeTime;
580 }
581 }
582 }
583
585
586// G4cout << " --> Selected at rest process : "
587// << (*fpProcessInfo->fpAtRestGetPhysIntVector)[fAtRestDoItProcTriggered]
588// ->GetProcessName()
589// << G4endl;
590
591 fTimeStep = shortestLifeTime;
592
593 // at least one process is necessary to destroy the particle
594 // exit with warning
595 if(NofInactiveProc==fpProcessInfo->MAXofAtRestLoops)
596 {
597 G4cerr << "ERROR - G4ITStepProcessor::InvokeAtRestDoItProcs()" << G4endl
598 << " No AtRestDoIt process is active!" << G4endl;
599 }
600}
G4SelectedAtRestDoItVector fSelectedAtRestDoItVector
G4double AtRestGPIL(const G4Track &track, G4ForceCondition *condition)
Definition: G4VProcess.hh:472
G4ProcessVector * fpAtRestGetPhysIntVector

References G4VProcess::AtRestGPIL(), DBL_MAX, fAtRestDoItProcTriggered, fCondition, Forced, ProcessGeneralInfo::fpAtRestGetPhysIntVector, fpCurrentProcess, fpProcessInfo, fpState, fpTrack, fpTrackingInfo, G4ITStepProcessorState::fSelectedAtRestDoItVector, fTimeStep, G4cerr, G4endl, G4VITProcess::GetProcessID(), G4TrackingInformation::GetProcessState(), InActivated, ProcessGeneralInfo::MAXofAtRestLoops, NotForced, G4VITProcess::ResetProcessState(), and G4VITProcess::SetProcessState().

Referenced by DoDefinePhysicalStepLength().

◆ GetCondition()

G4ForceCondition G4ITStepProcessor::GetCondition ( ) const
inline

Definition at line 285 of file G4ITStepProcessor.hh.

286 {
287 return fCondition;
288 }

References fCondition.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetCurrentProcess()

const G4VITProcess * G4ITStepProcessor::GetCurrentProcess ( ) const
inline

Definition at line 245 of file G4ITStepProcessor.hh.

246 {
247 return fpCurrentProcess;
248 }

References fpCurrentProcess.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetCurrentProcessInfo()

const ProcessGeneralInfo * G4ITStepProcessor::GetCurrentProcessInfo ( ) const
inline

Definition at line 265 of file G4ITStepProcessor.hh.

266 {
267 return fpProcessInfo;
268 }

References fpProcessInfo.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetCurrentVolume()

const G4VPhysicalVolume * G4ITStepProcessor::GetCurrentVolume ( ) const
inline

Definition at line 280 of file G4ITStepProcessor.hh.

281 {
282 return fpCurrentVolume;
283 }

References fpCurrentVolume.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetGPILSelection()

G4GPILSelection G4ITStepProcessor::GetGPILSelection ( ) const
inline

Definition at line 225 of file G4ITStepProcessor.hh.

226 {
227 return fGPILSelection;
228 }

References fGPILSelection.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetILTimeStep()

G4double G4ITStepProcessor::GetILTimeStep ( )
inline

Definition at line 203 of file G4ITStepProcessor.hh.

204 {
205 return fILTimeStep;
206 }

References fILTimeStep.

◆ GetInteractionTime()

double G4ITStepProcessor::GetInteractionTime ( )
inline

Definition at line 491 of file G4ITStepProcessor.hh.

492{
493 return fTimeStep;
494}

References fTimeStep.

Referenced by ExtractILData().

◆ GetN2ndariesAlongStepDoIt()

G4int G4ITStepProcessor::GetN2ndariesAlongStepDoIt ( ) const
inline

Definition at line 230 of file G4ITStepProcessor.hh.

231 {
233 }

References fN2ndariesAlongStepDoIt.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetN2ndariesAtRestDoIt()

G4int G4ITStepProcessor::GetN2ndariesAtRestDoIt ( ) const
inline

Definition at line 235 of file G4ITStepProcessor.hh.

236 {
238 }

References fN2ndariesAtRestDoIt.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetN2ndariesPostStepDoIt()

G4int G4ITStepProcessor::GetN2ndariesPostStepDoIt ( ) const
inline

Definition at line 240 of file G4ITStepProcessor.hh.

241 {
243 }

References fN2ndariesPostStepDoIt.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetParticleChange()

const G4VParticleChange * G4ITStepProcessor::GetParticleChange ( ) const
inline

Definition at line 275 of file G4ITStepProcessor.hh.

276 {
277 return fpParticleChange;
278 }

References fpParticleChange.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetPhysIntLength()

G4double G4ITStepProcessor::GetPhysIntLength ( ) const
inline

Definition at line 250 of file G4ITStepProcessor.hh.

251 {
252 return fPhysIntLength;
253 }

References fPhysIntLength.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetPostStepAtTimeDoItProcTriggered()

size_t G4ITStepProcessor::GetPostStepAtTimeDoItProcTriggered ( ) const
inline

Definition at line 255 of file G4ITStepProcessor.hh.

256 {
258 }

References fPostStepAtTimeDoItProcTriggered.

◆ GetPostStepDoItProcTriggered()

size_t G4ITStepProcessor::GetPostStepDoItProcTriggered ( ) const
inline

Definition at line 260 of file G4ITStepProcessor.hh.

261 {
263 }

References fPostStepDoItProcTriggered.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetProcessInfo()

void G4ITStepProcessor::GetProcessInfo ( )
protected

Definition at line 487 of file G4ITStepProcessor.cc.

488{
490 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it =
491 fProcessGeneralInfoMap.find(particle);
492
493 if(it == fProcessGeneralInfoMap.end())
494 {
497 if(fpProcessInfo == 0)
498 {
499 G4ExceptionDescription exceptionDescription("...");
500 G4Exception("G4ITStepProcessor::GetProcessNumber",
501 "ITStepProcessor0008",
503 exceptionDescription);
504 return;
505 }
506 }
507 else
508 {
509 fpProcessInfo = it->second;
510 }
511}
void SetupGeneralProcessInfo(G4ParticleDefinition *, G4ProcessManager *)

References FatalErrorInArgument, fpProcessInfo, fProcessGeneralInfoMap, fpTrack, G4Exception(), G4Track::GetDefinition(), G4ParticleDefinition::GetProcessManager(), and SetupGeneralProcessInfo().

Referenced by SetupMembers().

◆ GetProcessorState()

const G4ITStepProcessorState * G4ITStepProcessor::GetProcessorState ( ) const
inline

Definition at line 270 of file G4ITStepProcessor.hh.

271 {
272 return fpState;
273 }

References fpState.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetSecondaries()

G4TrackVector * G4ITStepProcessor::GetSecondaries ( ) const
inline

Definition at line 179 of file G4ITStepProcessor.hh.

180 {
181 return fpSecondary;
182 }

References fpSecondary.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetStep() [1/2]

G4Step * G4ITStepProcessor::GetStep ( )
inline

Definition at line 166 of file G4ITStepProcessor.hh.

167 {
168 return fpStep;
169 }

References fpStep.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetStep() [2/2]

const G4Step * G4ITStepProcessor::GetStep ( ) const
inline

Definition at line 170 of file G4ITStepProcessor.hh.

171 {
172 return fpStep;
173 }

References fpStep.

◆ GetTrack() [1/2]

G4Track * G4ITStepProcessor::GetTrack ( )
inline

Definition at line 162 of file G4ITStepProcessor.hh.

163 {
164 return fpTrack;
165 }

References fpTrack.

Referenced by G4VITSteppingVerbose::CopyState().

◆ GetTrack() [2/2]

const G4Track * G4ITStepProcessor::GetTrack ( ) const
inline

Definition at line 434 of file G4ITStepProcessor.hh.

435{
436 return fpTrack;
437}

References fpTrack.

◆ GetTrackingManager()

G4ITTrackingManager * G4ITStepProcessor::GetTrackingManager ( )
inline

Definition at line 187 of file G4ITStepProcessor.hh.

188 {
189 return fpTrackingManager;
190 }

References fpTrackingManager.

◆ InitDefineStep()

void G4ITStepProcessor::InitDefineStep ( )
protected

ADDED BACK

ADDED BACK

Definition at line 850 of file G4ITStepProcessor.cc.

851{
852
853 if(!fpStep)
854 {
855 // Create new Step and give it to the track
856 fpStep = new G4Step();
859
860 // Create new state and set it in the trackingInfo
863
864 SetupMembers();
866
868 }
869 else
870 {
871 SetupMembers();
872
874 /***
875 // Send G4Step information to Hit/Dig if the volume is sensitive
876 fpCurrentVolume = fpStep->GetPreStepPoint()->GetPhysicalVolume();
877 StepControlFlag = fpStep->GetControlFlag();
878 if( fpCurrentVolume != 0 && StepControlFlag != AvoidHitInvocation)
879 {
880 fpSensitive = fpStep->GetPreStepPoint()->
881 GetSensitiveDetector();
882
883 // if( fSensitive != 0 ) {
884 // fSensitive->Hit(fStep);
885 // }
886 }
887 ***/
888 // Store last PostStepPoint to PreStepPoint, and swap current and next
889 // volume information of G4Track. Reset total energy deposit in one Step.
892
893 //JA Set the volume before it is used (in DefineStepLength() for User Limit)
895 /*
896 G4cout << G4endl;
897 G4cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << G4endl;
898 G4cout << "PreStepPoint Volume : "
899 << fpCurrentVolume->GetName() << G4endl;
900 G4cout << "Track Touchable : "
901 << fpTrack->GetTouchableHandle()->GetVolume()->GetName() << G4endl;
902 G4cout << "Track NextTouchable : "
903 << fpTrack->GetNextTouchableHandle()->GetVolume()->GetName()
904 << G4endl;
905 */
906 // Reset the step's auxiliary points vector pointer
908
909 // Switch next touchable in track to current one
913
915 /*
916 G4VPhysicalVolume* oldTopVolume =
917 fpTrack->GetTouchableHandle()->GetVolume();
918 fpNavigator->SetNavigatorState(
919 fpITrack->GetTrackingInfo()->GetNavigatorState());
920
921 G4VPhysicalVolume* newTopVolume = fpNavigator->ResetHierarchyAndLocate(
922 fpTrack->GetPosition(), fpTrack->GetMomentumDirection(),
923 *((G4TouchableHistory*) fpTrack->GetTouchableHandle()()));
924
925 // G4VPhysicalVolume* newTopVolume=
926 // fpNavigator->LocateGlobalPointAndSetup(fpTrack->GetPosition(),
927 // &fpTrack->GetMomentumDirection(),
928 // true, false);
929
930 // G4cout << "New Top Volume : " << newTopVolume->GetName() << G4endl;
931
932 if (newTopVolume != oldTopVolume || oldTopVolume->GetRegularStructureId()
933 == 1)
934 {
935 fpState->fTouchableHandle = fpNavigator->CreateTouchableHistory();
936 fpTrack->SetTouchableHandle(fpState->fTouchableHandle);
937 fpTrack->SetNextTouchableHandle(fpState->fTouchableHandle);
938 }
939
940 */
942 //==========================================================================
943 // Only reset navigator state + reset volume hierarchy (internal)
944 // No need to relocate
945 //==========================================================================
946 fpNavigator->SetNavigatorState(fpITrack->GetTrackingInfo()
948 }
949}
G4TouchableHandle fTouchableHandle
void StartTracking(G4Track *)
G4VPhysicalVolume * GetPhysicalVolume() const
Definition: G4Step.hh:62
void SetPointerToVectorOfAuxiliaryPoints(std::vector< G4ThreeVector > *vec)
void ResetTotalEnergyDeposit()
void CopyPostToPreStepPoint()
G4StepPoint * GetPreStepPoint() const
G4TrackVector * NewSecondaryVector()
void SetStep(const G4Step *aValue)
const G4TouchableHandle & GetNextTouchableHandle() const
void SetNextTouchableHandle(const G4TouchableHandle &apValue)
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4TouchableHandle & GetTouchableHandle() const
G4double GetStepLength() const
void SetStepProcessorState(G4ITStepProcessorState_Lock *)

References G4Step::CopyPostToPreStepPoint(), fpCurrentVolume, fpITrack, fpNavigator, G4ITStepProcessorState::fPreviousStepSize, fpSecondary, fpState, fpStep, fpTrack, fpTrackingManager, G4ITStepProcessorState::fTouchableHandle, G4TrackingInformation::GetNavigatorState(), G4Track::GetNextTouchableHandle(), G4StepPoint::GetPhysicalVolume(), G4Step::GetPreStepPoint(), G4Track::GetStepLength(), G4Track::GetTouchableHandle(), G4IT::GetTrackingInfo(), G4Step::NewSecondaryVector(), G4Step::ResetTotalEnergyDeposit(), SetInitialStep(), G4Track::SetNextTouchableHandle(), G4Step::SetPointerToVectorOfAuxiliaryPoints(), G4Track::SetStep(), G4TrackingInformation::SetStepProcessorState(), G4Track::SetTouchableHandle(), SetupMembers(), and G4ITTrackingManager::StartTracking().

Referenced by DoDefinePhysicalStepLength().

◆ Initialize()

void G4ITStepProcessor::Initialize ( )
virtual

Definition at line 198 of file G4ITStepProcessor.cc.

199{
201 if(fInitialized) return;
202 // ActiveOnlyITProcess();
203
205 ->GetNavigatorForTracking());
206
208 kCarTolerance = 0.5
210
211 if(fpVerbose == 0)
212 {
214
215 if(interactivity)
216 {
217 fpVerbose = interactivity->GetSteppingVerbose();
219 }
220 }
221
223
224 fInitialized = true;
225}
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
void SetNavigator(G4ITNavigator *value)
static G4ITTrackHolder * Instance()
G4VITSteppingVerbose * GetSteppingVerbose()
G4ITTrackingInteractivity * GetInteractivity()
static G4ITTransportationManager * GetTransportationManager()
void SetStepProcessor(const G4ITStepProcessor *stepProcessor)

References CleanProcessor(), DBL_MAX, fInitialized, fPhysIntLength, fpTrackContainer, fpTrackingManager, fpVerbose, G4GeometryTolerance::GetInstance(), G4ITTrackingManager::GetInteractivity(), G4ITTrackingInteractivity::GetSteppingVerbose(), G4GeometryTolerance::GetSurfaceTolerance(), G4ITTransportationManager::GetTransportationManager(), G4ITTrackHolder::Instance(), kCarTolerance, SetNavigator(), and G4VITSteppingVerbose::SetStepProcessor().

Referenced by ForceReInitialization(), and G4Scheduler::Process().

◆ InvokeAlongStepDoItProcs()

void G4ITStepProcessor::InvokeAlongStepDoItProcs ( )
protected

Definition at line 628 of file G4ITStepProcessor2.cc.

629{
630
631#ifdef DEBUG_MEM
632 MemStat mem_first, mem_second, mem_diff;
633#endif
634
635#ifdef DEBUG_MEM
636 mem_first = MemoryUsage();
637#endif
638
639 // If the current Step is defined by a 'ExclusivelyForced'
640 // PostStepDoIt, then don't invoke any AlongStepDoIt
642 {
643 return; // Take note 'return' at here !!!
644 }
645
646 // Invoke the all active continuous processes
647 for(size_t ci = 0; ci < fpProcessInfo->MAXofAlongStepLoops; ci++)
648 {
651 if(fpCurrentProcess == 0) continue;
652 // NULL means the process is inactivated by a user on fly.
653
655 ->GetProcessID()));
657
658#ifdef DEBUG_MEM
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;
662#endif
663
664// fpCurrentProcess->SetProcessState(0);
666 // Update the PostStepPoint of Step according to ParticleChange
667
669
670#ifdef G4VERBOSE
671 // !!!!! Verbose
673#endif
674
675 // Now Store the secondaries from ParticleChange to SecondaryList
677
678 // Set the track status according to what the process defined
679 // if kinetic energy >0, otherwise set fStopButAlive
681
682 // clear ParticleChange
684 }
685
686#ifdef DEBUG_MEM
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;
690#endif
691
693
694 G4TrackStatus fNewStatus = fpTrack->GetTrackStatus();
695
696 if(fNewStatus == fAlive && fpTrack->GetKineticEnergy() <= DBL_MIN)
697 {
698 // G4cout << "G4ITStepProcessor::InvokeAlongStepDoItProcs : Track will be killed" << G4endl;
699 if(fpProcessInfo->MAXofAtRestLoops>0) fNewStatus = fStopButAlive;
700 else fNewStatus = fStopAndKill;
701 fpTrack->SetTrackStatus( fNewStatus );
702 }
703
704}
void DealWithSecondaries(G4int &)
void UpdateTrack()
virtual void AlongStepDoItOneByOne()=0
virtual G4Step * UpdateStepForAlongStep(G4Step *Step)
G4TrackStatus GetTrackStatus() const
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)=0
const G4String & GetProcessName() const
Definition: G4VProcess.hh:382
G4ProcessVector * fpAlongStepDoItVector

References G4VProcess::AlongStepDoIt(), G4VITSteppingVerbose::AlongStepDoItOneByOne(), G4VParticleChange::Clear(), DBL_MIN, DealWithSecondaries(), fAlive, fExclusivelyForcedProc, fN2ndariesAlongStepDoIt, ProcessGeneralInfo::fpAlongStepDoItVector, fpCurrentProcess, fpParticleChange, fpProcessInfo, fpState, fpStep, fpTrack, fpTrackingInfo, fpVerbose, G4ITStepProcessorState::fStepStatus, fStopAndKill, fStopButAlive, G4cout, G4endl, G4Track::GetKineticEnergy(), G4VITProcess::GetProcessID(), G4VProcess::GetProcessName(), G4TrackingInformation::GetProcessState(), G4Track::GetTrackID(), G4Track::GetTrackStatus(), G4VParticleChange::GetTrackStatus(), ProcessGeneralInfo::MAXofAlongStepLoops, ProcessGeneralInfo::MAXofAtRestLoops, G4MemStat::MemoryUsage(), G4VITProcess::ResetProcessState(), G4VITProcess::SetProcessState(), G4Track::SetTrackStatus(), G4VParticleChange::UpdateStepForAlongStep(), and G4Step::UpdateTrack().

Referenced by DoStepping().

◆ InvokeAtRestDoItProcs()

void G4ITStepProcessor::InvokeAtRestDoItProcs ( )
protected

Definition at line 561 of file G4ITStepProcessor2.cc.

562{
563 fpStep->SetStepLength(0.); //the particle has stopped
565
566 G4SelectedAtRestDoItVector& selectedAtRestDoItVector =
568
569 // invoke selected process
570 for(size_t np = 0; np < fpProcessInfo->MAXofAtRestLoops; np++)
571 {
572 //
573 // Note: DoItVector has inverse order against GetPhysIntVector
574 // and SelectedAtRestDoItVector.
575 //
576 if(selectedAtRestDoItVector[fpProcessInfo->MAXofAtRestLoops - np - 1] != InActivated)
577 {
580
581// G4cout << " Invoke : "
582// << fpCurrentProcess->GetProcessName()
583// << G4endl;
584
585 // if(fpVerbose)
586 // {
587 // fpVerbose->AtRestDoItOneByOne();
588 // }
589
591 ->GetProcessID()));
594
595 // Set the current process as a process which defined this Step length
597
598 // Update Step
600
601 // Now Store the secondaries from ParticleChange to SecondaryList
603
604 // Set the track status according to what the process defined
605 // if kinetic energy >0, otherwise set fStopButAlive
607
608 // clear ParticleChange
610
611 } //if(fSelectedAtRestDoItVector[np] != InActivated){
612 } //for(size_t np=0; np < MAXofAtRestLoops; np++){
614
615 // Modification par rapport au transport standard :
616 // fStopAndKill doit etre propose par le modele
617 // sinon d autres processus AtRest seront appeles
618 // au pas suivant
619 // fpTrack->SetTrackStatus(fStopAndKill);
620}
class std::vector< int, std::allocator< int > > G4SelectedAtRestDoItVector
virtual G4Step * UpdateStepForAtRest(G4Step *Step)
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)=0

References G4VProcess::AtRestDoIt(), G4VParticleChange::Clear(), DealWithSecondaries(), fN2ndariesAtRestDoIt, ProcessGeneralInfo::fpAtRestDoItVector, fpCurrentProcess, fpParticleChange, fpProcessInfo, fpState, fpStep, fpTrack, fpTrackingInfo, G4ITStepProcessorState::fSelectedAtRestDoItVector, G4Step::GetPostStepPoint(), G4VITProcess::GetProcessID(), G4TrackingInformation::GetProcessState(), G4VParticleChange::GetTrackStatus(), InActivated, ProcessGeneralInfo::MAXofAtRestLoops, G4VITProcess::ResetProcessState(), G4StepPoint::SetProcessDefinedStep(), G4VITProcess::SetProcessState(), G4Step::SetStepLength(), G4Track::SetStepLength(), G4Track::SetTrackStatus(), G4VParticleChange::UpdateStepForAtRest(), and G4Step::UpdateTrack().

Referenced by DoStepping().

◆ InvokePostStepDoItProcs()

void G4ITStepProcessor::InvokePostStepDoItProcs ( )
protected

Definition at line 712 of file G4ITStepProcessor2.cc.

713{
714 size_t _MAXofPostStepLoops = fpProcessInfo->MAXofPostStepLoops;
715 G4SelectedPostStepDoItVector& selectedPostStepDoItVector = fpState
717 G4StepStatus& stepStatus = fpState->fStepStatus;
718
719 // Invoke the specified discrete processes
720 for(size_t np = 0; np < _MAXofPostStepLoops; np++)
721 {
722 //
723 // Note: DoItVector has inverse order against GetPhysIntVector
724 // and SelectedPostStepDoItVector.
725 //
726 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops
727 - np - 1];
728 if(Cond != InActivated)
729 {
730 if(((Cond == NotForced) && (stepStatus == fPostStepDoItProc)) ||
731 ((Cond == Forced) && (stepStatus != fExclusivelyForcedProc))
732 ||
733 // ((Cond == Conditionally) && (stepStatus == fAlongStepDoItProc)) ||
734 ((Cond == ExclusivelyForced) && (stepStatus == fExclusivelyForcedProc))
735 || ((Cond == StronglyForced)))
736 {
737
738 InvokePSDIP(np);
739 }
740 } //if(*fSelectedPostStepDoItVector(np)........
741
742 // Exit from PostStepLoop if the track has been killed,
743 // but extra treatment for processes with Strongly Forced flag
745 {
746 for(size_t np1 = np + 1; np1 < _MAXofPostStepLoops; np1++)
747 {
748 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops
749 - np1 - 1];
750 if(Cond2 == StronglyForced)
751 {
752 InvokePSDIP(np1);
753 }
754 }
755 break;
756 }
757 } //for(size_t np=0; np < MAXofPostStepLoops; np++){
758}
class std::vector< int, std::allocator< int > > G4SelectedPostStepDoItVector
G4StepStatus
Definition: G4StepStatus.hh:40

References ExclusivelyForced, fExclusivelyForcedProc, Forced, fPostStepDoItProc, fpProcessInfo, fpState, fpTrack, G4ITStepProcessorState::fSelectedPostStepDoItVector, G4ITStepProcessorState::fStepStatus, fStopAndKill, G4Track::GetTrackStatus(), InActivated, InvokePSDIP(), ProcessGeneralInfo::MAXofPostStepLoops, NotForced, and StronglyForced.

Referenced by DoStepping().

◆ InvokePSDIP()

void G4ITStepProcessor::InvokePSDIP ( size_t  np)
protected

Definition at line 762 of file G4ITStepProcessor2.cc.

763{
765
767 ->GetProcessID()));
769// fpCurrentProcess->SetProcessState(0);
771
772 // Update PostStepPoint of Step according to ParticleChange
774
775#ifdef G4VERBOSE
776 // !!!!! Verbose
778#endif
779
780 // Update G4Track according to ParticleChange after each PostStepDoIt
782
783 // Update safety after each invocation of PostStepDoIts
785
786 // Now Store the secondaries from ParticleChange to SecondaryList
788
789 // Set the track status according to what the process defined
791
792 // clear ParticleChange
794}
virtual void PostStepDoItOneByOne()=0
virtual G4Step * UpdateStepForPostStep(G4Step *Step)
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
G4ProcessVector * fpPostStepDoItVector

References CalculateSafety(), G4VParticleChange::Clear(), DealWithSecondaries(), fN2ndariesPostStepDoIt, fpCurrentProcess, fpParticleChange, ProcessGeneralInfo::fpPostStepDoItVector, fpProcessInfo, fpStep, fpTrack, fpTrackingInfo, fpVerbose, G4Step::GetPostStepPoint(), G4VITProcess::GetProcessID(), G4TrackingInformation::GetProcessState(), G4VParticleChange::GetTrackStatus(), G4VProcess::PostStepDoIt(), G4VITSteppingVerbose::PostStepDoItOneByOne(), G4VITProcess::ResetProcessState(), G4VITProcess::SetProcessState(), G4StepPoint::SetSafety(), G4Track::SetTrackStatus(), G4VParticleChange::UpdateStepForPostStep(), and G4Step::UpdateTrack().

Referenced by InvokePostStepDoItProcs(), and InvokeTransportationProc().

◆ InvokeTransportationProc()

void G4ITStepProcessor::InvokeTransportationProc ( )
protected

Definition at line 863 of file G4ITStepProcessor2.cc.

864{
865 size_t _MAXofPostStepLoops = fpProcessInfo->MAXofPostStepLoops;
866 G4SelectedPostStepDoItVector& selectedPostStepDoItVector = fpState
868 G4StepStatus& stepStatus = fpState->fStepStatus;
869
870 // Invoke the specified discrete processes
871 for(size_t np = 0; np < _MAXofPostStepLoops; np++)
872 {
873 //
874 // Note: DoItVector has inverse order against GetPhysIntVector
875 // and SelectedPostStepDoItVector.
876 //
877 G4int Cond = selectedPostStepDoItVector[_MAXofPostStepLoops - np - 1];
878 if(Cond != InActivated)
879 {
880 if(((Cond == Forced) && (stepStatus != fExclusivelyForcedProc)) ||
881 // ((Cond == Conditionally) && (stepStatus == fAlongStepDoItProc)) ||
882 ((Cond == ExclusivelyForced) && (stepStatus == fExclusivelyForcedProc))
883 || ((Cond == StronglyForced)))
884 {
885
886 InvokePSDIP(np);
887 }
888 } //if(Cond != InActivated)
889
890 // Exit from PostStepLoop if the track has been killed,
891 // but extra treatment for processes with Strongly Forced flag
893 {
894 for(size_t np1 = np + 1; np1 < _MAXofPostStepLoops; np1++)
895 {
896 G4int Cond2 = selectedPostStepDoItVector[_MAXofPostStepLoops - np1 - 1];
897 if(Cond2 == StronglyForced)
898 {
899 InvokePSDIP(np1);
900 }
901 }
902 break;
903 }
904 }
905}

References ExclusivelyForced, fExclusivelyForcedProc, Forced, fpProcessInfo, fpState, fpTrack, G4ITStepProcessorState::fSelectedPostStepDoItVector, G4ITStepProcessorState::fStepStatus, fStopAndKill, G4Track::GetTrackStatus(), InActivated, InvokePSDIP(), ProcessGeneralInfo::MAXofPostStepLoops, and StronglyForced.

Referenced by DoStepping().

◆ operator=()

G4ITStepProcessor & G4ITStepProcessor::operator= ( const G4ITStepProcessor other)
protected

Definition at line 280 of file G4ITStepProcessor.cc.

281{
282 if(this == &rhs) return *this; // handle self assignment
283 //assignment operator
284 return *this;
285}

◆ PrepareLeadingTracks()

void G4ITStepProcessor::PrepareLeadingTracks ( )

◆ PushSecondaries()

void G4ITStepProcessor::PushSecondaries ( )
protected

Definition at line 241 of file G4ITStepProcessor2.cc.

242{
243 if (!fpSecondary || fpSecondary->empty())
244 {
245 // DEBUG
246 // G4cout << "NO SECONDARIES !!! " << G4endl;
247 return;
248 }
249
250 // DEBUG
251 // G4cout << "There are secondaries : "<< secondaries -> size() << G4endl ;
252
253 G4TrackVector::iterator secondaries_i = fpSecondary->begin();
254
255 for (; secondaries_i != fpSecondary->end(); ++secondaries_i)
256 {
257 G4Track* secondary = *secondaries_i;
258 fpTrackContainer->_PushTrack(secondary);
259 }
260}
void _PushTrack(G4Track *track)

References G4ITTrackHolder::_PushTrack(), fpSecondary, and fpTrackContainer.

Referenced by ExtractDoItData().

◆ ResetLeadingTracks()

void G4ITStepProcessor::ResetLeadingTracks ( )

Definition at line 266 of file G4ITStepProcessor.cc.

267{
269}

References fLeadingTracks, and G4ITLeadingTracks::Reset().

Referenced by G4Scheduler::Stepping().

◆ ResetSecondaries()

void G4ITStepProcessor::ResetSecondaries ( )
protected

Definition at line 530 of file G4ITStepProcessor.cc.

531{
532 // Reset the secondary particles
536}

References fN2ndariesAlongStepDoIt, fN2ndariesAtRestDoIt, and fN2ndariesPostStepDoIt.

Referenced by G4ITStepProcessor(), and SetupMembers().

◆ SetInitialStep()

void G4ITStepProcessor::SetInitialStep ( )
protected

Definition at line 706 of file G4ITStepProcessor.cc.

707{
708 // DEBUG
709 // G4cout << "SetInitialStep for : " << fpITrack-> GetName() << G4endl;
710 //________________________________________________________
711 // Initialize geometry
712
714 {
715 //==========================================================================
716 // Create navigator state and Locate particle in geometry
717 //==========================================================================
718 /*
719 fpNavigator->NewNavigatorStateAndLocate(fpTrack->GetPosition(),
720 fpTrack->GetMomentumDirection());
721
722 fpITrack->GetTrackingInfo()->
723 SetNavigatorState(fpNavigator->GetNavigatorState());
724 */
725 fpNavigator->NewNavigatorState();
727 ->GetNavigatorState());
728
730 fpNavigator->LocateGlobalPointAndSetup(fpTrack->GetPosition(),
731 &direction,
732 false,
733 false); // was false, false
734
735 fpState->fTouchableHandle = fpNavigator->CreateTouchableHistory();
736
739 }
740 else
741 {
744
745 //==========================================================================
746 // Create OR set navigator state
747 //==========================================================================
748
750 {
751 fpNavigator->SetNavigatorState(fpITrack->GetTrackingInfo()
754 ->GetNavigatorState());
755 }
756 else
757 {
758 fpNavigator->NewNavigatorState(*((G4TouchableHistory*) fpState
759 ->fTouchableHandle()));
761 ->GetNavigatorState());
762 }
763
764 G4VPhysicalVolume* oldTopVolume =
766
767 //==========================================================================
768 // Locate particle in geometry
769 //==========================================================================
770
771// G4VPhysicalVolume* newTopVolume =
772// fpNavigator->LocateGlobalPointAndSetup(
773// fpTrack->GetPosition(),
774// &fpTrack->GetMomentumDirection(),
775// true, false);
776
777 G4VPhysicalVolume* newTopVolume =
778 fpNavigator->ResetHierarchyAndLocate(fpTrack->GetPosition(),
781 ->GetTouchableHandle()()));
782
783 if(newTopVolume != oldTopVolume || oldTopVolume->GetRegularStructureId()
784 == 1)
785 {
786 fpState->fTouchableHandle = fpNavigator->CreateTouchableHistory();
789 }
790 }
791
793
794 //________________________________________________________
795 // If the primary track has 'Suspend' or 'PostponeToNextEvent' state,
796 // set the track state to 'Alive'.
799 {
801 }
802
803 //HoangTRAN: it's better to check the status here
804 if(fpTrack->GetTrackStatus() == fStopAndKill) return;
805
806 // If the primary track has 'zero' kinetic energy, set the track
807 // state to 'StopButAlive'.
808 if(fpTrack->GetKineticEnergy() <= 0.0)
809 {
811 }
812 //________________________________________________________
813 // Set vertex information of G4Track at here
814 if(fpTrack->GetCurrentStepNumber() == 0)
815 {
820 }
821 //________________________________________________________
822 // If track is already outside the world boundary, kill it
823 if(fpCurrentVolume == 0)
824 {
825 // If the track is a primary, stop processing
826 if(fpTrack->GetParentID() == 0)
827 {
828 G4cerr << "ERROR - G4ITStepProcessor::SetInitialStep()" << G4endl<< " Primary particle starting at - "
829 << fpTrack->GetPosition()
830 << " - is outside of the world volume." << G4endl;
831 G4Exception("G4ITStepProcessor::SetInitialStep()", "ITStepProcessor0011",
832 FatalException, "Primary vertex outside of the world!");
833 }
834
836 G4cout << "WARNING - G4ITStepProcessor::SetInitialStep()" << G4endl
837 << " Initial track position is outside world! - "
838 << fpTrack->GetPosition() << G4endl;
839 }
840 else
841 {
842 // Initial set up for attribues of 'Step'
844 }
845
847}
@ fUndefined
Definition: G4StepStatus.hh:55
void InitializeStep(G4Track *aValue)
G4VPhysicalVolume * GetVolume() const
void SetVertexPosition(const G4ThreeVector &aValue)
void SetVertexMomentumDirection(const G4ThreeVector &aValue)
const G4ThreeVector & GetPosition() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetMomentumDirection() const
void SetVertexKineticEnergy(const G4double aValue)
G4int GetParentID() const
void SetLogicalVolumeAtVertex(const G4LogicalVolume *)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetRegularStructureId() const =0
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:34

References fAlive, FatalException, fpCurrentVolume, fpITrack, fpNavigator, fPostponeToNextEvent, fpState, fpStep, fpTrack, G4ITStepProcessorState::fStepStatus, fStopAndKill, fStopButAlive, fSuspend, G4ITStepProcessorState::fTouchableHandle, fUndefined, G4cerr, G4cout, G4endl, G4Exception(), G4Track::GetCurrentStepNumber(), G4Track::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetMomentumDirection(), G4TrackingInformation::GetNavigatorState(), G4Track::GetParentID(), G4Track::GetPosition(), G4VPhysicalVolume::GetRegularStructureId(), G4Track::GetTouchableHandle(), G4IT::GetTrackingInfo(), G4Track::GetTrackStatus(), G4Track::GetVolume(), G4VTouchable::GetVolume(), G4Step::InitializeStep(), G4Track::SetLogicalVolumeAtVertex(), G4TrackingInformation::SetNavigatorState(), G4Track::SetNextTouchableHandle(), G4Track::SetTouchableHandle(), G4Track::SetTrackStatus(), G4Track::SetVertexKineticEnergy(), G4Track::SetVertexMomentumDirection(), and G4Track::SetVertexPosition().

Referenced by InitDefineStep().

◆ SetNavigator()

void G4ITStepProcessor::SetNavigator ( G4ITNavigator *  value)
inlineprotected

Definition at line 450 of file G4ITStepProcessor.hh.

451{
452 fpNavigator = value;
453}

References fpNavigator.

Referenced by Initialize().

◆ SetPreviousStepTime()

void G4ITStepProcessor::SetPreviousStepTime ( G4double  previousTimeStep)
inline

Definition at line 427 of file G4ITStepProcessor.hh.

428{
429 fPreviousTimeStep = previousTimeStep;
430}

References fPreviousTimeStep.

Referenced by ComputeInteractionLength().

◆ SetStep()

void G4ITStepProcessor::SetStep ( G4Step val)
inline

Definition at line 174 of file G4ITStepProcessor.hh.

175 {
176 fpStep = val;
177 }

References fpStep.

◆ SetTrack()

void G4ITStepProcessor::SetTrack ( G4Track track)
protected

Definition at line 454 of file G4ITStepProcessor.cc.

455{
456 fpTrack = track;
457 if(fpTrack)
458 {
460 fpStep = const_cast<G4Step*>(fpTrack->GetStep());
461
462 if(fpITrack)
463 {
465 }
466 else
467 {
468 fpTrackingInfo = 0;
469 G4cerr << "Track ID : " << fpTrack->GetTrackID() << G4endl;
470
472 errMsg << "No IT pointer was attached to the track you try to process.";
473 G4Exception("G4ITStepProcessor::SetTrack",
474 "ITStepProcessor0007",
476 errMsg);
477 }
478 }
479 else
480 {
481 fpITrack = 0;
482 fpStep = 0;
483 }
484}
const G4Step * GetStep() const

References FatalErrorInArgument, fpITrack, fpStep, fpTrack, fpTrackingInfo, G4cerr, G4endl, G4Exception(), GetIT(), G4Track::GetStep(), G4Track::GetTrackID(), and G4IT::GetTrackingInfo().

Referenced by DefinePhysicalStepLength(), and Stepping().

◆ SetTrackingManager()

void G4ITStepProcessor::SetTrackingManager ( G4ITTrackingManager trackMan)
inline

Definition at line 183 of file G4ITStepProcessor.hh.

184 {
185 fpTrackingManager = trackMan;
186 }

References fpTrackingManager.

Referenced by G4Scheduler::Initialize().

◆ SetupGeneralProcessInfo()

void G4ITStepProcessor::SetupGeneralProcessInfo ( G4ParticleDefinition particle,
G4ProcessManager pm 
)
protected

Definition at line 343 of file G4ITStepProcessor.cc.

345{
346
347#ifdef debug
348 G4cout<<"G4ITStepProcessor::GetProcessNumber: is called track"<<G4endl;
349#endif
350 if(!pm)
351 {
352 G4cerr << "ERROR - G4SteppingManager::GetProcessNumber()" << G4endl<< " ProcessManager is NULL for particle = "
353 << particle->GetParticleName() << ", PDG_code = "
354 << particle->GetPDGEncoding() << G4endl;
355 G4Exception("G4SteppingManager::GetProcessNumber()", "ITStepProcessor0002",
356 FatalException, "Process Manager is not found.");
357 return;
358 }
359
360 std::map<const G4ParticleDefinition*, ProcessGeneralInfo*>::iterator it =
361 fProcessGeneralInfoMap.find(particle);
362 if(it != fProcessGeneralInfoMap.end())
363 {
364 G4Exception("G4SteppingManager::SetupGeneralProcessInfo()",
365 "ITStepProcessor0003",
366 FatalException, "Process info already registered.");
367 return;
368 }
369
370 // here used as temporary
372
373 // AtRestDoits
378#ifdef debug
379 G4cout << "G4ITStepProcessor::GetProcessNumber: #ofAtRest="
381#endif
382
383 // AlongStepDoits
390#ifdef debug
391 G4cout << "G4ITStepProcessor::GetProcessNumber:#ofAlongStp="
393#endif
394
395 // PostStepDoits
401#ifdef debug
402 G4cout << "G4ITStepProcessor::GetProcessNumber: #ofPostStep="
404#endif
405
406 if (SizeOfSelectedDoItVector<fpProcessInfo->MAXofAtRestLoops ||
407 SizeOfSelectedDoItVector<fpProcessInfo->MAXofAlongStepLoops ||
408 SizeOfSelectedDoItVector<fpProcessInfo->MAXofPostStepLoops )
409 {
410 G4cerr << "ERROR - G4ITStepProcessor::GetProcessNumber()" << G4endl
411 << " SizeOfSelectedDoItVector= " << SizeOfSelectedDoItVector
412 << " ; is smaller then one of MAXofAtRestLoops= "
414 << " or MAXofAlongStepLoops= " << fpProcessInfo->MAXofAlongStepLoops
415 << " or MAXofPostStepLoops= " << fpProcessInfo->MAXofPostStepLoops << G4endl;
416 G4Exception("G4ITStepProcessor::GetProcessNumber()",
417 "ITStepProcessor0004", FatalException,
418 "The array size is smaller than the actual No of processes.");
419 }
420
424 {
425 G4ExceptionDescription exceptionDescription;
426 exceptionDescription << "No DoIt process found ";
427 G4Exception("G4ITStepProcessor::DoStepping","ITStepProcessor0005",
428 FatalErrorInArgument,exceptionDescription);
429 return;
430 }
431
434 {
438
440 {
441 G4ExceptionDescription exceptionDescription;
442 exceptionDescription << "No transportation process found ";
443 G4Exception("G4ITStepProcessor::SetupGeneralProcessInfo",
444 "ITStepProcessor0006",
445 FatalErrorInArgument,exceptionDescription);
446 }
447 }
449 // fpProcessInfo = 0;
450}
static const size_t SizeOfSelectedDoItVector
@ typeGPIL
@ typeDoIt
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const

References G4ProcessVector::entries(), FatalErrorInArgument, FatalException, ProcessGeneralInfo::fpAlongStepDoItVector, ProcessGeneralInfo::fpAlongStepGetPhysIntVector, ProcessGeneralInfo::fpAtRestDoItVector, ProcessGeneralInfo::fpAtRestGetPhysIntVector, ProcessGeneralInfo::fpPostStepDoItVector, ProcessGeneralInfo::fpPostStepGetPhysIntVector, fpProcessInfo, fProcessGeneralInfoMap, ProcessGeneralInfo::fpTransportation, G4cerr, G4cout, G4endl, G4Exception(), G4ProcessManager::GetAlongStepProcessVector(), G4ProcessManager::GetAtRestProcessVector(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGEncoding(), G4ProcessManager::GetPostStepProcessVector(), ProcessGeneralInfo::MAXofAlongStepLoops, ProcessGeneralInfo::MAXofAtRestLoops, ProcessGeneralInfo::MAXofPostStepLoops, SizeOfSelectedDoItVector, typeDoIt, and typeGPIL.

Referenced by GetProcessInfo().

◆ SetupMembers()

void G4ITStepProcessor::SetupMembers ( )
protected

◆ Stepping()

void G4ITStepProcessor::Stepping ( G4Track track,
const double &  timeStep 
)

Definition at line 264 of file G4ITStepProcessor2.cc.

265{
266
267#ifdef DEBUG_MEM
268 MemStat mem_first, mem_second, mem_diff;
269#endif
270
271#ifdef DEBUG_MEM
272 mem_first = MemoryUsage();
273#endif
274
276
277#ifdef DEBUG_MEM
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;
281#endif
282
283 if(track == 0) return; // maybe put an exception here
284 fTimeStep = timeStep;
285 SetTrack(track);
286 DoStepping();
287}

References CleanProcessor(), DoStepping(), fTimeStep, G4cout, G4endl, G4Track::GetTrackID(), G4MemStat::MemoryUsage(), and SetTrack().

Referenced by DoIt().

Friends And Related Function Documentation

◆ G4Scheduler

friend class G4Scheduler
friend

Definition at line 155 of file G4ITStepProcessor.hh.

Field Documentation

◆ fAtRestDoItProcTriggered

size_t G4ITStepProcessor::fAtRestDoItProcTriggered
private

Definition at line 377 of file G4ITStepProcessor.hh.

Referenced by CleanProcessor(), GetAtRestDoItProcTriggered(), and GetAtRestIL().

◆ fCondition

G4ForceCondition G4ITStepProcessor::fCondition
private

◆ fGPILSelection

G4GPILSelection G4ITStepProcessor::fGPILSelection
private

◆ fILTimeStep

G4double G4ITStepProcessor::fILTimeStep
private

◆ fInitialized

G4bool G4ITStepProcessor::fInitialized
private

Definition at line 339 of file G4ITStepProcessor.hh.

Referenced by ForceReInitialization(), G4ITStepProcessor(), and Initialize().

◆ fLeadingTracks

G4ITLeadingTracks G4ITStepProcessor::fLeadingTracks
private

◆ fN2ndariesAlongStepDoIt

G4int G4ITStepProcessor::fN2ndariesAlongStepDoIt
private

◆ fN2ndariesAtRestDoIt

G4int G4ITStepProcessor::fN2ndariesAtRestDoIt
private

◆ fN2ndariesPostStepDoIt

G4int G4ITStepProcessor::fN2ndariesPostStepDoIt
private

Definition at line 372 of file G4ITStepProcessor.hh.

Referenced by GetN2ndariesPostStepDoIt(), InvokePSDIP(), and ResetSecondaries().

◆ fpCurrentProcess

G4VITProcess* G4ITStepProcessor::fpCurrentProcess
private

◆ fpCurrentVolume

G4VPhysicalVolume* G4ITStepProcessor::fpCurrentVolume
private

◆ fPhysIntLength

G4double G4ITStepProcessor::fPhysIntLength
private

◆ fpITrack

G4IT* G4ITStepProcessor::fpITrack
private

◆ fpNavigator

G4ITNavigator* G4ITStepProcessor::fpNavigator
private

◆ fPostStepAtTimeDoItProcTriggered

size_t G4ITStepProcessor::fPostStepAtTimeDoItProcTriggered
private

◆ fPostStepDoItProcTriggered

size_t G4ITStepProcessor::fPostStepDoItProcTriggered
private

◆ fpParticleChange

G4VParticleChange* G4ITStepProcessor::fpParticleChange
private

◆ fpPostStepPoint

G4StepPoint* G4ITStepProcessor::fpPostStepPoint
private

Definition at line 422 of file G4ITStepProcessor.hh.

Referenced by CalculateSafety(), CleanProcessor(), DoStepping(), and SetupMembers().

◆ fpPreStepPoint

G4StepPoint* G4ITStepProcessor::fpPreStepPoint
private

Definition at line 421 of file G4ITStepProcessor.hh.

Referenced by ApplyProductionCut(), CleanProcessor(), and SetupMembers().

◆ fpProcessInfo

ProcessGeneralInfo* G4ITStepProcessor::fpProcessInfo
private

◆ fPreviousTimeStep

G4double G4ITStepProcessor::fPreviousTimeStep
private

Definition at line 361 of file G4ITStepProcessor.hh.

Referenced by G4ITStepProcessor(), and SetPreviousStepTime().

◆ fProcessGeneralInfoMap

std::map<const G4ParticleDefinition*, ProcessGeneralInfo*> G4ITStepProcessor::fProcessGeneralInfoMap
private

Definition at line 405 of file G4ITStepProcessor.hh.

Referenced by ClearProcessInfo(), GetProcessInfo(), and SetupGeneralProcessInfo().

◆ fpSecondary

G4TrackVector* G4ITStepProcessor::fpSecondary
private

◆ fpState

G4ITStepProcessorState* G4ITStepProcessor::fpState
private

◆ fpStep

G4Step* G4ITStepProcessor::fpStep
private

◆ fpTrack

G4Track* G4ITStepProcessor::fpTrack
private

◆ fpTrackContainer

G4ITTrackHolder* G4ITStepProcessor::fpTrackContainer
private

◆ fpTrackingInfo

G4TrackingInformation* G4ITStepProcessor::fpTrackingInfo
private

◆ fpTrackingManager

G4ITTrackingManager* G4ITStepProcessor::fpTrackingManager
private

◆ fpTransportation

G4ITTransportation* G4ITStepProcessor::fpTransportation
private

◆ fpVerbose

G4VITSteppingVerbose* G4ITStepProcessor::fpVerbose
private

◆ fStoreTrajectory

G4int G4ITStepProcessor::fStoreTrajectory
private

Definition at line 347 of file G4ITStepProcessor.hh.

Referenced by G4ITStepProcessor().

◆ fTimeStep

G4double G4ITStepProcessor::fTimeStep
private

◆ kCarTolerance

G4double G4ITStepProcessor::kCarTolerance
private

Definition at line 343 of file G4ITStepProcessor.hh.

Referenced by CalculateSafety(), DoStepping(), G4ITStepProcessor(), and Initialize().


The documentation for this class was generated from the following files: