26 const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
28 G4double ParentEnergy = aParticle->GetTotalEnergy();
29 const G4ThreeVector& ParentDirection(aParticle->GetMomentumDirection());
31 G4double energyDeposit = 0.0;
32 G4double finalGlobalTime = aTrack.GetGlobalTime();
34 G4int numberOfSecondaries = 1;
35 fPartChange->SetNumberOfSecondaries(numberOfSecondaries);
36 const G4TouchableHandle& thand = aTrack.GetTouchableHandle();
41 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
42 float randomParticle = G4UniformRand();
43 G4ParticleDefinition* newType;
44 if (randomParticle < 0.333)
45 newType = particleTable->FindParticle(1009213);
46 else if (randomParticle > 0.667)
47 newType = particleTable->FindParticle(-1009213);
49 newType = particleTable->FindParticle(1009113);
53 G4DynamicParticle* newP =
new G4DynamicParticle(newType, ParentDirection, ParentEnergy);
54 G4Track* secondary =
new G4Track(newP, finalGlobalTime, aTrack.GetPosition());
56 secondary->SetGoodForTrackingFlag();
57 secondary->SetTouchableHandle(thand);
63 fPartChange->ProposeLocalEnergyDeposit(energyDeposit);
66 ClearNumberOfInteractionLengthLeft();