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

PulseTransfer: add test for ancestors being passed correctly

parent 679719ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -204,11 +204,11 @@ void PulseTransferModule::run(Event* event) {
        if(output_pulsegraphs_) {
            create_pulsegraphs(event->number, index, pulse);
        }
        LOG(DEBUG) << "Charge on pixel " << index << " has " << pixel_charge_map[index].size() << " ancestors";

        // Store the pulse:
        std::vector<const PropagatedCharge*> pixel_charge_vec(pixel_charge_map[index].begin(),
                                                              pixel_charge_map[index].end());
        LOG(DEBUG) << "Charge on pixel " << index << " has " << pixel_charge_vec.size() << " ancestors";
        pixel_charges.emplace_back(detector_->getPixel(index), std::move(pulse), std::move(pixel_charge_vec));
    }

+30 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2017-2022 CERN and the Allpix Squared authors
# SPDX-License-Identifier: MIT

#DESC tests the calculation of induced signals based on the arrival time of charge carriers at the sensor surface.
[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 = 20

[ElectricFieldReader]
model = "linear"
bias_voltage = 100V
depletion_voltage = 150V

[GenericPropagation]
temperature = 293K
charge_per_step = 1
propagate_electrons = false
propagate_holes = true

[PulseTransfer]
log_level = TRACE

#PASS [R:PulseTransfer:mydetector] Charge on pixel (2,0) has 15 ancestors