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

InducedTransfer: prevent using with transient propagation info

parent a966231c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -55,6 +55,12 @@ void InducedTransferModule::run(Event* event) {
    std::map<Pixel::Index, std::vector<std::pair<double, const PropagatedCharge*>>> pixel_map;
    for(const auto& propagated_charge : propagated_message->getData()) {

        // Make sure we're not double-counting by adding induced current information to an existing pulse:
        if(!propagated_charge.getPulses().empty()) {
            throw ModuleError(
                "Received pulse information - this module should not be used with transient information available");
        }

        // Make sure both electrons and holes are present in the input data
        if(propagated_charge.getType() == CarrierType::ELECTRON) {
            found_electrons = true;