#include <FixG4CreatorProcess.h>
Definition at line 14 of file FixG4CreatorProcess.h.
◆ FixG4CreatorProcess()
| G4UA::FixG4CreatorProcess::FixG4CreatorProcess |
( |
| ) |
|
◆ UserSteppingAction()
| void G4UA::FixG4CreatorProcess::UserSteppingAction |
( |
const G4Step * | aStep | ) |
|
|
finaloverridevirtual |
Definition at line 22 of file FixG4CreatorProcess.cxx.
23 {
24
25
26
27
28
29
30 if (G4EmParameters::Instance()->GeneralProcessActive()) {
31 const G4ParticleDefinition* thePrimaryParticle = aStep->GetTrack()->GetParticleDefinition();
32 const std::size_t numThisSecondaries = aStep->GetNumberOfSecondariesInCurrentStep();
33 if (thePrimaryParticle==G4Gamma::GammaDefinition() && numThisSecondaries>0) {
34
35
36 const G4VProcess* theLimiterProcess = aStep->GetPostStepPoint()->GetProcessDefinedStep();
37
38
39
40 const G4TrackVector* theSecTrackVector = aStep->GetSecondary();
41 const std::size_t numAllSecondaries = theSecTrackVector->size();
42 for (std::size_t it = numAllSecondaries-numThisSecondaries;
it<numAllSecondaries; ++
it) {
43
44 G4Track* secTrack = (*theSecTrackVector)[
it];
45 if (secTrack->GetCreatorProcess()!=theLimiterProcess) {
46
47 secTrack->SetCreatorProcess(theLimiterProcess);
48 }
49 }
50 }
51
52 }
53 }
The documentation for this class was generated from the following files: