Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Resolve "Bethe-Bloch threshold"

Merged ext-calvo_p requested to merge 83-bethe-bloch-threshold into master
All threads resolved!
3 files
+ 21
10
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -91,7 +91,8 @@ namespace {
CollimatorPhysics::CollimatorPhysics(const std::string &name,
ElementBase *element,
std::string &material,
bool enableRutherford):
bool enableRutherford,
double lowEnergyThr):
ParticleMatterInteractionHandler(name, element),
T_m(0.0),
dT_m(0.0),
@@ -113,7 +114,8 @@ CollimatorPhysics::CollimatorPhysics(const std::string &name,
Eavg_m(0.0),
Emax_m(0.0),
Emin_m(0.0),
enableRutherford_m(enableRutherford)
enableRutherford_m(enableRutherford),
lowEnergyThr_m(lowEnergyThr)
{
gsl_rng_env_setup();
@@ -339,7 +341,7 @@ bool CollimatorPhysics::computeEnergyLoss(Vector_t &P,
beta = std::sqrt(1.0 - 1.0 / std::pow(gamma, 2));
P = gamma * beta * P / euclidean_norm(P);
bool stopped = (Ekin < 10 || dEdx > 0);
bool stopped = (Ekin < lowEnergyThr_m * GeV2keV || dEdx > 0);
return stopped;
}
Loading