Commit ba6a877c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'mobilityDopingParam' into 'master'

Adding parameter to select n-dopant

See merge request allpix-squared/allpix-squared!1016
parents 7bd33c68 423dcba3
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -220,7 +220,23 @@ P_{c} &= 9.23\times 10^{16} \,\text{cm}^{-3}

for electrons and holes, respectively.

This model can be selected in the configuration file via the parameter `mobility_model = "masetti"`.
For arsenic as n-dopant, the electron mobility values differ and are taken from the same table as

```math
\begin{aligned}
\mu_{0,e}   &= 52.2 \,\text{cm}^2\,\text{V}^{-1}\,\text{s}^{-1} \\
\mu_{max,e} &= 1417 \,\text{cm}^2\,\text{V}^{-1}\,\text{s}^{-1} \cdot \left(T\ /\ 300 \,\text{K}\right)^{-2.5} \\
C_{r,e}     &= 9.68\times 10^{16} \,\text{cm}^{-3} \\
\alpha_{e}  &= 0.68 \\
\mu_{1,e}   &= 43.4 \,\text{cm}^2\,\text{V}^{-1}\,\text{s}^{-1} \\
C_{s,e}     &= 3.43\times 10^{20} \,\text{cm}^{-3} \\
\beta_{e}   &= 2.0 \\
\end{aligned}
```

This model can be selected in the configuration file via the parameter `mobility_model = "masetti"`, and the n-dopant can be 
selected via the parameter `dopant_n`. Possible values for the n-dopant are arsenic and phosphorus, with phosphorus being 
the default.

## Arora Model

@@ -276,7 +292,9 @@ The mobility is then parametrized using the two models as
where $`\mu_{m}(N)`$ is the mobility from the [Masetti model](#masetti-model) and $`v_m`$, $`\beta`$ are the respective
parameters from the [Canali model](#jacoboni-canali-model).

This model can be selected in the configuration file via the parameter `mobility_model = "masetti_canali"`.
This model can be selected in the configuration file via the parameter `mobility_model = "masetti_canali"`, and the n-dopant 
can be selected via the parameter `dopant_n`. Possible values for the n-dopant are arsenic and phosphorus, with phosphorus 
being the default.

## Ruch-Kino Model

+8 −0
Original line number Diff line number Diff line
@@ -51,6 +51,14 @@ namespace allpix {
        GALLIUM_NITRIDE,        ///< Gallium Nitride
    };

    /**
     * @brief Type of dopant
     */
    enum class Dopant {
        PHOSPHORUS = 0,
        ARSENIC,
    };

    /**
     * @ingroup DetectorModels
     * @brief Base of all detector models
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ This module requires an installation of Eigen3.

## Parameters
* `temperature` : Temperature of the sensitive device, used to estimate the diffusion constant and therefore the strength of the diffusion. Defaults to room temperature (293.15K).
* `mobility_model`: Charge carrier mobility model to be used for the propagation. Defaults to `jacoboni`, a list of available models can be found in the documentation.
* `mobility_model`: Charge carrier mobility model to be used for the propagation. Defaults to `jacoboni`, a list of available models can be found in the documentation. If the `masetti` or `masetti_canali` is used, the `dopant_n` parameter can be used to set the n-dopant to either phosphorus (default) or arsenic.
* `recombination_model`: Charge carrier lifetime model to be used for the propagation. Defaults to `none`, a list of available models can be found in the documentation. This feature requires a doping concentration to be present for the detector.
* `trapping_model`: Model for simulating charge carrier trapping from radiation-induced damage. Defaults to `none`, a list of available models can be found in the documentation. All models require explicitly setting a fluence parameter.
* `fluence`: 1MeV-neutron equivalent fluence the sensor has been exposed to.
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ module_ouput: "PropagatedCharge"
## Description
Simulates the transport of electrons and holes through the sensitive sensor volume of the detector. It allows to propagate sets of charge carriers together in order to speed up the simulation while maintaining the required accuracy. The propagation process for these sets is fully independent and no interaction is simulated. The maximum size of the set of propagated charges and thus the accuracy of the propagation can be controlled via the `charge_per_step` parameter. The maximum number of charge groups to be propagated for a single deposit position can be controlled via the `max_charge_groups` parameter.

The propagation consists of a combination of drift and diffusion simulation. The drift is calculated using the charge carrier velocity derived from the charge carrier mobility and the magnetic field via a calculation of the Lorentz drift. The mobility model can be chosen using the `mobility_model` parameter, and a list of available models can be found in the user manual.
The propagation consists of a combination of drift and diffusion simulation. The drift is calculated using the charge carrier velocity derived from the charge carrier mobility and the magnetic field via a calculation of the Lorentz drift. The mobility model can be chosen using the `mobility_model` parameter, and a list of available models can be found in the user manual. If the `masetti` or `masetti_canali` is used, the `dopant_n` parameter can be used to set the n-dopant to either phosphorus (default) or arsenic.
This module implements charge multiplication by impact ionization. The multiplication model can be chosen using the `multiplication_model` parameter, the list of available models can be found in the user manual. By default, the model defaults to `none` and impact ionization is switched off, generating unity gain.
To simulate impact ionization, the number of newly generated electron-hole pairs is calculated for every propagation step and every charge carrier in the group, based on drawing a random number from a geometric distribution. This represents a stepwise approach to the avalanche generation process. The charge of a charge group is increased by the number of impact ionization processes per step and opposite-type charge carriers are generated at the end of the step.

+18 −5
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ namespace allpix {
     */
    class Masetti : virtual public MobilityModel {
    public:
        Masetti(SensorMaterial material, double temperature, bool doping)
        Masetti(SensorMaterial material, double temperature, bool doping, Dopant dopant_n)
            : electron_mu0_(Units::get(68.5, "cm*cm/V/s")),
              electron_mumax_(Units::get(1414, "cm*cm/V/s") * std::pow(temperature / 300, -2.5)),
              electron_cr_(Units::get(9.20e16, "/cm/cm/cm")), electron_alpha_(0.711),
@@ -240,6 +240,16 @@ namespace allpix {
            if(!doping) {
                throw ModelUnsuitable("No doping profile available");
            }
            if(dopant_n == Dopant::ARSENIC) {
                LOG(INFO) << "Selected arsenic as n-dopant.";
                electron_mu0_ = Units::get(52.2, "cm*cm/V/s");
                electron_mumax_ = Units::get(1417, "cm*cm/V/s") * std::pow(temperature / 300, -2.5);
                electron_cr_ = Units::get(9.68e16, "/cm/cm/cm");
                electron_alpha_ = 0.68;
                electron_mu1_ = Units::get(43.4, "cm*cm/V/s");
                electron_cs_ = Units::get(3.43e20, "/cm/cm/cm");
                electron_beta_ = 2.0;
            }
            if(material != SensorMaterial::SILICON) {
                LOG(WARNING) << "Sensor material " << allpix::to_string(material) << " not valid for this model.";
            }
@@ -284,8 +294,9 @@ namespace allpix {
     */
    class MasettiCanali : public Canali, public Masetti {
    public:
        MasettiCanali(SensorMaterial material, double temperature, bool doping)
            : JacoboniCanali(material, temperature), Canali(material, temperature), Masetti(material, temperature, doping) {}
        MasettiCanali(SensorMaterial material, double temperature, bool doping, Dopant dopant_n)
            : JacoboniCanali(material, temperature), Canali(material, temperature),
              Masetti(material, temperature, doping, dopant_n) {}

        double operator()(const CarrierType& type, double efield_mag, double doping) const override {
            double masetti = Masetti::operator()(type, efield_mag, doping);
@@ -610,9 +621,11 @@ namespace allpix {
                } else if(model == "hamburg_highfield") {
                    model_ = std::make_unique<HamburgHighField>(material, temperature);
                } else if(model == "masetti") {
                    model_ = std::make_unique<Masetti>(material, temperature, doping);
                    model_ = std::make_unique<Masetti>(
                        material, temperature, doping, config.get<Dopant>("dopant_n", Dopant::PHOSPHORUS));
                } else if(model == "masetti_canali") {
                    model_ = std::make_unique<MasettiCanali>(material, temperature, doping);
                    model_ = std::make_unique<MasettiCanali>(
                        material, temperature, doping, config.get<Dopant>("dopant_n", Dopant::PHOSPHORUS));
                } else if(model == "arora") {
                    model_ = std::make_unique<Arora>(material, temperature, doping);
                } else if(model == "ruch_kino") {