///////////////////////////////////////////////////////////////////////// // G4Tutorial: // // PhysicsEMPhotonPenelope.cc // // Assembling electromagnetic physics processes for photons. // // The considered processes are G4PenelopePhotoElectric, G4PenelopeCompton // G4PenelopeGammaConversion and G4PenelopeRayleigh // ///////////////////////////////////////////////////////////////////////// #include "PhysicsEMPhotonPenelope.hh" #include "G4ProcessManager.hh" #include "G4ParticleDefinition.hh" #include "G4Gamma.hh" #include "G4PenelopeCompton.hh" #include "G4PenelopeGammaConversion.hh" #include "G4PenelopePhotoElectric.hh" #include "G4PenelopeRayleigh.hh" #include "G4StepLimiter.hh" PhysicsEMPhotonPenelope::PhysicsEMPhotonPenelope(const G4String& name): G4VPhysicsConstructor(name) { // Information about physics processes is printed: G4cout << "ELECTROMAGNETIC PROCESS(ES): G4PenelopePhotoElectric (photon)" << G4endl << " G4PenelopeCompton (photon)" << G4endl << " G4PenelopeGammaConversion (photon)" << G4endl << " G4PenelopeRayleigh (photon)" << G4endl << "APPLIED MODEL(S): -" << G4endl; } PhysicsEMPhotonPenelope::~PhysicsEMPhotonPenelope() { } void PhysicsEMPhotonPenelope::ConstructProcess() { // ************** // *** Photon *** // ************** // The considered physics processes are instantiated: G4PenelopePhotoElectric* photPhotoElectricProcess = new G4PenelopePhotoElectric(); G4PenelopeCompton* photComptonProcess = new G4PenelopeCompton(); G4PenelopeGammaConversion* photGammaConvProcess = new G4PenelopeGammaConversion(); G4PenelopeRayleigh* photRayleighProcess = new G4PenelopeRayleigh(); // The step limiter process is instantiated: G4StepLimiter* photStepLimiter = new G4StepLimiter(); // Finally, the processes are added to the particles' process manager: G4ParticleDefinition* particle = G4Gamma::Gamma(); G4ProcessManager* processManager = particle -> GetProcessManager(); processManager -> AddDiscreteProcess(photPhotoElectricProcess); processManager -> AddDiscreteProcess(photComptonProcess); processManager -> AddDiscreteProcess(photGammaConvProcess); processManager -> AddDiscreteProcess(photRayleighProcess); processManager -> AddDiscreteProcess(photStepLimiter); }