Exercises - Day 3 (May 23rd)

Content:
Introduction
Exercises
Part I
Part II
Part III

Solutions:
Part I
Part II
Part III

Web:
SW references

Manual:
Appl. Dev. Man

Presentations:
Slides

Main:
Main

Introduction

Today's exercises cover the following items:

The Geant4 application example, which is presented on the main page, serves again as the basis of the exercises. Do not use the example with your modifications from yesterday, but download again the original tar-ball (you may find the instructions below).
The exercises of today include the modification and/or extension of the following classes:

Exercises

Please note, that some exercises rely on the successful completion of previous exercises, i.e. previously introduced functionalities might be used at a later stage. These mandatory exercises are marked with a star next to the exercise number (*). If you don't manage to complete them by your own, try to understand the provided solutions and introduce the requested functionalites into your example.

Part I - Introductionary exercises

Exercise 3-1

Part II - Electromagnetic physics

Exercise 3-2*
You can find
here the header file for a new physics constructor class (PhysicsEMElectronEEDL), which should construct electromagnetic (EM) processes of electrons. Implement the method ConstructProcess (in a new file PhysicsEMElectronEEDL.cc), in order that it instantiates the classes representing:

As the next step, assign the process objects to the process manager. Note:

Exercise 3-3
Integrate the physics constructor class of the previous exercise into the example application: A user should be able to activate via a macro command the EM physics for electrons defined in PhysicsEMElectronEEDL as an alternative option to the penelope physics (PhysicsEMElectronPenelope):

Exercise 3-4
The physics constructor class PhysicsEMHadronIonLowEnergy instantiates electromagnetic physics processes for charged hadrons and ions. The included processes are:

The class G4hLowEnergyIonisation allows for the possibility of activating optional electron stopping power models for protons and alpha particles based on different parametrisations. Retrieve the names of these models from the Geant4 physics reference manual: The two last models in the table are the default ones for protons and alpha particles, respectively. In the the PhysicsEMHadronIonLowEnergy class of the example application try to set an optional model for each by using the according public member function of G4hLowEnergyIonisation. Retrieve the class method in the Geant4 application developers manual:

Part III - Hadronic and Muon Physics

Exercise 3-5
The processes to describe inelastic interactions of protons and neutrons are included in the G4VPhysicsConstructor class called PhysicsHIProtonNeutron.cc.
Inelastic interactions of protons are described by the Binary Cascade model (G4BinaryCascade) between 0 and 10 GeV.
For this exercise:

Exercise 3-6
During the simulation (e.g. when primaries are high-energy protons or neutrons) you may produce secondary pions (or you may take pions as primaries). For pions the decay process is active, so they may decay and produce muons. In the physics list provided in the example, muons are defined as particles, but no processes are registered for them. It means that they would be tracked by Geant4 without undergoing any interaction.
The purpose of this exercise is to create a new physics constructor class (as done for exercise 3-2) which implements electromagnetic processes for muons in its ConstructProcess() method. The header file for this class is
here.
The processes to be registered to the muon ProcessManager are: G4MuMultipleScattering, G4MuIonisation, G4MuBremsstrahlung and G4MuPairProduction. The first three processes (multiple scattering, ionisation and bremsstrahlung) have AlongStep() and PostStep() action, while muon pair production has only PostStep() (namely it is a discrete process). Notice: you have to take into account both negative and positive muons (G4MuonMinus and G4MuonPlus).
Important notice: Don't forget to integrate the physics constructor class of the previous exercise into the full example application. The physics constructor should be registered in the general physics list when the user gives a proper messenger command.