Skip to content

Commit

Permalink
Leave density functions unmodified
Browse files Browse the repository at this point in the history
- this simplifies debugging and is also a bit faster
  • Loading branch information
cschwan committed Dec 21, 2015
1 parent 051a464 commit 5ac1a9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/hep/mc/multi_channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ inline multi_channel_result<T> 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<T, typename std::remove_reference<D>::type> const
point(total_calls, random_numbers, coordinates, channel,
total_density, densities);
Expand Down

0 comments on commit 5ac1a9d

Please sign in to comment.