Introduction to GEANT4

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
 
Line 152: Line 152:
* ConstructParticles() : Define all necessary particles;   
* ConstructParticles() : Define all necessary particles;   
-
* ConstructProcesses() : Define all necessary processes and assign them to proper particles;
+
* ConstructProcesses() : Define all necessary processes and assign them to corresponding particles;
* SetCuts() : Define production thresholds in terms of range;  
* SetCuts() : Define production thresholds in terms of range;  
Line 235: Line 235:
</pre>   
</pre>   
    
    
-
 
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
void MyPhysicsList::ConstructGeneral() {  
void MyPhysicsList::ConstructGeneral() {  
Line 272: Line 271:
</pre>
</pre>
-
See the Computed tomography tutorial to understand further how to define your own physics processes for eatch particle.
+
See the [[Computed tomography]] tutorial to learn more about simple physics lists .
=== <span style="color:#000080"> Detailed physics lists </span> ===  
=== <span style="color:#000080"> Detailed physics lists </span> ===  
-
If you want to build more realistic physics list you have to use the class <span style="color:#ff0000"> G4VModularPhysicsList </span>. In <span style="color:#ff0000"> G4VModularPhysicsList </span> you can group the physics processes into separate modules: EM physics, hadronic physics, decay physics etc. and later chose one of them.   
+
If you want to build more realistic physics list you have to use the class <span style="color:#ff0000"> G4VModularPhysicsList </span>. In <span style="color:#ff0000"> G4VModularPhysicsList </span> you can group the physics processes into separate modules which are already pre-build physics list and later chose one of those modules.   
<u> Simple example of class <span style="color:#ff0000"> MyPhysicsList </span> </u>:
<u> Simple example of class <span style="color:#ff0000"> MyPhysicsList </span> </u>:
Line 371: Line 370:
</pre>
</pre>
    
    
-
See the basic tutorials to understand more about the modular physics lists.
+
See the [[Monoenergetic proton pencil beam]] tutorial to learn more about detailed physics lists.
=== <span style="color:#000080"> Pre-packaged physics lists </span> ===
=== <span style="color:#000080"> Pre-packaged physics lists </span> ===
Line 451: Line 450:
[http://geant4.web.cern.ch/geant4/UserDocumentation/Doxygen/examples_doc/html/group__extended__common__primaryGenerator.html Here] you can find how to implement MyPrimaryGeneratorAction class in your code.
[http://geant4.web.cern.ch/geant4/UserDocumentation/Doxygen/examples_doc/html/group__extended__common__primaryGenerator.html Here] you can find how to implement MyPrimaryGeneratorAction class in your code.
-
The Monoenergetic photon pencil beam example uses the '''G4ParticleGun''' class. The Proton beam with realistic geometry tutorial uses '''G4GeneralParticleSource'''.   
+
The [[Monoenergetic photon pencil beam]] example uses the '''G4ParticleGun''' class. The [[Proton beam with realistic geometry]] tutorial uses '''G4GeneralParticleSource'''.   
    
    
== <span style="color:#000080"> Optional user classes </span> ==
== <span style="color:#000080"> Optional user classes </span> ==
Line 477: Line 476:
=== <span style="color:#000080"> Step </span> ===
=== <span style="color:#000080"> Step </span> ===
-
Step has two points and information about the particle e.g. energy loss on the step. A step is represented by <span style="color:#ff0000"> G4Step </span> and <span style="color:#ff0000"> G4StepPoint </span> classes. <span style="color:#ff0000"> G4UserSteppingAction </span> is optional class where you can kill, suspend, postpone a track.  
+
Step is defined by two points, it contains also information about the particle e.g. energy loss on the step. A step is represented by <span style="color:#ff0000"> G4Step </span> and <span style="color:#ff0000"> G4StepPoint </span> classes. <span style="color:#ff0000"> G4UserSteppingAction </span> is optional class where you can kill, suspend, postpone a track.  
-
Status is attached to each <span style="color:#ff0000"> G4StepPoint </span> to show how step was determined. You can use ''PostStepPoint'' to get status of current step and ''PreStepPoint'' to get status of previous step. For example to get the x coordinate of a step you do the following:
+
Status is attached to each <span style="color:#ff0000"> G4StepPoint </span> to show how step was determined. You can use ''PostStepPoint'' to get status of current step and ''PreStepPoint'' to get status of previous step. For example to get the "x" coordinate of a step you do the following:
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 489: Line 488:
=== <span style="color:#000080"> Trajectory </span> ===
=== <span style="color:#000080"> Trajectory </span> ===
-
Trajectories are represented by classes <span style="color:#ff0000"> G4Trajectory </span> and <span style="color:#ff0000"> G4TrajectoryPoint </span>. <span style="color:#ff0000"> G4Trajectory </span> class copies some of the <span style="color:#ff0000"> G4Track </span> class information. <span style="color:#ff0000"> G4TrajectoryPoint </span> is the class which copies some of <span style="color:#ff0000"> G4Step </span> information.
+
Trajectories are represented by classes <span style="color:#ff0000"> G4Trajectory </span> and <span style="color:#ff0000"> G4TrajectoryPoint </span>. <span style="color:#ff0000"> G4Trajectory </span> class copies some of the <span style="color:#ff0000"> G4Track </span> class information. <span style="color:#ff0000"> G4TrajectoryPoint </span> is the class which copies some of the <span style="color:#ff0000"> G4Step </span> information.

Latest revision as of 17:00, 4 September 2014

Personal tools