fix alpha limiting
This commit is contained in:
@@ -37,8 +37,10 @@ VelocityDistributionFromDensityField::VelocityDistributionFromDensityField(
|
||||
pitchAngleBinBorders_(density_field->pitchAngleBinning()->binBorders()),
|
||||
theta_distribution_(std::uniform_real_distribution<double>(0.,1.)),
|
||||
mass_kg_(mass_kg) {
|
||||
alpha_lower_limit = -300/std::log10(energyBinBorders_.front());
|
||||
alpha_upper_limit = 300/std::log10(energyBinBorders_.back());
|
||||
double maxAbsExponent = std::max(std::abs(std::log10(energyBinBorders_.front())),
|
||||
std::abs(std::log10(energyBinBorders_.back())));
|
||||
alpha_lower_limit = -300/maxAbsExponent;
|
||||
alpha_upper_limit = 300/maxAbsExponent;
|
||||
// necessary to include the underflow bin in the energy domain
|
||||
energyBinBorders_.insert(energyBinBorders_.begin(), 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user