10 #include "G4ParticleDefinition.hh"
11 #include "G4VProcess.hh"
12 #include "G4EmParameters.hh"
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) {
36 const G4VProcess* theLimiterProcess = aStep->GetPostStepPoint()->GetProcessDefinedStep();
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) {
44 G4Track* secTrack = (*theSecTrackVector)[
it];
45 if (secTrack->GetCreatorProcess()!=theLimiterProcess) {
47 secTrack->SetCreatorProcess(theLimiterProcess);