Part I - Introductory Exercises
Exercise 3-1
Get familiar with the classes of the example application, which are subject of
the exercises: PhysicsList and various concrete physics constructor classes: Also try to understand the class hierarchies (abstract base class, concrete user implementation) of the relevant classes.
The following diagrams shows the class hierarchies for the physics list and various physics constructors (click here for a files: A, B, C):
Answer following questions:
- What are the base classes of the following user classes?
- PhysicsList G4VModularPhysicsList
- PhysicsListMessenger G4UImessenger
- PhysicsEMElectronPenelope G4VPhysicsConstructor
- Which classes must be implemented in the user physics constructors? ConstructParticle() and ConstructProcess()
- Which physics processes are instantiated in the following electromagnetic physics constructors?
- PhysicsEMElectronPenelope
- G4MultipleScattering: multiple scattering
- G4PenelopeIonisation: ionisation (Penelope)
- G4PenelopeBremsstrahlung: Bremsstrahlung (Penelope)
- G4StepLimiter: step limitation
- PhysicsEMPhotonEPDL
- G4LowEnergyPhotoElectric: photo-electric effect
- G4LowEnergyCompton: compton scattering
- G4LowEnergyGammaConversion: gamma conversion
- G4LowEnergyRayleigh: rayleigh scattering
- G4StepLimiter: step limitation
- Which physics processes and models are instantiated in the following hadronic physics constructors? Also specify the energy values limiting the applicability of the models, if explicitly set in the physics constructor (if they are not set default values are assumed):
- PhysicsHEHadronIonLElastic
- Proton, Pion plus, Pion minus, Deuteron, Triton, Alpha, He3, Generic Ion:
Process: G4HadronElasticProcess
Model: G4LElastic
- Neutron:
Process: G4HadronElasticProcess
Models: G4LElastic (>19.8 MeV), G4NeutronHPElastic (default is: 0 < E < 20 MeV)
- PhysicsHIProtonNeutron
- Proton:
Process: G4ProtonInelasticProcess
Model: G4BinaryCascade (0 < E < 10 GeV)
- Neutron:
Process (I): G4NeutronInelasticProcess
Models (I): G4BinaryCascade (19.8 MeV < E < 10 GeV), G4NeutronHPInelastic (default is: 0 < E < 20 MeV)
Process (II): G4HadronCaptureProcess
Models (II): G4LCapture (19.8 MeV < E < 100 TeV), G4NeutronHPCapture (default is: 0 < E < 20 MeV)
Process (III): G4HadronFissionProcess
Models (III): G4LFission (19.8 MeV < E < 100 TeV), G4NeutronHPFission (default is: 0 < E < 20 MeV)
- Which commands are defined in the physics list messenger (class PhysicsListMessenger)? Specify the command names and the purpose of the commands.
- /physics/physConstructor: Activating physics constructors, i.e. invoking the instantiation of physics constructors.
- /physics/prodThreshold: Setting the production threshold for the generation of secondary electrons, positrons and gammas.
Exercise 3-2
Based on the provided macro file electronbeam.mac try to create a new macro file (protonbeam.mac) for a primary proton beam, which contains the following physics setup:
- electromagnetic physics for charged hadrons and ions: low energy models
- electromagnetic physics for electrons: penelope models
- electromagnetic physics for photons: penelope models
- electromagnetic physics for positrons: standard models
- elastic hadronic physics for hadrons and ions: LElastic model
- inelastic hadronic physics for protons and neutrons: binary model
- inelastic hadronic physics for ions: binary model
For each of above physics components a physics constructor is already implemented. Use the PhysicsList class to determine the parameters of the command
/physics/physConstructor
which activate the various constructors listed above. Furthermore, adapt the beam parameters according to the following values:
- primary beam energy of 50 MeV,
- sigma equals to 300 keV
- incident angle of 45 degree
Run the Geant4 application example using the new macro file for protons.
Once your macro file is completed and the application runs successfully, try to to add the visualization functionality as shown in the macro electronbeam_vis.mac to your proton macro file. Add a line setting the color of proton tracks to yellow. Rerun the application with the modified macro file.
The required physics constructors are instantiated by including the following commands in the macro file:
# electromagnetic physics for charged hadrons and ions: low energy models
/physics/physConstructor EM-HadronIon-LowEnergy
#
# electromagnetic physics for electrons: penelope models
/physics/physConstructor EM-Electron-Penelope
#
# electromagnetic physics for positrons: standard models
/physics/physConstructor EM-Photon-Penelope
#
# electromagnetic physics for positrons: standard models
/physics/physConstructor EM-Positron-Standard
#
# elastic hadronic physics for hadrons and ions: LElastic model
/physics/physConstructor HE-HadronIon-LElastic
#
# inelastic hadronic physics for protons and neutrons: binary model
/physics/physConstructor HI-ProtonNeutron-Inelastic
#
# inelastic hadronic physics for ions: binary model
/physics/physConstructor HI-Ion-Binary
The beam parameters should be set to the following values:
/source/primParticle proton
/source/primEnergy 50.000 MeV
/source/sigmaEnergy 300.0 keV
/source/incidentAngle 45.0 deg
The visualization of tracks, required in the last part of the exercise, is activated by using the commands
/vis/scene/create
/vis/open OGLIX
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 120 20
#
#
# Many other options available with /vis/modeling and /vis/filtering.
/vis/modeling/trajectories/create/drawByParticleID
/vis/modeling/trajectories/drawByParticleID-0/set e- red
/vis/modeling/trajectories/drawByParticleID-0/set gamma green
/vis/modeling/trajectories/drawByParticleID-0/set proton yellow
/vis/scene/endOfEventAction accumulate
and after the initialization:
/tracking/storeTrajectory 1
The macro files can be found here:
protonbeam.mac
protonbeam_vis.mac