Skip to content
Snippets Groups Projects
Commit 79911cee authored by Davide Gerbaudo's avatar Davide Gerbaudo
Browse files

Merge branch 'cherry-pick-f77f6429' into '21.1'

Merge branch 'ether.GeoModelKernel-20170327' into '21.1'

See merge request !2449
parents de48cbce 94a70fd9
No related merge requests found
......@@ -29,6 +29,7 @@
#include <cfloat>
#include <iostream>
#include <algorithm>
#include <iterator>
//## end module%3CD878BB0006.includes
......@@ -379,7 +380,10 @@ void GeoMaterial::lock ()
int iZ = (int) (m_element[e]->getZ () + 0.5) - 1; // Atomic number index
dEDxConstant += w * C0 * dovera * Z;
dEDxI0 += w * s_ionizationPotential[iZ];
// Make sure we don't overflow the table:
// the `Ether' special `element' has Z set to 500.
if (iZ >= 0 && iZ < (std::end(s_ionizationPotential)-std::begin(s_ionizationPotential)))
dEDxI0 += w * s_ionizationPotential[iZ];
NILinv += n * pow (N, 2.0 / 3.0) * CLHEP::amu * inv_lambda0;
double nAtomsPerVolume = A ? CLHEP::Avogadro*m_density*m_fraction[e]/A : 0.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment