How to compute cross sections from the transmition coefficient ( see below, PHYSICS).
It is a single box representing a layer of finite thickness of homogeneous material. Two parameters define the geometry :
The default geometry (1 cm of water) is constructed in DetectorConstruction, but the above parameters can be changed interactively via the commands defined in DetectorMessenger.
The physics list contains the standard electromagnetic processes. In order not to introduce 'artificial' constraints on the step size, the multiple scattering is not instanciated, and all processes are registered as discrete : there is no continuous energy loss.
The primary kinematic consists of a single particle starting at the edge of the box. The type of the particle and its energy are set in PrimaryGeneratorAction (1 MeV gamma), and can be changed via the G4 build-in commands of G4ParticleGun class (see the macros provided with this example).
An event is killed at the first step of the incident paticle. Either the particle has interacted or is transmitted through the layer. The cross section, also called absorption coefficient, is computed from the rate of unaltered transmitted incident particles.
The result is compared with the 'input' data, i.e. with the cross sections stored in the PhysicsTables and used by Geant4.
A set of macros defining various run conditions are provided. The processes are actived/inactived in order to survey the processes individually.
The Visualization Manager is set in the main () (see TestEm13.cc). The initialisation of the drawing is done via the commands /vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
The detector has a default view which is a longitudinal view of the box.
The tracks are drawn at the end of event, and erased at the end of run.
% TestEm13 compt.mac
% TestEm13 Idle> control/execute vis.mac .... Idle> type your commands .... Idle> exit