Small bugfix for ion energy from ionization and

random index
This commit is contained in:
2025-06-23 13:30:22 +02:00
parent 249fbfc275
commit d06d805465
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -45,6 +45,9 @@ InteractionOutput ElectronIonization::performInteraction(
->driftVelocity(x_impact, particle.cylinderPosition())
.cartesianEntries();
}
v_target *= std::sqrt(target_->mass_kg()/ion_->mass_kg());
blitz::TinyVector<double, 3> v_laboratory = kinematic::velocityTargetFixed(
v_impact, target_velocity_.cartesianEntries(), particle.mass_kg(), target_->mass_kg()
);
+1 -1
View File
@@ -40,7 +40,7 @@ void RandomIndex::reshuffle(std::mt19937* engine) {
}
bool RandomIndex::visited_all() {
return current_index_in_vector_ == total_bin_number_ - 1;
return current_index_in_vector_ == total_bin_number_;
}
// return the next index in the shuffled index vector. Returns the last