Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
| Line 81: | Line 81: | ||
| - | Your detector is always placed in a mother volume called | + | Your detector is always placed in a mother volume called the world volume. |
The world volume is defined in a similar way: | The world volume is defined in a similar way: | ||
| Line 110: | Line 110: | ||
== <span style="color:#000080"> Physics processes </span> == | == <span style="color:#000080"> Physics processes </span> == | ||
| - | + | Two kinds of base physics list classes are available for users to derive from <span style="color:#ff0000"> G4VUserPhysicsList </span> and <span style="color:#ff0000"> G4ModularPhysicsList </span>. There exist also prepackaged physics list provided by GEANT4. | |
| - | <span style="color:#ff0000"> G4VUserPhysicsList </span> is | + | === <span style="color:#000080"> Simple physics lists </span> === |
| + | |||
| + | <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 133: | Line 135: | ||
This example shows how to define your own class from the G4VUserPhysicsList base class. | This example shows how to define your own class from the G4VUserPhysicsList base class. | ||
| - | + | <span style="color:#800000"> class MyPhysicsList:public G4VUserPhysicsList() </span> | |
<span style="color:#800000"> { public: </span> | <span style="color:#800000"> { public: </span> | ||
| Line 181: | Line 183: | ||
| - | where the method | + | where the method ConstructEM() can be defined as: |
| Line 200: | Line 202: | ||
<span style="color:#800000"> pmanager->AddDiscreteProcess(new G4GammaConversion); ...} </span> | <span style="color:#800000"> pmanager->AddDiscreteProcess(new G4GammaConversion); ...} </span> | ||
| + | |||
| + | The method SetCuts() is defined as: | ||
| + | |||
<span style="color:#800000"> void MyPhysicsList :: SetCuts() </span> | <span style="color:#800000"> void MyPhysicsList :: SetCuts() </span> | ||
| Line 210: | Line 215: | ||
<span style="color:#800000"> SetCutValue(defaultCutValue, "e-"); </span> | <span style="color:#800000"> SetCutValue(defaultCutValue, "e-"); </span> | ||
| + | |||
| + | |||
| + | === <span style="color:#000080"> Detailed physics lists </span> === | ||