You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/man/electric_potential.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,47 @@ impurity_density:
105
105
Here, the impurity density at the origin is $10^{10}$cm$^{-3}$ and it increases radially with the gradient $10^{10}$cm$^{-4}$.
106
106
If no units are given, `init` is parsed in units of `units.length`$^{-3}$ and `gradient` in units of `units.length`$^{-4}$.
107
107
108
+
### Boule Impurity Densities
109
+
110
+
Boule impurity densities are meant to be used when the impurity density is defined in the boule coordinates, where the z-axis is aligned with the boule growth direction.
111
+
Different models are provided. In each the field `det_z0` is the z-coordinate of the detector origin in boule coordinates.
112
+
The z-direction of the detector is opposite to the z-direction of the boule coordinates.
113
+
In this matter the detector impurities are automatically determined from those of the boule, depending on `det_z0`.
114
+
```yaml
115
+
impurity_density:
116
+
name: linear_exponential_boule
117
+
a: -1e10cm^-3
118
+
b: -1e9cm^-4
119
+
n: -2e9cm^-3
120
+
l: 5cm
121
+
m: 3cm
122
+
det_z0: 120cm
123
+
```
124
+
In this example, the impurity density is modeled along the boule as a linear plus an exponential term: $a + b*z + n*e^{(z - l)/m}$ with $z$ in boule coordinates.
125
+
The impurity density of the detector will in turn be modeled by: $a + b*(z_0 - z) + n*e^{(z_0 - z - l)/m}$ with $z$ in detector coordinates.
126
+
If no units are given, `a` and `n` are parsed in units of `units.length`$^{-3}$, `b` in units of `units.length`$^{-4}$ and `l`, `m` and `det_z0` in units of `units.length`.
127
+
128
+
### Correcting Impurity Densities
129
+
130
+
When simulating real detectors, the simulated depletion voltage often differs from the measured value. This discrepancy arises primarily from the high uncertainty in impurity density measurements. A straightforward approach to improve the agreement is to apply a scaling factor and an offset to the impurity density.
131
+
The scaling factor accounts for potential systematic errors in impurity density measurements.
132
+
The offset is motivated by the thermal release of impurities from deep hole traps, which leads to a shift in the effective impurity density throughout the detector after biasing. In steady-state operation, this effect can be approximated as a uniform offset
133
+
These terms can be added to the configuration file under `corrections`.
134
+
```yaml
135
+
impurity_density:
136
+
name: linear_exponential_boule
137
+
a: -1e10cm^-3
138
+
b: -1e9cm^-4
139
+
n: -2e9cm^-3
140
+
l: 5cm
141
+
m: 3cm
142
+
det_z0: 120cm
143
+
corrections:
144
+
scale: 0.9
145
+
offset: -1e9cm^-3
146
+
```
147
+
If no units are given, `offset` is parsed in units of `units.length`$^{-3}$.
148
+
Corrections can be applied to any impurity density model. Given an originally calculated impurity density $\rho$, the corrected impurity density used in the simulation is $f*\rho+t$ where $f$ and $t$ are the scale and offset respectively.
Copy file name to clipboardExpand all lines: docs/src/tutorials/geant4_ssd_lit.jl
+19-22Lines changed: 19 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
# # Geant4 Support
2
2
3
3
# SolidStateDetectors.jl provides an extension for Geant4.jl.
4
-
#This extension allows to simulate realistic event distributions resulting from particles emitted by a given source, which can be used as input to the waveform simulation.
4
+
#The extension allows users to generate realistic event distributions resulting from particles emitted by a specified source, which could then in turn also be used as input for a waveform simulation.
5
5
#
6
6
# To use the extension, both `SolidStateDetectors` and `Geant4` have to be loaded.
7
7
8
8
using SolidStateDetectors
9
9
using Geant4
10
10
11
-
# In order to run `Geant4` simulations, a `Geant4.G4JLApplication` needs to be defined based on the detector geometry and the particle source.
12
-
# The extension features a function that creates a `Geant4.G4JLApplcation` from an SSD `Simulation` object and a particle source.
11
+
# In order to run Geant4 simulations, a `Geant4.G4JLApplication` needs to be defined, which needs to include both the detector geometry and the particle source.
12
+
# The extension features a function that creates a `Geant4.G4JLApplcation` object from a SSD `Simulation` object and a particle source.
13
13
14
14
using Plots
15
15
using Unitful
@@ -18,7 +18,7 @@ using Unitful
18
18
#
19
19
# #### 1. `MonoenergeticSource`
20
20
#
21
-
# This source emits particles of the same type and same energy.
21
+
# This source emits particles with a fixed type and energy.
# - The particle type is given as a string (e.g. `"e-"` or `"gamma"`) and directly passed to `Geant4`. See the `Geant4` documentation on how to name the desired particle type.
32
-
# - The energy of the emitted particles is passed as a number with unit.
32
+
# - The energy of the emitted particles is passed as a number with the required unit.
33
33
# - The `position` of the particle source relative to the origin is defined by a `CartesianPoint` (in units of `m`).
34
-
# - The source can emit particles in a given `direction` if a `CartesianVector` is provided.
35
-
# If not, the emission is isotropic.
36
-
# - If an `opening_angle` is provided, the source emits via a directed cone with the defined opening angle.
34
+
# - The source emits particles in a given `direction`, specified by a `CartesianVector` object. If the user provides no direction, the emission will be isotropic.
35
+
# - If an `opening_angle` is provided, the particles are emitted in a directed cone with the specified opening angle.
37
36
38
37
# #### 2. `IsotopeSource`
39
38
#
@@ -50,7 +49,7 @@ source_2 = IsotopeSource(
50
49
)
51
50
52
51
# The source is defined using
53
-
# - The number of protons `Z` and the number of nucleons `A` in the isotope. <br/>
52
+
# - The number of protons `Z` and the number of nucleons `A` in the isotope.
54
53
# - The excitation energy
55
54
# - The charge of the isotope
56
55
# - The position, direction and opening angle from the source can be defined in the same way as for a `MonoenergeticSource`
@@ -69,13 +68,12 @@ plot!(source_1)
69
68
70
69
# A `Geant4.G4JLApplication` is built from a SSD `Simulation` `sim` and one of the previously defined particle sources, e.g. `source_1`.
71
70
#
72
-
# Internally, a GDML file is created that is subsequently read in by `Geant4.jl`. <br/>
73
-
# If needed, the resulting GDML file can also be saved by using the `Geant4.G4JLDetector(sim, "output_filename.gdml")` command.
71
+
# Internally, the translated geometry description is written to a temporary GDML file. This file will in turn be read in by `Geant4.jl` and deleted afterwards. However, if needed, the resulting GDML file can also be saved by using the `Geant4.G4JLDetector(sim, "output_filename.gdml", save_gdml = true)` function.
#The method `run_geant4_simulation` is used to generate a given number of events.
76
+
#Having defined a `G4JLApplication`, it is now possible to generate events using the `run_geant4_simulation` function. The function will continue running until the desired number of energy depositions have been recorded.
0 commit comments