Changed distance drawing procedure;
Changed mover to work with times instead of distance; Changed how interactions are done (recombination still tbd)
This commit is contained in:
@@ -35,22 +35,26 @@ InteractionOutput ElectronIonization::performInteraction(
|
||||
particle.velocity().cartesianEntries();
|
||||
const auto x_impact = particle.position();
|
||||
|
||||
blitz::TinyVector<double, 3> v_target;
|
||||
blitz::TinyVector<double, 3> v_laboratory;
|
||||
double E_impact;
|
||||
do {
|
||||
v_target =
|
||||
target_->driftVelocity()->driftVelocity(x_impact).cartesianEntries() +
|
||||
target_->velocityDistibution()
|
||||
->rollVelocity(x_impact, generator->engine())
|
||||
.cartesianEntries();
|
||||
// blitz::TinyVector<double, 3> v_target;
|
||||
blitz::TinyVector<double, 3> v_laboratory = kinematic::velocityTargetFixed(
|
||||
v_impact, target_velocity_.cartesianEntries(), particle.mass_kg(), target_->mass_kg()
|
||||
);
|
||||
|
||||
v_laboratory = kinematic::velocityTargetFixed(
|
||||
v_impact, v_target, particle.mass_kg(), target_->mass_kg());
|
||||
double E_impact = kinematic::kineticEnergy(v_laboratory, particle.mass_kg()) *
|
||||
UnitConversion::JouleToeV;
|
||||
// do {
|
||||
// v_target =
|
||||
// target_->driftVelocity()->driftVelocity(x_impact).cartesianEntries() +
|
||||
// target_->velocityDistribution()
|
||||
// ->rollVelocity(x_impact, generator->engine())
|
||||
// .cartesianEntries();
|
||||
|
||||
E_impact = kinematic::kineticEnergy(v_laboratory, particle.mass_kg()) *
|
||||
UnitConversion::JouleToeV;
|
||||
} while (E_impact <= ionization_energy_eV_);
|
||||
// v_laboratory = kinematic::velocityTargetFixed(
|
||||
// v_impact, v_target, particle.mass_kg(), target_->mass_kg());
|
||||
|
||||
// E_impact = kinematic::kineticEnergy(v_laboratory, particle.mass_kg()) *
|
||||
// UnitConversion::JouleToeV;
|
||||
// } while (E_impact <= ionization_energy_eV_);
|
||||
|
||||
const double E_impact_new =
|
||||
energy_distribution_->rollImpactParticleEnergyAfterCollision(E_impact,
|
||||
@@ -83,13 +87,13 @@ InteractionOutput ElectronIonization::performInteraction(
|
||||
kinematic::rotateVector(v_lab_norm, azimuth_angle_impact_new,
|
||||
polar_angle_impact_new) *
|
||||
v_lab_impact_new +
|
||||
v_target;
|
||||
target_velocity_.cartesianEntries();
|
||||
|
||||
const blitz::TinyVector<double, 3> v_ejected =
|
||||
kinematic::rotateVector(v_lab_norm, azimuth_angle_ejected,
|
||||
polar_angle_ejected) *
|
||||
v_lab_ejected +
|
||||
v_target;
|
||||
target_velocity_.cartesianEntries();
|
||||
|
||||
particle.velocity(v_impact_new);
|
||||
|
||||
@@ -101,7 +105,7 @@ InteractionOutput ElectronIonization::performInteraction(
|
||||
output.add(
|
||||
particle::Particle(electron_, x_impact, CartesianVector(v_ejected),
|
||||
time_birth, weight_parent));
|
||||
output.add(particle::Particle(ion_, x_impact, CartesianVector(v_target),
|
||||
output.add(particle::Particle(ion_, x_impact, target_velocity_,
|
||||
time_birth, weight_parent));
|
||||
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user