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