///////////////////////////////////////////////////////////////////////// // G4Tutorial: // // PhysicsEMHadronIonLowEnergy.cc // // Assembling electromagnetic physics processes for: // ions charged hadrons // // The considered processes are G4MultipleScattering, G4hLowEnergyIonisation // ///////////////////////////////////////////////////////////////////////// #include "PhysicsEMHadronIonLowEnergy.hh" #include "G4ProcessManager.hh" #include "G4ParticleDefinition.hh" #include "G4Alpha.hh" #include "G4Proton.hh" #include "G4MultipleScattering.hh" #include "G4hLowEnergyIonisation.hh" #include "G4StepLimiter.hh" PhysicsEMHadronIonLowEnergy::PhysicsEMHadronIonLowEnergy(const G4String& name): G4VPhysicsConstructor(name) { G4cout<< "ELECTROMAGNETIC PROCESS(ES): G4MultipleScattering (ions and charged hadrons)" << G4endl << " G4hLowEnergyIonisation (ions and charged hadrons)" << G4endl << " (applying ICRU49 stopping power parametrisations)" << G4endl; } PhysicsEMHadronIonLowEnergy::~PhysicsEMHadronIonLowEnergy() { } void PhysicsEMHadronIonLowEnergy::ConstructProcess() { G4ParticleDefinition* particle = 0; G4ProcessManager* processManager = 0; // ******************************** // *** Charged Hadrons and Ions *** // ******************************** G4MultipleScattering* hadronIonMultScatProcess = new G4MultipleScattering(); G4hLowEnergyIonisation* hadronIonIonisProcess = new G4hLowEnergyIonisation("ionization-ionhadron"); hadronIonIonisProcess -> SetElectronicStoppingPowerModel(G4Proton::Definition(),"Ziegler1977p"); hadronIonIonisProcess -> SetElectronicStoppingPowerModel(G4Alpha::Definition(),"Ziegler1977He"); G4StepLimiter* hadronIonStepLimiter = new G4StepLimiter(); theParticleIterator -> reset(); while( (*theParticleIterator)() ) { particle = theParticleIterator -> value(); G4String particleName = particle -> GetParticleName(); if (particle -> GetPDGCharge() != 0.0 && (!particle -> IsShortLived()) && particleName != "e+" && particleName != "mu+" && particleName != "e-" && particleName != "mu-" && particleName != "chargedgeantino") { processManager = particle -> GetProcessManager(); processManager -> AddProcess(hadronIonMultScatProcess, -1, 1, 1); processManager -> AddProcess(hadronIonIonisProcess, -1, 2, 2); processManager -> AddProcess(hadronIonStepLimiter, -1, -1, 3); } } }