mirror of
https://github.com/jwinterm/geant4-radiation-labs.git
synced 2026-10-17 05:41:25 +02:00
Tag Geant4 macro fenced blocks with 'default' so they pick up code-block styling
This commit is contained in:
@@ -255,22 +255,22 @@ The real power of Geant4 is the ability to easily change simulation parameters u
|
||||
|
||||
2. Add the following commands to your macro file:
|
||||
|
||||
```
|
||||
```default
|
||||
# My custom run for Lab 2
|
||||
# Author: [Your Name]
|
||||
|
||||
|
||||
# Initialize the kernel
|
||||
/run/initialize
|
||||
|
||||
|
||||
# Set the particle to a proton
|
||||
/gun/particle proton
|
||||
|
||||
|
||||
# Set the proton's kinetic energy to 150 MeV
|
||||
/gun/energy 150 MeV
|
||||
|
||||
|
||||
# Print progress every 100 events
|
||||
/run/printProgress 100
|
||||
|
||||
|
||||
# Run 1000 events
|
||||
/run/beamOn 1000
|
||||
```
|
||||
@@ -292,7 +292,7 @@ Let's create additional macro files to explore different simulation scenarios:
|
||||
|
||||
1. Create a macro for electron simulation (`electron_beam.mac`):
|
||||
|
||||
```
|
||||
```default
|
||||
/run/initialize
|
||||
/gun/particle e-
|
||||
/gun/energy 50 MeV
|
||||
@@ -301,7 +301,7 @@ Let's create additional macro files to explore different simulation scenarios:
|
||||
|
||||
2. Create a macro for neutron simulation (`neutron_beam.mac`):
|
||||
|
||||
```
|
||||
```default
|
||||
/run/initialize
|
||||
/gun/particle neutron
|
||||
/gun/energy 14 MeV
|
||||
|
||||
@@ -262,7 +262,7 @@ Now let's compile your modified code and generate some data!
|
||||
|
||||
Add these contents:
|
||||
|
||||
```
|
||||
```default
|
||||
# Lab 3 Data Collection Run
|
||||
# Simulate 10,000 events with default 6 MeV gammas
|
||||
|
||||
@@ -575,7 +575,8 @@ Let's generate data for different particles and compare their energy deposition
|
||||
```
|
||||
|
||||
Add:
|
||||
```
|
||||
|
||||
```default
|
||||
/run/numberOfThreads 1
|
||||
/run/initialize
|
||||
/gun/particle proton
|
||||
@@ -591,7 +592,8 @@ Let's generate data for different particles and compare their energy deposition
|
||||
```
|
||||
|
||||
Add:
|
||||
```
|
||||
|
||||
```default
|
||||
/run/numberOfThreads 1
|
||||
/run/initialize
|
||||
/gun/particle e-
|
||||
|
||||
@@ -164,7 +164,7 @@ That is the only file you need to edit. `EventAction.cc` is left untouched — t
|
||||
|
||||
Add:
|
||||
|
||||
```
|
||||
```default
|
||||
# Lab 4: PET scanner data run
|
||||
|
||||
# Force single-threaded mode so we get ONE CSV file, not one per worker.
|
||||
|
||||
Reference in New Issue
Block a user