Small bugfix for ion energy from ionization and
random index
This commit is contained in:
@@ -45,6 +45,9 @@ InteractionOutput ElectronIonization::performInteraction(
|
|||||||
->driftVelocity(x_impact, particle.cylinderPosition())
|
->driftVelocity(x_impact, particle.cylinderPosition())
|
||||||
.cartesianEntries();
|
.cartesianEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v_target *= std::sqrt(target_->mass_kg()/ion_->mass_kg());
|
||||||
|
|
||||||
blitz::TinyVector<double, 3> v_laboratory = kinematic::velocityTargetFixed(
|
blitz::TinyVector<double, 3> v_laboratory = kinematic::velocityTargetFixed(
|
||||||
v_impact, target_velocity_.cartesianEntries(), particle.mass_kg(), target_->mass_kg()
|
v_impact, target_velocity_.cartesianEntries(), particle.mass_kg(), target_->mass_kg()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void RandomIndex::reshuffle(std::mt19937* engine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RandomIndex::visited_all() {
|
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
|
// return the next index in the shuffled index vector. Returns the last
|
||||||
|
|||||||
Reference in New Issue
Block a user