[no commit message]

This commit is contained in:
Darksnake 2013-07-11 15:55:13 +04:00
parent c57cbc39c4
commit 95e1bd0017
2 changed files with 3 additions and 33 deletions

View File

@ -75,10 +75,6 @@ public class ElectronTrappingSimulator {
//Вычисляем сечения и нормируем их на полное сечение
// double sigmaTotal = Scatter.sigmaTotal(E);
// double sigmaIon = Scatter.sigmaion(E) / sigmaTotal;
// double sigmaEl = Scatter.sigmael(E) / sigmaTotal;
// double sigmaexc = Scatter.sigmaexc(E) / sigmaTotal;
double sigmaIon = Scatter.sigmaion(E);
double sigmaEl = Scatter.sigmael(E);
double sigmaexc = Scatter.sigmaexc(E);
@ -104,17 +100,6 @@ public class ElectronTrappingSimulator {
Scatter.randomel(E, dE, dTheta);
}
// if (alpha < sigmaEl) {
// Scatter.randomel(E, dE, dTheta);
// } else if (alpha < sigmaexc) {
// Scatter.randomexc(E, dE, dTheta);
// } else {
// Scatter.randomion(E, dE, dTheta);
// }
//Обновляем значени угла и энергии независимо ни от чего
E -= dE.getValue();
//Изменение угла
@ -163,7 +148,7 @@ public class ElectronTrappingSimulator {
SphericalCoordinates init = new SphericalCoordinates(1, 0, theta+dTheta);
// Задаем вращение относительно оси, перпендикулярной исходному вектору
SphericalCoordinates rotate = new SphericalCoordinates(1, 0, theta);
// поворачиваем исходный вектора на dTheta
// поворачиваем исходный вектор на dTheta
Rotation rot = new Rotation(rotate.getCartesian(), phi);
Vector3D result = rot.applyTo(init.getCartesian());
@ -214,20 +199,6 @@ public class ElectronTrappingSimulator {
return Math.acos(x);
}
// /**
// * Генерируем случайный угол таким образом, чтобы электрон заведомо был
// * траппинговый
// *
// * @return
// */
// public double getRandomTrappedTheta() {
// double res = 0;
// while (res < this.thetaTransport) {
// res = this.getRandomTheta();
//
// }
// return res;
// }
public class SimulaionResult {
public SimulaionResult(EndState state, double E, double theta, int collisionNumber) {

View File

@ -31,7 +31,7 @@ public class Trapping {
int rejected = 0;
int lowE = 0;
ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 100000);
ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 500000);
for (Iterator<ElectronTrappingSimulator.SimulaionResult> it = results.iterator(); it.hasNext();) {
ElectronTrappingSimulator.SimulaionResult res = it.next();
@ -63,7 +63,6 @@ public class Trapping {
System.out.printf("The spectrometer acceptance angle is %g.%n", simulator.thetaPinch * 180 / Math.PI);
System.out.printf("The transport mirroring angle is %g.%n", simulator.thetaTransport * 180 / Math.PI);
System.out.printf("The spectrometer acceptance angle is %g.%n", simulator.thetaPinch * 180 / Math.PI);
System.out.printf("The starting energy is %g.%n", E);
System.out.printf("The lower energy boundary is %g.%n%n", simulator.Elow);
@ -73,11 +72,11 @@ public class Trapping {
System.out.printf("The total number of LOWENERGY events is %d.%n%n", lowE);
if (out != null) {
out.println();
out.printf("The total number of events is %d.%n%n", results.size());
out.printf("The spectrometer acceptance angle is %g.%n", simulator.thetaPinch * 180 / Math.PI);
out.printf("The transport mirroring angle is %g.%n", simulator.thetaTransport * 180 / Math.PI);
out.printf("The spectrometer acceptance angle is %g.%n", simulator.thetaPinch * 180 / Math.PI);
out.printf("The starting energy is %g.%n", E);
out.printf("The lower energy boundary is %g.%n%n", simulator.Elow);