Loading src/modules/GenericPropagation/GenericPropagationModule.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -750,8 +750,8 @@ GenericPropagationModule::propagate(const ROOT::Math::XYZPoint& pos, return diffusion; }; // Survival probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> survival(0, 1); // Survival or detrap probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> probability_distribution(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 = Loading Loading @@ -831,11 +831,12 @@ GenericPropagationModule::propagate(const ROOT::Math::XYZPoint& pos, // Check if charge carrier is still alive: is_alive = !recombination_(type, detector_->getDopingConcentration(static_cast<ROOT::Math::XYZPoint>(position)), survival(random_generator), probability_distribution(random_generator), timestep); // Check if the charge carrier has been trapped: auto [trapped, traptime] = trapping_(type, survival(random_generator), timestep, std::sqrt(efield.Mag2())); auto [trapped, traptime] = trapping_(type, probability_distribution(random_generator), timestep, std::sqrt(efield.Mag2())); if(trapped) { if((initial_time + runge_kutta.getTime() + traptime) < integration_time_) { // De-trap and advance in time if still below integration time Loading src/modules/TransientPropagation/TransientPropagationModule.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ TransientPropagationModule::propagate(Event* event, }; // Survival probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> survival(0, 1); allpix::uniform_real_distribution<double> probability_distribution(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 = Loading Loading @@ -359,11 +359,12 @@ TransientPropagationModule::propagate(Event* event, // Check if charge carrier is still alive: is_alive = !recombination_(type, detector_->getDopingConcentration(static_cast<ROOT::Math::XYZPoint>(position)), survival(event->getRandomEngine()), probability_distribution(event->getRandomEngine()), timestep_); // Check if the charge carrier has been trapped: auto [trapped, traptime] = trapping_(type, survival(event->getRandomEngine()), timestep_, std::sqrt(efield.Mag2())); auto [trapped, traptime] = trapping_(type, probability_distribution(event->getRandomEngine()), timestep_, std::sqrt(efield.Mag2())); if(trapped) { if((initial_time + runge_kutta.getTime() + traptime) < integration_time_) { // De-trap and advance in time if still below integration time Loading Loading
src/modules/GenericPropagation/GenericPropagationModule.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -750,8 +750,8 @@ GenericPropagationModule::propagate(const ROOT::Math::XYZPoint& pos, return diffusion; }; // Survival probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> survival(0, 1); // Survival or detrap probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> probability_distribution(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 = Loading Loading @@ -831,11 +831,12 @@ GenericPropagationModule::propagate(const ROOT::Math::XYZPoint& pos, // Check if charge carrier is still alive: is_alive = !recombination_(type, detector_->getDopingConcentration(static_cast<ROOT::Math::XYZPoint>(position)), survival(random_generator), probability_distribution(random_generator), timestep); // Check if the charge carrier has been trapped: auto [trapped, traptime] = trapping_(type, survival(random_generator), timestep, std::sqrt(efield.Mag2())); auto [trapped, traptime] = trapping_(type, probability_distribution(random_generator), timestep, std::sqrt(efield.Mag2())); if(trapped) { if((initial_time + runge_kutta.getTime() + traptime) < integration_time_) { // De-trap and advance in time if still below integration time Loading
src/modules/TransientPropagation/TransientPropagationModule.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ TransientPropagationModule::propagate(Event* event, }; // Survival probability of this charge carrier package, evaluated at every step allpix::uniform_real_distribution<double> survival(0, 1); allpix::uniform_real_distribution<double> probability_distribution(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 = Loading Loading @@ -359,11 +359,12 @@ TransientPropagationModule::propagate(Event* event, // Check if charge carrier is still alive: is_alive = !recombination_(type, detector_->getDopingConcentration(static_cast<ROOT::Math::XYZPoint>(position)), survival(event->getRandomEngine()), probability_distribution(event->getRandomEngine()), timestep_); // Check if the charge carrier has been trapped: auto [trapped, traptime] = trapping_(type, survival(event->getRandomEngine()), timestep_, std::sqrt(efield.Mag2())); auto [trapped, traptime] = trapping_(type, probability_distribution(event->getRandomEngine()), timestep_, std::sqrt(efield.Mag2())); if(trapped) { if((initial_time + runge_kutta.getTime() + traptime) < integration_time_) { // De-trap and advance in time if still below integration time Loading