4 #include "G4ParticleTable.hh" 5 #include "Randomize.hh" 6 #include "G4NeutronElasticXS.hh" 8 #include "G4TrackStatus.hh" 9 #include "G4Element.hh" 11 using namespace CLHEP;
14 AddDataSet(
new G4NeutronElasticXS());
21 return (aParticleType.GetParticleType() ==
"rhadron");
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();
G4ParticleChange * fPartChange
~DummyChargeFlipProcess() override
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
DummyChargeFlipProcess(const G4String &processName="Dummy")
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override