12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tracking and PhysicsG4Decay proposes the step length (or step time <strong>for</strong> AtRest) according to the lifetime of the particle unlessPreAssignedDecayProperTime is defined in G4DynamicParticle.The G4Decay class itself does not define decay modes of the particle. <strong>Geant4</strong> provides two ways of doing this:• using G4DecayChannel in G4DecayTable, and• using thePreAssignedDecayProducts of G4DynamicParticleThe G4Decay class calculates the PhysicalInteractionLength and boosts decay products created byG4VDecayChannel or event generators. See below <strong>for</strong> in<strong>for</strong>mation on the determination of the decay modes.An object of G4Decay can be shared by particles. Registration of the decay process to particles in the ConstructPhysicsmethod of PhysicsList (see Section 2.5.3) is shown in Example 5.2.Example 5.2. Registration of the decay process to particles in the ConstructPhysicsmethod of PhysicsList.#include "G4Decay.hh"void ExN02PhysicsList::ConstructGeneral(){// Add Decay ProcessG4Decay* theDecayProcess = new G4Decay();theParticleIterator->reset();while( (*theParticleIterator)() ){G4ParticleDefinition* particle = theParticleIterator->value();G4ProcessManager* pmanager = particle->GetProcessManager();if (theDecayProcess->IsApplicable(*particle)) {pmanager ->AddProcess(theDecayProcess);// set ordering <strong>for</strong> PostStepDoIt and AtRestDoItpmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);}}}5.2.3.2. Decay TableEach particle has its G4DecayTable, which stores in<strong>for</strong>mation on the decay modes of the particle. Each decaymode, with its branching ratio, corresponds to an object of various ``decay channel'' classes derived fromG4VDecayChannel. Default decay modes are created in the constructors of particle classes. For example, the decaytable of the neutral pion has G4PhaseSpaceDecayChannel and G4DalitzDecayChannel as follows:// create a decay channelG4VDecayChannel* mode;// pi0 -> gamma + gammamode = new G4PhaseSpaceDecayChannel("pi0",0.988,2,"gamma","gamma");table->Insert(mode);// pi0 -> gamma + e+ + e-mode = new G4DalitzDecayChannel("pi0",0.012,"e-","e+");table->Insert(mode);Decay modes and branching ratios defined in <strong>Geant4</strong> are listed in Section 5.3.2.Branching ratios and life time can be set in tracking time.// set lifetimeG4Neutron::Neutron()->SetPDGLifeTime(885.7*second);// allow neutron decayG4Neutron::Neutron()->SetPDGStable(false);Branching ratios and life time can be modified by using user commands, also.Example: Set 100% br <strong>for</strong> dalitz decay of pi0164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!