Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
Line 115: | Line 115: | ||
=== <span style="color:#000080"> Simple physics lists </span> === | === <span style="color:#000080"> Simple physics lists </span> === | ||
- | <span style="color:#ff0000"> G4VUserPhysicsList </span> is used for simple physics lists. It has three methods: | + | The class <span style="color:#ff0000"> G4VUserPhysicsList </span> is used for simple physics lists. It has three methods: |
+ | |||
* ConstructParticles(): define all necessary particles; | * ConstructParticles(): define all necessary particles; | ||
Line 121: | Line 122: | ||
* SetCuts(): define production thresholds in terms of range; | * SetCuts(): define production thresholds in terms of range; | ||
- | |||
- | # | + | This example shows how to define your own class derived from the <span style="color:#ff0000"> G4VUserPhysicsList </span> base class. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | |||
<span style="color:#800000"> class MyPhysicsList:public G4VUserPhysicsList() </span> | <span style="color:#800000"> class MyPhysicsList:public G4VUserPhysicsList() </span> | ||
Line 167: | Line 158: | ||
<span style="color:#800000"> G4Gamma::GammaDefinition(); ... } </span> | <span style="color:#800000"> G4Gamma::GammaDefinition(); ... } </span> | ||
+ | |||
+ | GEANT4 provides a variety of physics processes. These processes are decoupled from one another and the user can select those processes which are relevant to his/her simulation. There are seven categories of processes provided by GEANT4: | ||
+ | |||
+ | # electromagnetic | ||
+ | #* standard | ||
+ | #* low Energy (Livermore Library / Penelope) | ||
+ | # hadronic | ||
+ | # decay | ||
+ | # photolepton-hadron | ||
+ | # optical | ||
+ | # parameterization - "fast simulation" physics | ||
+ | # transportation | ||
+ | |||
+ | |||
+ | In method ConstructProcess() you have to define your physics processes: | ||
+ | |||
<span style="color:#800000"> void MyPhysicsList :: ConstructProcess() </span> | <span style="color:#800000"> void MyPhysicsList :: ConstructProcess() </span> | ||
Line 183: | Line 190: | ||
- | where the method ConstructEM() | + | where the method ConstructEM() is defined as: |
Line 202: | Line 209: | ||
<span style="color:#800000"> pmanager->AddDiscreteProcess(new G4GammaConversion); ...} </span> | <span style="color:#800000"> pmanager->AddDiscreteProcess(new G4GammaConversion); ...} </span> | ||
+ | |||
+ | and the method ConstructGeneral() is defined as: | ||
+ | |||
+ | |||
+ | |||
+ | <span style="color:#800000"> void MyPhysicsList::ConstructGeneral() </span> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
The method SetCuts() is defined as: | The method SetCuts() is defined as: | ||
Line 218: | Line 236: | ||
=== <span style="color:#000080"> Detailed physics lists </span> === | === <span style="color:#000080"> Detailed physics lists </span> === | ||
+ | |||