Skip to content

fix a bug where the muon punch through simulation overestimate the number of punch-through particles

Tong Qiu requested to merge tqiu/athena:tong-mptbugfix into 23.0

The code uses lround to convert floats into integers when sampling from the CDF for the distribution of the number of punch-through particles. The float number describes the number of punch-through particles. A value between 0-1 should mean zero particles. Using lround will give us a 50% probability of having one particle when the number is between 0 to 1, so the simulation gives us more particles than expected.

The fix use int to select the integer closer to zero.

Merge request reports

Loading