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

Distributions: use our own uniform_real_ditribution (via boost)

(cherry picked from commit 365c83bd)
parent 7887851a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ GenericPropagationModule::propagate(const ROOT::Math::XYZPoint& pos,
    };

    // Survival probability of this charge carrier package, evaluated at every step
    std::uniform_real_distribution<double> survival(0, 1);
    allpix::uniform_real_distribution<double> survival(0, 1);

    // Define lambda functions to compute the charge carrier velocity with or without magnetic field
    std::function<Eigen::Vector3d(double, const Eigen::Vector3d&)> carrier_velocity_noB =
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ void ProjectionPropagationModule::run(Event* event) {
            LOG(TRACE) << "Diffusion width is " << Units::display(diffusion_std_dev, "um");

            // Check if charge carrier is still alive via its survival probability, evaluated once
            std::uniform_real_distribution<double> survival(0, 1);
            allpix::uniform_real_distribution<double> survival(0, 1);
            if(recombination_(
                   type, detector_->getDopingConcentration(position), survival(event->getRandomEngine()), drift_time)) {
                LOG(DEBUG) << "Recombined " << charge_per_step << " charge carriers (" << type << ") at "
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ TransientPropagationModule::propagate(Event* event,
    };

    // Survival probability of this charge carrier package, evaluated at every step
    std::uniform_real_distribution<double> survival(0, 1);
    allpix::uniform_real_distribution<double> survival(0, 1);

    // Define lambda functions to compute the charge carrier velocity with or without magnetic field
    std::function<Eigen::Vector3d(double, const Eigen::Vector3d&)> carrier_velocity_noB =