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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tracking and PhysicsThis method returns the result of a check to see if the process is possible <strong>for</strong> a given particle.Example of how to use a hadron at rest processIncluding a ``hadron at rest'' process <strong>for</strong> a particle, a pi- <strong>for</strong> example, into the <strong>Geant4</strong> system is straight<strong>for</strong>wardand can be done in the following way:• create a process:theProcess = new G4PionMinusAbsorptionAtRest();• register the process with the particle's process manager:theParticleDef = G4PionMinus::PionMinus();G4ProcessManager* pman = theParticleDef->GetProcessManager();pman->AddRestProcess( theProcess );5.2.2.3. Hadrons in FlightWhat processes do you need?For hadrons in motion, there are four physics process classes. Table 5.1 shows each process and the particles <strong>for</strong>which it is relevant.G4HadronElasticProcessG4HadronInelasticProcessG4HadronFissionProcessG4CaptureProcesspi+, pi-, K + , K 0 S, K 0 L, K - , p, p-bar, n, n-bar, lambda,lambda-bar, Sigma + , Sigma - , Sigma + -bar, Sigma - -bar,Xi 0 , Xi - , Xi 0 -bar, Xi - -barpi+, pi-, K + , K 0 S, K 0 L, K - , p, p-bar, n, n-bar, lambda,lambda-bar, Sigma + , Sigma - , Sigma + -bar, Sigma - -bar,Xi 0 , Xi - , Xi 0 -bar, Xi - -baralln, n-barTable 5.1. Hadronic processes and relevant particles.How to register ModelsTo register an inelastic process model <strong>for</strong> a particle, a proton <strong>for</strong> example, first get the pointer to the particle'sprocess manager:G4ParticleDefinition *theProton = G4Proton::ProtonDefinition();G4ProcessManager *theProtonProcMan = theProton->GetProcessManager();Create an instance of the particle's inelastic process:G4ProtonInelasticProcess *theProtonIEProc = new G4ProtonInelasticProcess();Create an instance of the model which determines the secondaries produced in the interaction, and calculates themomenta of the particles:G4LEProtonInelastic *theProtonIE = new G4LEProtonInelastic();Register the model with the particle's inelastic process:theProtonIEProc->RegisterMe( theProtonIE );Finally, add the particle's inelastic process to the list of discrete processes:161

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

Saved successfully!

Ooh no, something went wrong!