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 Physics// DNA processes per particle typeif (particleName == "e-") {G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");theDNAElasticProcess->SetModel(new G4DNAChampionElasticModel());// or alternative model// theDNAElasticProcess->SetModel(new G4DNAScreenedRuther<strong>for</strong>dElasticModel());pmanager->AddDiscreteProcess(theDNAElasticProcess);pmanager->AddDiscreteProcess(new G4DNAExcitation("e-_G4DNAExcitation"));pmanager->AddDiscreteProcess(new G4DNAIonisation("e-_G4DNAIonisation"));} else if ( particleName == "proton" ) {pmanager->AddDiscreteProcess(new G4DNAExcitation("proton_G4DNAExcitation"));pmanager->AddDiscreteProcess(new G4DNAIonisation("proton_G4DNAIonisation"));pmanager->AddDiscreteProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"));} else if ( particleName == "hydrogen" ) {pmanager->AddDiscreteProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"));pmanager->AddDiscreteProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"));} else if ( particleName == "alpha" ) {pmanager->AddDiscreteProcess(new G4DNAExcitation("alpha_G4DNAExcitation"));pmanager->AddDiscreteProcess(new G4DNAIonisation("alpha_G4DNAIonisation"));pmanager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"));} else if ( particleName == "alpha+" ) {pmanager->AddDiscreteProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"));pmanager->AddDiscreteProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"));pmanager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"));pmanager->AddDiscreteProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"));} else if ( particleName == "helium" ) {}pmanager->AddDiscreteProcess(new G4DNAExcitation("helium_G4DNAExcitation"));pmanager->AddDiscreteProcess(new G4DNAIonisation("helium_G4DNAIonisation"));pmanager->AddDiscreteProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"));}} // Loop on particles//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....Note that in the above example, "alpha" particles are helium atoms ionised twice and "helium" particles are neutralhelium atoms. The definition of particles in the physics list may be <strong>for</strong> example implemented as follows ://....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......#include "G4DNAGenericIonsManager.hh"void PhysicsList::ConstructBaryons(){// construct baryons ---// <strong>Geant4</strong> DNA particlesG4GenericIon::GenericIonDefinition() ;G4DNAGenericIonsManager * genericIonsManager;genericIonsManager=G4DNAGenericIonsManager::Instance();genericIonsManager->GetIon("alpha++");genericIonsManager->GetIon("alpha+");genericIonsManager->GetIon("helium");genericIonsManager->GetIon("hydrogen");}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......To run the <strong>Geant4</strong>-DNA extension, data files need to be copied by the user to his/her code repository. These filesare distributed together with the <strong>Geant4</strong> release. The user should set the environment variable G4LEDATA to thedirectory where he/she has copied the files.157

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

Saved successfully!

Ooh no, something went wrong!