Commit 3589de75 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'transient_tests' into 'master'

TransientPropagation: Add Tests

See merge request allpix-squared/allpix-squared!966
parents a6ac81b0 33b6a72b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@ ALLPIX_DETECTOR_MODULE(MODULE_NAME)
# Add source files to library
ALLPIX_MODULE_SOURCES(${MODULE_NAME} TransientPropagationModule.cpp)

# Register module tests
ALLPIX_MODULE_TESTS(${MODULE_NAME} "tests")

# Eigen is required for Runge-Kutta propagation
PKG_CHECK_MODULES(Eigen3 REQUIRED IMPORTED_TARGET eigen3)

+4 −0
Original line number Diff line number Diff line
@@ -397,6 +397,10 @@ void TransientPropagationModule::run(Event* event) {
        }
    }

    LOG(INFO) << "Propagated " << propagated_charges_count << " charges" << std::endl
              << "Recombined " << recombined_charges_count << " charges during transport" << std::endl
              << "Trapped " << trapped_charges_count << " charges during transport";

    if(output_plots_) {
        auto total = (propagated_charges_count + recombined_charges_count + trapped_charges_count);
        recombine_histo_->Fill(static_cast<double>(recombined_charges_count) / (total == 0 ? 1 : total));
+28 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2023 CERN and the Allpix Squared authors
# SPDX-License-Identifier: MIT

#DESC uses the Runge-Kutta-Fehlberg integration of the equations of motion implemented in the drift-diffusion model to propagate the charge carriers to the implants. The total induced charge is monitored.
detectors_file = "detector.conf"
number_of_events = 1
random_seed = 0

[DepositionPointCharge]
model = "fixed"
source_type = "point"
position = 445um 220um 0um
number_of_charges = 20

# We use a custom field here to not trigger the warning about linear fields being inappropriate
[ElectricFieldReader]
model = "custom"
field_function = "[0]*z + [1]"
field_parameters = -3750V/cm/cm, -1000V/cm

[WeightingPotentialReader]
model = pad

[TransientPropagation]
log_level = TRACE
temperature = 293K

#PASS Propagated 10 to (447.214um,205.871um,200um) in 12.69ns time, induced 12e, final state: halted
+34 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2023 CERN and the Allpix Squared authors
# SPDX-License-Identifier: MIT

#DESC uses the Runge-Kutta-Fehlberg integration of the equations of motion implemented in the drift-diffusion model to propagate the charge carriers to the implants under the influence of a constant magnetic field. The monitored output comprises the total number of charges moved, the number of integration steps taken and the simulated propagation time.
[Allpix]
detectors_file = "detector.conf"
number_of_events = 1
random_seed = 0

[MagneticFieldReader]
log_level = INFO
model = "constant"
magnetic_field = 500mT 2T 0

[DepositionPointCharge]
model = "fixed"
source_type = "point"
position = 445um 220um 0um
number_of_charges = 20

# We use a custom field here to not trigger the warning about linear fields being inappropriate
[ElectricFieldReader]
model = "custom"
field_function = "[0]*z + [1]"
field_parameters = -3750V/cm/cm, -1000V/cm

[WeightingPotentialReader]
model = pad

[TransientPropagation]
log_level = TRACE
temperature = 293K

#PASS [R:TransientPropagation:mydetector]  Propagated 10 to (507.281um,189.926um,200um) in 13.94ns time, induced 12e, final state: halted
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2023 CERN and the Allpix Squared authors
# SPDX-License-Identifier: MIT

#DESC test recombination of charge carriers during drift
[Allpix]
detectors_file = "detector.conf"
number_of_events = 1
random_seed = 0

[DepositionPointCharge]
model = "fixed"
source_type = "point"
position = 445um 220um 0um
number_of_charges = 1

[DopingProfileReader]
log_level = DEBUG
model = "constant"
doping_concentration = 30000000000000000

# We use a custom field here to not trigger the warning about linear fields being inappropriate
[ElectricFieldReader]
model = "custom"
field_function = "[0]*z + [1]"
field_parameters = -3750V/cm/cm, -1000V/cm

[WeightingPotentialReader]
model = pad

[TransientPropagation]
log_level = INFO
temperature = 293K
charge_per_step = 1
max_charge_groups = 0
recombination_model = "srh_auger"

#PASS Recombined 2 charges during transport
Loading