Scoring commands
Contents
You're reading the documentation for a development version.
For the latest released version, please have a look at v0.5.1.
9. Scoring commands#
Macro commands related to scoring of quantities within the sensitive volume. Sensitive volume by default is defined inside the Bulk volume.
9.1. Standard Scoring#
# Add scoring ID QUANTITY
/SEE/scoring/addScoring 1 Edep
# Set histogram for last scoring SCALE LOWLIM UPLIM BINS
/SEE/scoring/setHistogram lin 0 eV 10 MeV 200
# Add scoring ID QUANTITY PARTICLE
/SEE/scoring/addScoring 2 Ekin neutron
# Set histogram for last scoring SCALE LOWLIM UPLIM BINS
/SEE/scoring/setHistogram log 10 eV 1 MeV 200
|
Type |
M? |
Description |
Example value |
---|---|---|---|---|
ID |
int |
y |
Scoring and histogram file ID |
|
QUANTITY |
string |
y |
Enable scoring of a quantity, options: Edep, Ekin |
|
(PARTICLE) |
string |
n |
Particle species to score, needed by Ekin scoring, only one particle per scoring |
|
Quantities which can be scored:
Edep
: (event-by-event) total energy deposited per event inside SV. The PARTICLE parameter can not be used in this case.Ekin
: (particle-by-particle) kinetic energy of a particle when entering or produced in SV. The PARTICLE parameter need to be defined.
No default values for parameters.
|
Type |
M? |
Description |
Example value |
---|---|---|---|---|
SCALE |
string |
y |
Scale of histogram binning |
|
LOWLIM with unit |
double u |
y |
Set lower limit of histogram range |
|
UPLIM with unit |
double u |
y |
Set upper limit of histogram range |
|
BINS |
int |
y |
Set number of histogram bins |
|
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.
9.2. Detailed Scoring#
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.
9.3. 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
References:
V. Ivanchenko: “Radiation background simulation capabilities of Geant4” (presentation at CERN, February 2019)