Commit 77ad15e3 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'tidyCSAdigi' into 'master'

Removed extraneous if-statement in [CSADigitizer]

See merge request allpix-squared/allpix-squared!1047
parents e6609494 c2175cca
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -275,10 +275,8 @@ void CSADigitizerModule::run(Event* event) {
            // -> no point to start i at 0, start from jmin:
            size_t jmin = (k >= pulse.size() - 1) ? k - (pulse.size() - 1) : 0;
            for(size_t i = jmin; i <= k; ++i) {
                if((k - i) < pulse.size()) {
                outsum += pulse.at(k - i) * impulse_response_function_.at(i);
            }
            }
            amplified_pulse.addCharge(outsum, timestep * static_cast<double>(k));
        }

+7 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ module_outputs: ["PixelHit"]
Digitization module which translates the collected charges into a digitized signal, emulating a charge sensitive amplifier with Krummenacher feedback.
For this purpose, a transfer function for a CSA with Krummenacher feedback is taken from \[[@kleczek]\]:
```math
H(s) = \frac{R_f}{(1+ \tau_f s) * (1 + \tau_r s)},
H(s) = \frac{R_f}{(1 + \tau_f s) \cdot (1 + \tau_r s)},
```
with fall time constant
```math
@@ -22,9 +22,13 @@ with fall time constant
```
and rise time constant
```math
\tau_r = \frac{C_{det} * C_{out}}{g_m * C_f}
\tau_r = \frac{C_{det} \cdot C_{out}}{g_m \cdot C_f}
```
The impulse response function of this transfer function is convoluted with the charge pulse. In the time domain, the impulse response function can be written as

```math
\mathcal{L}^{-1}(H) = R_f \left( \frac{e^{-t/\tau_f}}{\tau_f - \tau_r} - \frac{e^{-t/\tau_r}}{\tau_f - \tau_r} \right).
```
The impulse response function of this transfer function is convoluted with the charge pulse.
This module can be steered by either providing all contributions to the transfer function as parameters within the `csa` model, or using a simplified parametrization providing rise time and feedback time.
In the latter case, the parameters are used to derive the contributions to the transfer function (see e.g. \[[@binkley]\] for calculation of transconductance).