G4CMP
A low energy condensed matter physics package for Geant4
Install / Use
/learn @G4CMP/G4CMPREADME
G4CMP -- Geant4 add-on framework for phonon and charge-carrier physics
R. Agnese, D. Brandt, M. Kelsey, P. Redl, I Ataee Langroudy
This package provide a collection of particle types, physics processes, and supporting utilities to simulate a limited set of solid-state physics processes in Geant4. Developed for the low-temperature community, the package support production and propagation of acoustic phonons and electron-hole pairs through solid crystals such as germanium.
Website: https://confluence.slac.stanford.edu/spaces/G4CMP/overview
Papers: https://doi.org/10.1016/j.nima.2023.168473 https://arxiv.org/abs/2302.05998 https://arxiv.org/abs/2408.04732 https://arxiv.org/abs/1403.4984
Software Licenses
This product includes software developed by Members of the Geant4
Collaboration ( http://cern.ch/geant4 ). A copy of the Geant4 license is
included at G4CMP/Geant4_LICENSE.html.
This product ships an unaltered copy of Qhull source code. This is so that
we may compile and link the code in an unsupported way. The Qhull license
is included at G4CMP/qhull-2012.1/COPYING.txt.
The original parts of the product are licensed under the GNU General Public
License version 3 or (at your discretion) any later version. The full
license can be found at G4CMP/LICENSE.
Downloading G4CMP
G4CMP may be retrieved from the GitHub repository with the command
git clone https://github.com/kelseymh/G4CMP.git
(active developers should use git@github.com:kelseymh/G4CMP.git so they
have git push access). This will provide the latest top-level release of
the package. All of the top-level "release" tags are of the form
g4cmp-Vxx-yy-zz, and are listed in the ChangeHistory file; users may
select a different version using git checkout g4cmp-Vaa-bb-cc.
Once the G4CMP source directory is set up, the libraries and examples can be built as described below under Building the package.
User Environment
Users must have a recent (10.4 through 10.7) version of GEANT4 installed and
configured (via GEANT4's bin/geant4.sh or bin/geant4.csh. See GEANT4's
documentation for further instructions.).
NOTE The release of Geant4 Version 11 introduced substantial and breaking changes to many Geant4 interface classes. We are maintaining G4CMP under ==Geant4 Version 10== (through 10.7) to ensure compatibility with our major experimental users.
Add the G4CMP environment variables using the g4cmp_env.csh or ...sh
scripts found in the G4CMP installation directory (see below for build and
installation procedures):
source g4cmp_env.csh # For CSH/TCSH users
. g4cmp_env.sh # For SH/BASH users
This must be done before building or running executables.
G4CMP is only configured for use on Linux and MacOSX platforms. A minimum configuration requires a recent enough version of GCC or Clang to support the C++11 standard.
Several configuration parameters are available through environment variables
and macro commands, as listed below. Most of these affect charge carrier
propagation and related processes. Because G4CMP is in a very active
development state, do not expect this table to stay up-to-date. Rather,
developers should check the source code in
G4CMP/library/src/G4CMPConfigManager.cc and
G4CMP/library/src/G4CMPConfigMessenger.cc to see what is available.
| Environment variable | Macro command | Value/action | | ------------------------| ----------------------------- | ----------------------------------------| | G4LATTICEDATA [P1:P2...] | /g4cmp/LatticeData [P1:P2:...] | Paths with lattice configs | | G4CMP_DEBUG | /g4cmp/verbose [L] >0: | Enable diagnostic messages | | G4CMP_CLEARANCE [L] | /g4cmp/clearance [L] mm | Minimum distance of tracks from boundaries | | G4CMP_VOLTAGE [V] | /g4cmp/voltage [V] volt !=0: | Apply uniform +Z voltage | | G4CMP_EPOT_FILE [F] | /g4cmp/EPotFile [F] V=0: | Read mesh field file "F" | | G4CMP_EPOT_SCALE [F] | /g4cmp/scaleEPot [M] V=0: | Scale the potentials in EPotFile by factor m| | G4CMP_MIN_STEP [S] | /g4cmp/minimumStep [S] S>0: | Force minimum step S*L0 | | G4CMP_EH_BOUNCES [N] | /g4cmp/chargeBounces [N] | Maximum e/h reflections | | G4CMP_PHON_BOUNCES [N] | /g4cmp/phononBounces [N] | Maximum phonon reflections | | G4CMP_PHON_SURFSTEP [L] | /g4cmp/phononSurfStepSize [L] um | Specular reflection surface displacement step size | | G4CMP_PHON_SURFLIMIT [N] | /g4cmp/phononSurfStepLimit [N] | Specular reflection surface displacement step limit | | G4CMP_EH_MAX_STEPS [N] | /g4mp/maximumSteps [N] | Maximum allowed charged track steps | | G4CMP_MAKE_PHONONS [R] | /g4cmp/producePhonons [R] | Fraction of phonons from energy deposit | | G4CMP_MAKE_CHARGES [R] | /g4cmp/produceCharges [R] | Fraction of charge pairs from energy deposit | | G4CMP_LUKE_SAMPLE [R] | /g4cmp/sampleLuke [R] | Fraction of generated Luke phonons | | G4CMP_MAX_LUKE [N] | /g4cmp/maxLukePhonons [N] | Soft maximum Luke phonons per event | | G4CMP_SAMPLE_ENERGY [E] | /g4cmp/samplingEnergy [E] eV | Energy above which to downsample | | G4CMP_COMBINE_STEPLEN [L] | /g4cmp/combiningStepLength [L] mm | Combine hits below step length | | G4CMP_EMIN_PHONONS [E] | /g4cmp/minEPhonons [E] eV | Minimum energy to track phonons | | G4CMP_EMIN_CHARGES [E] | /g4cmp/minECharges [E] eV | Minimum energy to track charges | | G4CMP_RECORD_EMIN | /g4cmp/recordMinETracks [t|f] | Put below-minimum energy to killed track Edeposit | | G4CMP_USE_KVSOLVER | /g4mcp/useKVsolver [t|f] | Use eigensolver for K-Vg mapping | | G4CMP_FANO_ENABLED | /g4cmp/enableFanoStatistics [t|f] | Apply Fano statistics to input ionization | | G4CMP_KAPLAN_KEEP | /g4cmp/kaplanKeepPhonons [t|f] | Reflect or iterate all phonons in KaplanQP | | G4CMP_IV_RATE_MODEL | /g4cmp/IVRateModel [IVRate|Linear|Quadratic] | Select intervalley rate parametrization | | G4CMP_LUKE_FILE | /g4cmp/LukeDebugFile [S] | LukeScattering debug filename | | G4CMP_ETRAPPING_MFP | /g4cmp/eTrappingMFP [L] mm | Mean free path for electron trapping | | G4CMP_HTRAPPING_MFP | /g4cmp/hTrappingMFP [L] mm | Mean free path for charge hole trapping | | G4CMP_EDTRAPION_MFP | /g4cmp/eDTrapIonizationMFP [L] mm | MFP for e-trap ionization by e- | | G4CMP_EATRAPION_MFP | /g4cmp/eATrapIonizationMFP [L] mm | MFP for h-trap ionization by e- | | G4CMP_HDTRAPION_MFP | /g4cmp/hDTrapIonizationMFP [L] mm | MFP for e-trap ionization by h+ | | G4CMP_HATRAPION_MFP | /g4cmp/hATrapIonizationMFP [L] mm | MFP for h-trap ionization by h+ | | G4CMP_TEMPERATURE | /g4cmp/temperature [T] K | Device/substrate/etc. temperature | | G4CMP_NIEL_FUNCTION | /g4cmp/NIELPartition [model] | Select NIEL partitioning function. See below | | G4CMP_EMPIRICAL_KLOW | /g4cmp/NIELPartition/Empirical/klow [k] | k lower bound of dk/dE for energy dependent K | | G4CMP_EMPIRICAL_KHIGH | /g4cmp/NIELPartition/Empirical/khigh [k] | k high bound of dk/dE for energy dependent K | | G4CMP_EMPIRICAL_ELOW | /g4cmp/NIELPartition/Empirical/Elow [k] | E lower bound of dk/dE for energy dependent K | | G4CMP_EMPIRICAL_EHIGH | /g4cmp/NIELPartition/Empirical/Ehigh [k] | E high bound of dk/dE for energy dependent K | | G4CMP_EMPIRICAL_KFIXED | /g4cmp/NIELPartition/Empirical/kFixed [k] | Value of k for non energy dependent K | | G4CMP_EMPIRICAL_EDEPK | /g4cmp/NIELPartition/Empirical/EDepK [t|f] | Use energy dependent K | | G4CMP_CHARGE_CLOUD | /g4cmp/createChargeCloud [t|f] | Create charges in sphere around location | | G4CMP_MILLER_H | /g4cmp/orientation [h] [k] [l] | Miller indices for lattice orientation | | G4CMP_MILLER_K | | | | G4CMP_MILLER_L | | | | G4CMP_HIT_FILE [F] | /g4cmp/HitsFile [F] | Write e/h hit locations to "F" |
The default lattice orientation is to be aligned with the associated
G4VSolid coordinate system. A different orientation can be specified by
setting the Miller indices (hkl) with $G4CMP_MILLER_H, _K, and
_L.
The environment variable $G4CMP_NIEL_FUNCTION allows the user to specify
a particular model for non-ionizing energy loss ("nuclear recoil"), from
the set of models provided in G4CMP:
LewinSmith # Lewin & Smith's implementation of Lindhard NIEL
Lindhard # Robinson's implementation of Lindhard NIEL
Empirical # Energy dependent (or variable) k Lindhard NIEL
Impact@TUNL # IMPACT@TUNL Si NIEL measurements
Sarkis # Lindhard NIEL modified by Sarkis 2022
The environment variable $G4CMP_MAKE_CHARGES controls the rate (R) as a
fraction of total interactions, at which electron-hole pairs are produced
by energy partitioning. Secondaries will be
produced with a track weight set to 1/R:
unsetenv G4CMP_MAKE_CHARGES # No new charge pairs generated
setenv G4CMP_MAKE_CHARGES 1 # Generate e/h pair at every occurrence
setenv G4CMP_MAKE_CHARGES 0.001 # Generate e/h pair 1:1000 occurrences
When secondary phonons are not produced, the equivalent energy is recorded as non-ionizing energy loss (NIEL) on the track. Generating seconary phonons will significantly slow down the simulation.
The environment variable $G4CMP_MAKE_PHONONS controls the rate (R) as a
fraction of total interactions, at which "primary" phonons are produced (by
energy partitioning or recombination). Secondaries will be produced with a
track weight set to 1/R:
unsetenv G4CMP_M
