Hands-on
Code for download: session2_start.tar.gz
Workspace clean-up
Before unpacking the downloaded tar file check if your work space contains any old files or directories (from the past year session). If this is the case, remove these files and directories first.
Or, you can create an extra directory, e.g. project, move downloaded tar file here and then work in this directory.
cd $HOME
mkdir project
mv ~/Downloads/session2_start.tar.gz project
cd project
tar xzvf session2_start.tar.gz
mv session2_start exampleEDUpdate login script:
To get the environment setup called automatically when a new terminal is open, you can add the commands for this setting in your login script, for example in $HOME/.bash_profile file if bash is your default shell. Open this file in your editor and add the following lines:
# Geant4 environment
source /nfsapp/physics/geant4.bash -nHands-on 2a:
The picture shows geometry which will be implemented in this session.
-
Inspect the code of the geometry already implemented and modify materials to correspond to the geometry description below. The code already present describes the geometry of the first arm detector.
- Identify the code used for printing all materials.
-
Add following materials (using NIST manager):
- Argon gas (
G4_Ar), CsI (G4_CESIUM_IODIDE) and Copper (G4_Cu) - and update the materials in the First Arm detector according to the geometry description below
- Argon gas (
-
Implement the geometry of the EM calorimeter in the second arm described below.
- Get inspired by the code already present
- Proceed step by step. After adding each piece of geometry (solid, logical volume and its placement(s)), recompile and test your application with visualization.
- Note that the Second Arm detector has similar components as the First Arm detector but not same.
-
Check your geometry with the geometry scene tree browser
Geometry to be implemented:
-
Extend Second arm detector with:
- EM calorimeter (in yellow colour)
- of a box shape with
hx=1.5*m, hy=30.*cm, hz=15.*cm - of
CsImaterial - placed at
2*min z-direction from the center of its parent volume (Second Arm Detector).
- of a box shape with
- Fill the EM calorimeter with
15*cmlayers along x-direction of the same material (CsI)
- EM calorimeter (in yellow colour)
Geometry already implemented, to be updated:
- Material
Airdefined using NIST manager (the remaining materials have to be added and assigned to the volumes ) - World volume
- represented as a box of
hx=10.*m, hy=3.*m, hz=10.*m - of
Airmaterial
- represented as a box of
- Tube volume
- of a tube shape with
rmin = 0.*m, rmax=1.*m, hz=1.*m - of
Airmaterial
- of a tube shape with
- First arm detector:
- represented as a box of
hx=1.5*m, hy=1.0*m, hz=3.0*m - of
Airmaterial - placed in
-5.*min z-direction (in front ofTube(in blue colour).) - including:
- 5 Drift chambers (in green colour)
- of a box shape with
hx=1.*m, hy=30.*cm, hz=1.*cm - of
Airmaterial to be changed toArgon gas - placed along z-axis with a distance of
0.5*mfrom each other with the middle one in the center of the parent volume
- of a box shape with
- Wire plane
- of a box shape with
hx=1.*m, hy=30.*cm, hz=0.1*mm - of
Airmaterial to be changed toCopper - placed inside each drift chamber in its center.
- of a box shape with
- 5 Drift chambers (in green colour)
- represented as a box of
- Second arm detector
- represented as a box of
hx=1.5*m, hy=1.*m, hz=3.*m - of
Airmaterial - placed in
5.*min z-direction (behindTube(in blue colour)). - Including:
- 5 Drift chambers (in green colour)
- of a box shape with
hx=1.5*m, hy=30.*cm, hz=1.*cm - of
Airmaterial to be changed toArgon gasmaterial - placed along z-axis with a distance of
0.5*mfrom each other with the middle one in the center of the parent volume.
- of a box shape with
- Wire plane
- of a box shape with
hx=1.5*m, hy=30.*cm, hz=0.1*mm - of
Airmaterial to be changed toCoppermaterial - placed inside each drift chamber in its center
- of a box shape with
- 5 Drift chambers (in green colour)
- represented as a box of
Hands-on 2b:
-
Explore provided macros
init_vis.macandrun.mac. Run the applicationexampleEDin batch mode (using a provided macro). -
Explore implemented geometry:
- Add visualization attributes for added volumes in vis.mac macro file
- Tips : First change the color with the scene tree browser and look in the output for the command name
- Add axes on your scene to check your geometry (use Qt User Interface Help widget)
- Add visualization attributes for added volumes in vis.mac macro file