From 5ac1a9d6136083f2b3c06517d71533a146422072 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 8 Dec 2015 15:41:09 +0100 Subject: [PATCH] Leave density functions unmodified - this simplifies debugging and is also a bit faster --- include/hep/mc/multi_channel.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hep/mc/multi_channel.hpp b/include/hep/mc/multi_channel.hpp index 6602082..2b8e04b 100644 --- a/include/hep/mc/multi_channel.hpp +++ b/include/hep/mc/multi_channel.hpp @@ -118,10 +118,11 @@ inline multi_channel_result multi_channel_iteration( T total_density = T(); for (std::size_t j = 0; j != channels; ++j) { - channel_densities[j] /= weight; total_density += channel_weights[j] * channel_densities[j]; } + total_density /= weight; + multi_channel_point2::type> const point(total_calls, random_numbers, coordinates, channel, total_density, densities);