Commit 3278a61d authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Removed `continue` for recombined and trapped charges in [GenericPropagation],...

Removed `continue` for recombined and trapped charges in [GenericPropagation], so that `PropagatedCharge` objects get created also in these cases.

This prevents loss of charge that should have been collected, but has been recombined inside the collection electrode.
parent dec4052e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -334,12 +334,10 @@ void GenericPropagationModule::run(Event* event) {
                if(output_plots_) {
                    recombination_time_histo_->Fill(static_cast<double>(Units::convert(time, "ns")), charge_per_step);
                }
                continue;
            } else if(state == CarrierState::TRAPPED) {
                LOG(DEBUG) << " Trapped " << charge_per_step << " at " << Units::display(final_position, {"mm", "um"})
                           << " in " << Units::display(time, "ns") << " time, removing";
                trapped_charges_count += charge_per_step;
                continue;
            }

            LOG(DEBUG) << " Propagated " << charge_per_step << " to " << Units::display(final_position, {"mm", "um"})