GEANT4 Learn Notes
Some reference
- ROOT Users Workshop 2013 - “ROOT - The Next Generation”.
- Geant4 Tutorial
- XVI Seminar on Software for Nuclear, Subnuclear and Applied Physics.
- The 2nd GEANT4 school in China.
Study from the examples
The example codes are here.
Some reference: exampleB1解读.
ExampleB1
Code Structures
- include
- ActionInitialization.hh
- DetectorConstruction.hh
- EventAction.hh
- PrimaryGeneratorAction.hh
- RunAction.hh
- SteppingAction.hh
- src
- ActionInitialization.cc
- DetectorConstruction.cc
- EventAction.cc
- PrimaryGeneratorAction.cc
- RunAction.cc
- SteppingAction.cc
- examples
The main program is example.cc
, it uses 3
- examples
- G4RunManager
- G4VisManager
- G4UImanager
to define the run, …
Reference from here
- Mandatory User Classes
- G4VUserDetectorConstruction: The detector structure defination is in
DetectorConstruction.cc
, the key is physical volume and logical volume. - G4VUserPhysicsList
- G4VUserActionInitialization
- G4PrimaryGeneratorAction
- RunAction
#include "G4Run.hh"
- EventAction
#include "G4Event.hh"
STackingAction#include "G4Track.hh"
TrackingAction#include "G4Track.hh"
- SteppingAction
#include "G4Step.hh"
- G4VUserDetectorConstruction: The detector structure defination is in
In the user action
Column 1 | Column 2 |
---|---|
Simulation is successively split into | Corresponding / related Objects |
Run consists of | G4RunManager, G4Run |
Event(s), consists of | G4Event |
Particle(s) transported in | G4Track, G4DynamicParticle |
Steps through detector setup, | G4Step, G4StepPoint |
depositing energy ionization), | G4Trajectory |
and creating secondaries | G4Stack |