- 1 Introduction to Geant4 ›
- 2 Installing Geant4 ›
- 3 C++ Basics for Geant4 ›
- 4 Creating Your First Geant4 Project ›
- 5 Geant4 Units and Constants ›
- 6 Creating the Simulation World ›
- 7 Materials ›
- 8 Building Detector Geometry ›
- 9 Geometry Visualization ›
- 10 Primary Particle Generation ›
- 11 General Particle Source ›
- 12 Physics Lists ›
- 13 Particle Tracking ›
- 14 User Actions ›
- 15 Sensitive Detectors ›
- 16 Recording Energy Deposition ›
- 17 Particle Position and Timing ›
- 18 Geant4 Analysis System ›
- 19 Geant4 and ROOT ›
- 20 Geant4 Macro Commands ›
- 21 Random Numbers and Reproducibility ›
- 22 Multithreading ›
- 23 Practical Example: Gamma-Ray Detector ›
- 24 Practical Example: Radiation Shielding ›
- 25 Practical Example: PET Scanner ›
- 26 Practical Example: Proton Beam in Water ›
- 27 Detector Resolution and Smearing ›
- 28 Simulation Validation ›
- 29 Improving Simulation Performance ›
- 30 Debugging Geant4 Simulations ›
- 31 Writing Better Geant4 Applications ›
- 32 Advanced Geometry ›
- 33 Optical Photons ›
- 34 Medical Physics Applications ›
- 35 Final Project ›
- 36 Appendices ›
19 Geant4 and ROOT
19.1 ROOT Output from Geant4
19.2 Reading Geant4 Output with ROOT
19.3 Plotting Energy Spectra
19.4 Event Analysis
19.5 Simulation-to-Analysis Workflow
Views: 11
Where to Move
Move chapter:
- β° 1 Introduction to Geant4
- β° 1.1 What Is Geant4?
- β° 1.2 How Geant4 Works
- β° 1.3 Geant4 Simulation Structure
- β° 1.4 Geant4 and C++
-
- β° 2 Installing Geant4
- β° 2.1 Geant4 Requirements
- β° 2.2 Installing Geant4 on Linux
- β° 2.3 Installing Visualization Libraries
- β° 2.4 Verifying the Installation
- β° 2.5 Geant4 Example Applications
-
- β° 3 C++ Basics for Geant4
- β° 3.1 Classes and Objects
- β° 3.2 Inheritance
- β° 3.3 Pointers and References
- β° 3.4 Header and Source Files
- β° 3.5 Standard Library Containers
-
- β° 4 Creating Your First Geant4 Project
- β° 4.1 Project Structure
- β° 4.2 CMake Configuration
- β° 4.3 The Main Program
- β° 4.4 User Initialization Classes
- β° 4.5 Building and Running
-
- β° 5 Geant4 Units and Constants
- β° 5.1 Geant4 Unit System
- β° 5.2 Using Units in C++
- β° 5.3 Physical Constants
- β° 5.4 Printing Values with Units
-
- β° 6 Creating the Simulation World
- β° 6.1 DetectorConstruction
- β° 6.2 Solids
- β° 6.3 Logical Volumes
- β° 6.4 Physical Volumes
- β° 6.5 Creating the World Volume
-
- β° 7 Materials
- β° 7.1 Geant4 Materials
- β° 7.2 NIST Material Database
- β° 7.3 Common Materials
- β° 7.4 Creating Custom Materials
- β° 7.5 Detector Materials
-
- β° 8 Building Detector Geometry
- β° 8.1 Basic Geometrical Shapes
- β° 8.2 Boolean Solids
- β° 8.3 Positioning Volumes
- β° 8.4 Repeated Geometry
- β° 8.5 Detector Arrays
- β° 8.6 Geometry Overlap Checking
-
- β° 9 Geometry Visualization
- β° 9.1 Visualization in Geant4
- β° 9.2 Starting the Visualization System
- β° 9.3 Changing the View
- β° 9.4 Visualization Attributes
- β° 9.5 Displaying Particle Tracks
-
- β° 10 Primary Particle Generation
- β° 10.1 PrimaryGeneratorAction
- β° 10.2 Particle Gun
- β° 10.3 Particle Energy
- β° 10.4 Particle Position
- β° 10.5 Particle Direction
- β° 10.6 Common Particle Sources
-
- β° 11 General Particle Source
- β° 11.1 Introduction to GPS
- β° 11.2 Position Distributions
- β° 11.3 Angular Distributions
- β° 11.4 Energy Distributions
- β° 11.5 Configuring Sources with Macros
-
- β° 12 Physics Lists
- β° 12.1 What Is a Physics List?
- β° 12.2 Reference Physics Lists
- β° 12.3 Electromagnetic Physics
- β° 12.4 Gamma Interactions
- β° 12.5 Positron Physics
- β° 12.6 Hadronic Physics
- β° 12.7 Choosing a Physics List
-
- β° 13 Particle Tracking
- β° 13.1 Tracks
- β° 13.2 Steps
- β° 13.3 Energy Deposition
- β° 13.4 Track Status
- β° 13.5 Parent and Secondary Particles
-
- β° 14 User Actions
- β° 14.1 RunAction
- β° 14.2 EventAction
- β° 14.3 SteppingAction
- β° 14.4 TrackingAction
- β° 14.5 StackingAction
- β° 14.6 ActionInitialization
-
- β° 15 Sensitive Detectors
- β° 15.1 What Is a Sensitive Detector?
- β° 15.2 Creating a Sensitive Detector
- β° 15.3 Hits
- β° 15.4 Hit Collections
- β° 15.5 Assigning Sensitive Detectors
-
- β° 16 Recording Energy Deposition
- β° 16.1 Energy Deposition
- β° 16.2 Energy per Event
- β° 16.3 Energy per Detector
- β° 16.4 Energy Spectra
- β° 16.5 Detector Efficiency
-
- β° 17 Particle Position and Timing
- β° 17.1 Particle Position
- β° 17.2 Interaction Position
- β° 17.3 Global Time
- β° 17.4 Time of Flight
- β° 17.5 Detector Timing
-
- β° 18 Geant4 Analysis System
- β° 18.1 Introduction to G4AnalysisManager
- β° 18.2 Histograms
- β° 18.3 Ntuples
- β° 18.4 Filling Ntuples
- β° 18.5 Writing Output Files
- β° 18.6 Closing Analysis Files
-
- β° 19 Geant4 and ROOT
- β° 19.1 ROOT Output from Geant4
- β° 19.2 Reading Geant4 Output with ROOT
- β° 19.3 Plotting Energy Spectra
- β° 19.4 Event Analysis
- β° 19.5 Simulation-to-Analysis Workflow
-
- β° 20 Geant4 Macro Commands
- β° 20.1 Macro Files
- β° 20.2 Run Commands
- β° 20.3 Particle Source Commands
- β° 20.4 Visualization Commands
- β° 20.5 Controlling Simulations Without Recompiling
-
- β° 21 Random Numbers and Reproducibility
- β° 21.1 Monte Carlo Random Numbers
- β° 21.2 Setting Random Seeds
- β° 21.3 Running Independent Simulations
- β° 21.4 Reproducing an Event
-
- β° 22 Multithreading
- β° 22.1 Geant4 Multithreading
- β° 22.2 Running with Multiple Threads
- β° 22.3 Thread-Safe User Code
- β° 22.4 Analysis with Multithreading
- β° 22.5 Performance Considerations
-
- β° 23 Practical Example: Gamma-Ray Detector
- β° 23.1 Project Overview
- β° 23.2 Creating the World
- β° 23.3 Creating the Detector
- β° 23.4 Adding the Material
- β° 23.5 Creating a Gamma Source
- β° 23.6 Selecting Electromagnetic Physics
- β° 23.7 Recording Energy Deposition
- β° 23.8 Creating an Energy Spectrum
- β° 23.9 Simulating Detector Resolution
- β° 23.10 Analyzing the Spectrum with ROOT
-
- β° 24 Practical Example: Radiation Shielding
- β° 24.1 Project Overview
- β° 24.2 Creating the Source
- β° 24.3 Creating the Shield
- β° 24.4 Comparing Shielding Materials
- β° 24.5 Varying Shield Thickness
- β° 24.6 Recording Transmitted Particles
- β° 24.7 Calculating Transmission
- β° 24.8 Calculating Attenuation
- β° 24.9 Comparing Simulation Results
-
- β° 25 Practical Example: PET Scanner
- β° 25.1 Introduction to PET Simulation
- β° 25.2 Creating a PET Detector Ring
- β° 25.3 Creating Detector Crystals
- β° 25.4 Assigning Detector IDs
- β° 25.5 Creating a Positron Source
- β° 25.6 Simulating Positron Annihilation
- β° 25.7 Recording Detector Hits
- β° 25.8 Applying an Energy Window
- β° 25.9 Finding Coincidence Events
- β° 25.10 Recording Detector Positions
- β° 25.11 Creating Lines of Response
- β° 25.12 Saving PET Events to ROOT
- β° 25.13 Analyzing PET Data with ROOT
-
- β° 26 Practical Example: Proton Beam in Water
- β° 26.1 Project Overview
- β° 26.2 Creating the Water Phantom
- β° 26.3 Creating a Proton Beam
- β° 26.4 Selecting the Physics List
- β° 26.5 Recording Energy Deposition
- β° 26.6 Dividing the Phantom into Slices
- β° 26.7 Calculating Depth Dose
- β° 26.8 Observing the Bragg Peak
- β° 26.9 Plotting the Depth-Dose Curve
-
- β° 27 Detector Resolution and Smearing
- β° 27.1 Ideal vs Realistic Detector Response
- β° 27.2 Energy Resolution
- β° 27.3 Position Resolution
- β° 27.4 Time Resolution
- β° 27.5 Applying Detector Effects
- β° 27.6 Comparing Ideal and Smeared Results
-
- β° 28 Simulation Validation
- β° 28.1 Why Validate a Simulation?
- β° 28.2 Checking Geometry
- β° 28.3 Checking Energy Conservation
- β° 28.4 Comparing with Analytical Calculations
- β° 28.5 Comparing with Reference Data
- β° 28.6 Statistical Uncertainties
- β° 28.7 Number of Simulated Events
-
- β° 29 Improving Simulation Performance
- β° 29.1 Geometry Performance
- β° 29.2 Physics List Performance
- β° 29.3 Production Cuts
- β° 29.4 Reducing Unnecessary Output
- β° 29.5 Multithreading
- β° 29.6 Running Large Simulations
- β° 29.7 Parameter Scans
-
- β° 30 Debugging Geant4 Simulations
- β° 30.1 Compilation Errors
- β° 30.2 Geometry Errors
- β° 30.3 Overlapping Volumes
- β° 30.4 Missing Particles
- β° 30.5 Missing Energy Deposition
- β° 30.6 Physics List Problems
- β° 30.7 Sensitive Detector Problems
- β° 30.8 Empty Output Files
- β° 30.9 Segmentation Faults
- β° 30.10 Using Geant4 Verbose Output
-
- β° 31 Writing Better Geant4 Applications
- β° 31.1 Organizing Source Code
- β° 31.2 Separating Geometry and Analysis
- β° 31.3 Using Configuration Parameters
- β° 31.4 Avoiding Hard-Coded Values
- β° 31.5 Creating Reusable Detector Components
- β° 31.6 Naming Conventions
- β° 31.7 Documentation
- β° 31.8 Version Control with Git
-
- β° 32 Advanced Geometry
- β° 32.1 Parameterized Geometry
- β° 32.2 Replica Volumes
- β° 32.3 Nested Geometry
- β° 32.4 Complex Detector Arrays
- β° 32.5 Importing CAD Geometry
- β° 32.6 Exporting Geometry with GDML
-
- β° 33 Optical Photons
- β° 33.1 Introduction to Optical Physics
- β° 33.2 Optical Photons
- β° 33.3 Material Optical Properties
- β° 33.4 Scintillation Light
- β° 33.5 Optical Surfaces
- β° 33.6 Photodetectors
- β° 33.7 Counting Optical Photons
-
- β° 34 Medical Physics Applications
- β° 34.1 Geant4 in Medical Physics
- β° 34.2 Radiation Dose Simulation
- β° 34.3 PET Simulation
- β° 34.4 SPECT Simulation
- β° 34.5 Radiotherapy Simulation
- β° 34.6 Proton Therapy Simulation
- β° 34.7 Biological Tissue Materials
-
- β° 35 Final Project
- β° 35.1 Project Overview
- β° 35.2 Define the Simulation Goal
- β° 35.3 Create the Geometry
- β° 35.4 Define Materials
- β° 35.5 Configure the Particle Source
- β° 35.6 Select the Physics List
- β° 35.7 Implement Sensitive Detectors
- β° 35.8 Record Simulation Data
- β° 35.9 Run the Simulation
- β° 35.10 Analyze the Results with ROOT
- β° 35.11 Validate the Simulation
- β° 35.12 Create Scientific Figures
- β° 35.13 Document the Simulation
-
- β° 36 Appendices
- β° 36.1 Geant4 Class Cheat Sheet
- β° 36.2 Geant4 Units Cheat Sheet
- β° 36.3 Common Geant4 Macro Commands
- β° 36.4 Common Geometry Classes
- β° 36.5 Common Particle Definitions
- β° 36.6 Common Physics Lists
- β° 36.7 G4AnalysisManager Cheat Sheet
- β° 36.8 Common Visualization Commands
- β° 36.9 Common Geant4 Errors and Solutions
- β° 36.10 Recommended Geant4 Project Structure
- β° 36.11 Recommended Geant4 Simulation Workflow
-
KAHIBARO