Scoring#
Macro commands related to scoring of quantities within the sensitive volume. Sensitive volume by default is defined inside the Bulk volume.
Standard Scoring commands#
Quantities which can be scored:
Edep: (event-by-event) total energy deposited per event inside SV.
Ekin: (hit-by-hit) kinetic energy of a particle in SV.
LET: (event-by-event or hit-by-hit) linear energy transfer in SV.
Energy Deposition – Edep#
# Add scoring ID
/SEE/scoring/standard/Edep 1
# Set histogram for last scoring SCALE BINS LOWLIM UPLIM (UNIT)
/SEE/scoring/setHistogram lin 200 0 10 MeV
|
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
ID |
int |
y |
Scoring and histogram file ID |
|
- |
Unit of scored quantity: MeV
Counts include the event biasing weights
Kinetic Energy – Ekin#
# Add scoring ID (PARTICLE) (STEP)
/SEE/scoring/standard/Ekin 2 neutron first
# Set histogram for last scoring SCALE BINS LOWLIM UPLIM (UNIT)
/SEE/scoring/setHistogram log 200 0.1 1000 keV
|
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
ID |
int |
y |
Scoring and histogram file ID |
|
- |
(PARTICLE) |
string |
n |
Particle(s) to score |
|
|
(STEP) |
string |
n |
Particle steps in SV to score |
|
|
Unit of scored quantity: MeV
PARTICLE parameter:
primary
: only primary particlenon-primary
: all particles excluding primary particleall
: all particlesor one can filter particle species by their name
STEP parameter:
first
: only first step in SV (either entering into SV or produced inside SV)last
: only last step in SV (just before leaving SV)all
: all steps in SV (normalized by the number of steps per particle)
Counts include the hit biasing weights
Linear Energy Transfer – LET#
# Add scoring ID (OPTION) (PARTICLE) (STEP)
/SEE/scoring/standard/LET 3 Opt1 primary first
# Set histogram for last scoring SCALE BINS LOWLIM UPLIM
/SEE/scoring/setHistogram log 100 0.01 100
|
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
ID |
int |
y |
Scoring and histogram file ID |
|
- |
(OPTION) |
string |
n |
Type of LET to score |
|
|
(PARTICLE) |
string |
n |
Particle(s) to score, only for |
|
|
(STEP) |
string |
n |
Particle steps in SV to score, only for |
|
|
Unit of scored quantity: MeV*cm^2/mg
OPTION parameter:
Opt1
: LET scored in every event, LET = (Edep per event) / (primary track length)Opt2
: LET scored along every step (hit), calculated byG4EmCalculator
class of Geant4Opt3
: LET scored along every step (hit), LET = (Edep per step) / (step length)
PARTICLE parameter (for
Opt2
orOpt3
):primary
: only primary particlenon-primary
: all particles excluding primary particleall
: all particlesor one can filter particle species by their name
STEP parameter (for
Opt2
orOpt3
):first
: only first step in SV (either entering into SV or produced inside SV)last
: only last step in SV (just before leaving SV)all
: all steps in SV (normalized by the number of steps per particle)
Counts include the event or hit biasing weights
Histograms#
Directly after Edep, Ekin or LET scoring, one histogram should be defined for each scoring as well:
|
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
SCALE |
string |
y |
Scale of histogram binning |
|
- |
BINS |
int |
y |
Number of histogram bins |
|
- |
LOWLIM |
double |
y |
Lower limit of histogram range |
|
- |
UPLIM |
double u |
y |
Upper limit of histogram range |
|
- |
(UNIT) |
string |
n |
Unit of range limits |
|
it depends |
The setHistogram
command always sets the following values for the scoring latest added.
Scored quantity is saved to an output histogram file. For details, see Output Files.
No default values for parameters.
Other macro commands |
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
|
int |
n |
Save histograms to file regularly, after every N number of events |
|
- |
By default, scored histograms saved into file only at the end of run. Using dumpHistogramsAfter
command, one can override this.
Detailed Scoring commands#
When Detailed Scoring (DS) feature of G4SEE is enabled, each thread saves particle hits of SV particle-by-particle to a “Hits” output file with Hits_t<N>.out
filename.
During Detailed Scoring, only the \(e^-\), \(e^+\) and \(\gamma\) particles ABOVE a certain kinetic energy (\(E_{kin}\)) thresholds are scored and then printed individually to the Hits output file
These \(E_{kin}\) thresholds for \(e^-\), \(e^+\) and \(\gamma\) can be set via the related
setThreshold
commands\(E_{kin}\) thresholds can also be set to 0, which means all of these particles independently of their energy are scored and printed to file individually, potentially causing very large output file (because of the thousands of ionization \(e^-\)), use with caution!
The \(e^-\), \(e^+\) and \(\gamma\) particles with energy BELOW their \(E_{kin}\) threshold are grouped together per event and per particle species, and printed together as a group into a single line of the Hits DS output file, indicating the group with a
g
letterIf ancestor grouping (via
groupByAncestor
command) is enabled for \(e^-\), \(e^+\) or \(\gamma\), these particles are grouped by their ancestor particles using their parent IDs and track IDs, resulting a more verbose DS outputHits output files can grow very fast in file size, so they can easily take up huge amount of disk space!
Other macro commands |
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
|
bool |
n |
Enable/disable Detailed Scoring |
|
False |
|
bool |
n |
Print primary particles to DS Hits output file |
|
True |
|
bool |
n |
Set CSV file format for DS Hits output file |
|
True |
|
double u |
n |
Exceeding this memory limit, DS output is dumped into Hits file |
|
10 MB |
|
int |
n |
Exceeding this event limit, DS output is dumped into Hits file |
|
(not used) |
|
double u |
n |
\(E_{kin}\) threshold for individual \(e^-\) scoring |
|
10 keV |
|
double u |
n |
\(E_{kin}\) threshold for individual \(e^+\) scoring |
|
10 keV |
|
double u |
n |
\(E_{kin}\) threshold for individual \(\gamma\) scoring |
|
100 keV |
|
bool |
n |
Enable ancestor grouping for \(e^-\) below \(E_{kin}\) threshold |
|
False |
|
bool |
n |
Enable ancestor grouping for \(e^+\) below \(E_{kin}\) threshold |
|
False |
|
bool |
n |
Enable ancestor grouping for \(\gamma\) below \(E_{kin}\) threshold |
|
False |
With commands below, one can enable/disable optional scored quantities to be printed to Hits file:
Other macro commands |
Type |
M? |
Description |
Example value |
Default value |
---|---|---|---|---|---|
|
bool |
n |
Print particle track ID to Hits file |
|
True |
|
bool |
n |
Print particle parent ID to Hits file |
|
True |
|
bool |
n |
Print particle total energy deposited to Hits file |
|
True |
|
bool |
n |
Print particle kinetic energy to Hits file |
|
True |
|
bool |
n |
Print particle counts to Hits file |
|
True |
|
bool |
n |
Print particle atomic number to Hits file |
|
False |
|
bool |
n |
Print particle mass (nucleon) number to Hits file |
|
False |
|
bool |
n |
Print particle position vector (x,y,z) to Hits file |
|
False |
|
bool |
n |
Print particle momentum vector (x,y,z) to Hits file |
|
False |
|
bool |
n |
Print particle creator process to Hits file |
|
False |
|
bool |
n |
Print particle creator volume to Hits file |
|
False |
|
bool |
n |
Print particle non-Ionizing energy deposited to Hits file |
|
False |
|
bool |
n |
Print particle excitation energy to Hits file |
|
False |
For more details about Detailed Scoring output, see Output Files.
Deposited energy quantities#
Edep (or \(E_{dep}\),
E_dep
): Total energy deposited during steps, which in G4SEE is summed for all steps in SVthe Total energy deposited per step is the sum of:
the energy deposited by the energy loss process, and
the energy lost by secondaries which have NOT been generated because each of their energies was below the cut threshold
Ndep Non-ionizing energy deposited is INCLUDED in the Edep Total energy deposited
Ndep (or \(N_{dep}\),
N_dep
): Non-ionizing energy deposited (or Non-ionizing energy loss (NIEL)) during steps, which in G4SEE is summed for all steps in SVIn G4, the Non-ionizing energy loss (NIEL) is an estimation of energy loss of p/ion transferred to an atomic nucleus due to multiple scattering
Models calculating NIEL: G4NuclearStopping (used by EM_opt4 and EM_opt3), G4HadronElasticProcess, G4xCoulombScatteringModel (x = e, h, eSingle, Ion), G4PhononReflection
In EM_opt4 and EM_opt3 physics modules, NIEL computation is enabled for protons and ions with kinetic energy below 1 MeV/nucleon
For elastic processes, NIEL is controlled by “Range cut for proton”
If recoil energy below this threshold, then recoil ion is not tracked by G4, but the energy is added to total and non-ionizing energy deposition
If this value is set to zero then non-ionizing energy will be zero and all recoil ions will be tracked
If recoil ion is tracked by G4, the effective charge approach is used
All the energies deposited by the generated (and therefore tracked) secondary particles are EXCLUDED from Total energy deposited by primary particle
See also
V. Ivanchenko: “Radiation background simulation capabilities of Geant4” (presentation at CERN, February 2019)