Introduction to GEANT4

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
Line 116: Line 116:
-
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 exists also pre-packaged physics list.
+
There are two base physics list classes: <span style="color:#ff0000"> G4VUserPhysicsList </span> and <span style="color:#ff0000"> G4ModularPhysicsList </span>.
Line 122: Line 122:
-
You can use the class <span style="color:#ff0000"> G4VUserPhysicsList </span> if you want to use simple physics lists. <span style="color:#ff0000"> G4VUserPhysicsList </span> has three methods:
+
You can use the class <span style="color:#ff0000"> G4VUserPhysicsList </span> if you want simple physics lists. <span style="color:#ff0000"> G4VUserPhysicsList </span> has three methods:
* ConstructParticles(): define all necessary particles;   
* ConstructParticles(): define all necessary particles;   
Line 129: Line 129:
-
Simple example of <span style="color:#ff0000"> MyPhysicsList </span> derived from <span style="color:#ff0000"> G4VUserPhysicsList </span>:
+
<u> Simple example of <span style="color:#ff0000"> MyPhysicsList </span> derived from <span style="color:#ff0000"> G4VUserPhysicsList </span> <u>:  
Line 165: Line 165:
-
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:
+
GEANT4 provides a variety of physics processes. These processes are decoupled from one another and you can select those which are relevant to your simulation. The processes are grouped in seven categories and their full list is available here [http://geant4.cern.ch/support/proc_mod_catalog/processes/ Processes]:
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
Line 198: Line 198:
-
where the method ConstructEM() is defined as:  
+
In methods ConstructEM() and ConstructGeneral() you assign the physics processes to the corresponding particles:  
Line 217: Line 217:
<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>
<span style="color:#800000"> void MyPhysicsList::ConstructGeneral() </span>
Line 242: Line 239:
-
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].     
+
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].     
Line 261: Line 258:
=== <span style="color:#000080"> Detailed physics lists </span> ===  
=== <span style="color:#000080"> Detailed physics lists </span> ===  
-
A realistic physics list has a lot of different physics processes. Therefore it is better to define a new class <span style="color:#ff0000"> G4VModularPhysicsList </span> derived from <span style="color:#ff0000"> G4VUserPhysicsList </span> where you can group the physics processes into EM physics, hadronic physics, optical physics etc. The method AddTransportation() is called automatically for all particles. Simple example of <span style="color:#ff0000"> G4VModularPhysicsList </span>:
+
A realistic physics list has a lot of different physics processes. For example, the photon from the above example can undergo compton scattering apart from conversion. In this case we use <span style="color:#ff0000"> G4VModularPhysicsList </span> which is derived from <span style="color:#ff0000"> G4VUserPhysicsList </span>. In <span style="color:#ff0000"> G4VModularPhysicsList </span> you can group the physics processes into EM physics, hadronic physics, optical physics groups etc.  
 +
 
 +
 
 +
<u> Simple example of <span style="color:#ff0000"> G4VModularPhysicsList </span> <u>:

Revision as of 14:44, 7 July 2014

Personal tools