Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
Line 131: | Line 131: | ||
- | <span style="color:#800000"> class MyPhysicsList:public G4VUserPhysicsList() </span> | + | <span style="color:#800000"> class MyPhysicsList : public G4VUserPhysicsList() { </span> |
- | <span style="color:#800000"> | + | <span style="color:#800000"> public: </span> |
<span style="color:#800000"> MyPhysicsList(); </span> | <span style="color:#800000"> MyPhysicsList(); </span> | ||
Line 149: | Line 149: | ||
- | <span style="color:#800000"> void MyPhysicsList :: ConstructParticle() </span> | + | <span style="color:#800000"> void MyPhysicsList :: ConstructParticle() { </span> |
- | <span style="color:#800000"> | + | <span style="color:#800000"> //Define the particles </span> |
<span style="color:#800000"> G4Electron::ElectronDefinition(); </span> | <span style="color:#800000"> G4Electron::ElectronDefinition(); </span> | ||
Line 185: | Line 185: | ||
<span style="color:#800000"> AddTransportation(); </span> | <span style="color:#800000"> AddTransportation(); </span> | ||
+ | |||
<span style="color:#800000"> // Electromagnetic processes </span> | <span style="color:#800000"> // Electromagnetic processes </span> | ||
<span style="color:#800000"> ConstructEM(); </span> | <span style="color:#800000"> ConstructEM(); </span> | ||
+ | |||
<span style="color:#800000"> // Other processes </span> | <span style="color:#800000"> // Other processes </span> | ||
Line 239: | Line 241: | ||
- | + | In methods ConstructEM() and ConstructGeneral() to each particle you have to assign the corresponding physics processes they are involved in. This is a link to the physics processes available for each particles [http://geant4.cern.ch/support/proc_mod_catalog/particles/ Physics Process for Particles]. | |
+ | |||
+ | |||
+ | Finally, method SetCuts() is defined as: | ||