Introduction to GEANT4

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
Line 517: Line 517:
=== <span style="color:#000080"> Track </span> ===  
=== <span style="color:#000080"> Track </span> ===  
 +
 +
Track is a snapshot of a particle and it is represented by <span style="color:#ff0000"> G4Track </span> class. At the end of the event the track objects do not exist. Tracks are updated by steps. At the end of each step the state of a track can be changed (killed, suspended, postponed).   
=== <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. G4UserSteppingAction 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:
 +
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
G4StepPoint* prePoint  = step->GetPreStepPoint();
 +
 +
G4double x1 = prePoint->GetPosition().x();
 +
</pre>
=== <span style="color:#000080"> Trajectory </span> ===
=== <span style="color:#000080"> Trajectory </span> ===
-
[http://geant4.web.cern.ch/geant4/UserDocumentation/Doxygen/examples_doc/html/group__extended__common__userActions.html Here] you can find examples of user defined RunAction and EventAction classes.
+
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.

Revision as of 17:50, 10 July 2014

Personal tools