Main Page
From UCL HEP PBT Wiki
m |
m |
||
Line 22: | Line 22: | ||
GEANT4 is a toolkit for simulating the passage of particles through matter. The user creates his/her own simulation application using GEANT4 tools. The tools are base classes. There are eight base classes: | GEANT4 is a toolkit for simulating the passage of particles through matter. The user creates his/her own simulation application using GEANT4 tools. The tools are base classes. There are eight base classes: | ||
- | * Three classes are mandatory | + | * Three classes are mandatory |
; G4VUserDetectorConstruction | ; G4VUserDetectorConstruction | ||
Line 31: | Line 31: | ||
: Describe particle source, source dimensions, initial position, energy spectrum, angular distributions | : Describe particle source, source dimensions, initial position, energy spectrum, angular distributions | ||
- | * The rest are optional | + | * The rest are optional |
; G4UserRunAction | ; G4UserRunAction | ||
Line 57: | Line 57: | ||
* Setting up the environment | * Setting up the environment | ||
- | + | ; 1. Connect to plus1 cluster and create a folder PhotonPencilBeam in your local area | |
<blockquote> | <blockquote> | ||
- | <span style="color:# | + | <span style="color:#800000"> ssh username@plus1.hep.ucl.ac.uk </span> |
- | <span style="color:# | + | <span style="color:#800000"> mkdir PhotonPencilBeam </span> |
- | <span style="color:# | + | <span style="color:#800000"> cd PhotonPencilBeam </span> |
</blockquote> | </blockquote> | ||
- | + | ; 2. Setup GEANT4 environment | |
<blockquote> | <blockquote> | ||
- | <span style="color:# | + | <span style="color:#800000"> source ... (GEANT4 script) </span> |
</blockquote> | </blockquote> | ||
* How to get the code | * How to get the code | ||
- | + | ; Copy the code to your area | |
<blockquote> | <blockquote> | ||
- | <span style="color:# | + | <span style="color:#800000"> cp /vasileva/BasicExamples/PhotonPencilBeam_source /username/PhotonPencilBeam/ </span> |
</blockquote> | </blockquote> | ||
* How to run the code | * How to run the code | ||
- | + | ; 1. Inside /username/PhotonPencilBeam/ create a folder: | |
<blockquote> | <blockquote> | ||
- | <span style="color:# | + | <span style="color:#800000"> mkdir PhotonPencilBeam_build </span> |
</blockquote> | </blockquote> | ||
- | + | ; 2. Change to this directory and run cmake and make to build the PhotonPencilBeam example: | |
<blockquote> | <blockquote> | ||
- | <span style="color:# | + | <span style="color:#800000"> cd PhotonPencilBeam_build </span> |
- | <span style="color:# | + | <span style="color:#800000"> cmake -DGeant4_DIR=/unix/pbt/Software/..../ /username/PhotonPencilBeam_source/ </span> |
- | <span style="color:# | + | <span style="color:#800000"> make </span> |
</blockquote> | </blockquote> | ||