Commit 84e8fcff authored by Paul Schütze's avatar Paul Schütze
Browse files

ImpIoni: change wording in comment

parent f9450f99
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -605,7 +605,7 @@ GenericPropagationModule::propagate(Event* event,
                       << Units::display(std::sqrt(last_efield.Mag2()), "kV/cm") << " to "
                       << Units::display(std::sqrt(efield.Mag2()), "kV/cm");

            // For each charge carrier draw a number from a geometric distribution (Yule process) to determine the number of
            // For each charge carrier draw a number to determine the number of
            // secondaries generated in this step
            double log_prob = 1. / std::log1p(-1. / local_gain);
            for(unsigned int i_carrier = 0; i_carrier < charge; ++i_carrier) {
+3 −2
Original line number Diff line number Diff line
@@ -629,11 +629,12 @@ TransientPropagationModule::propagate(Event* event,
                       << Units::display(std::sqrt(last_efield.Mag2()), "kV/cm") << " to "
                       << Units::display(std::sqrt(efield.Mag2()), "kV/cm");

            // For each charge carrier draw a number from a geometric distribution (Yule process) to determine the number of
            // For each charge carrier draw a number to determine the number of
            // secondaries generated in this step
            double log_prob = 1. / std::log1p(-1. / local_gain);
            for(unsigned int i_carrier = 0; i_carrier < charge; ++i_carrier) {
                n_secondaries += static_cast<unsigned int>(std::log(uniform_distribution(event->getRandomEngine())) * log_prob);
                n_secondaries +=
                    static_cast<unsigned int>(std::log(uniform_distribution(event->getRandomEngine())) * log_prob);
            }
            if(n_secondaries != 0) {
                // Generate new charge carriers of the opposite type