Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Luter 345 Experiments
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Understanding the Function Hierarchy
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Summary== A Geant4 program has an underlying class structure that must be understood to manipulate a program successfully. These components correspond to their own classes; Namely, these are the Run Action, Event Action, and Stepping Action. These, like most other aspects of a Geant4 simulation can be manipulated, but they must exist and understanding their relationships with each other is crucial. Due to the complexity of Geant's Function Hierarchy, I will simply highlight its essential functions and basic uses. For further documentation, please refer to [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ CERN's Geant4 User Guide]: [[File:Geant4Part.jpg|center|]] ===Runs=== A run is the highest level of a Geant4 simulation. It is made up of one or more events. A user can define actions taken at the beginning and end of each event in the run action class file. Typically creating and saving the Ntuple used in the simulation occurs at the run level. The detector construction and generator action are also run level classes, even though they are only executed in the main. This means they are executed once per run, and they cannot change during a simulation. When running a simulation with the visualization package, the command to execute the simulation is run/beamOn <number>. The number is actually the number of events you wish to occur in this run. In effect, this command occurs at the run level as well. ===Events=== An event is a subunit of a run, and is comprised of steps. Just like with a run, users define what actions should take place at the beginning and end of each event in the event action file. These actions are highly variable between applications, but common event level actions are saving initial conditions of the event and saving some final result. As a rule of thumb, the event should be one instance of whatever the simulation is meant to study. For example, if you wanted to simulate what happens to skin when exposed to sunlight, the event might be shooting an equivalent number of particles from one hour of sunlight at simulated skin. The idea would be to repeat this to come to a conclusion, so it would be a good step. ===Steps=== A step is the lowest level of a Geant4 simulation. Just like with runs and events, steps can be manipulated greatly by a user. This occurs in the stepping action file. Steps are a small period of time, entering or exiting a volume, and any kind of particle decay. The simulation actually breaks events into steps without having to define anything, however the user must define what to do at each step. Often this is recording some piece of data, like the energy of the particle. It is important to remember that there are multiple steps within a single event, so if values are added during each step to an Ntuple, it will be difficult to identify the beginning or end of each event. It may be beneficial to flag your data in some way so it can be separated later by a ROOT macro. For example, if you have a column called energy that gets recorded at each step, it may be helpful to add an entry of negative one at the beginning of each event. Then in your ROOT macro, a simple if statement can be used to check for this flag and save the next set of data as belonging to a different event.
Summary:
Please note that all contributions to Luter 345 Experiments may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Luter 345 Experiments:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)