gov.nist.microanalysis.NISTMonte
Class MonteCarloSS.Electron

java.lang.Object
  extended by gov.nist.microanalysis.NISTMonte.MonteCarloSS.Electron
Enclosing class:
MonteCarloSS

public static final class MonteCarloSS.Electron
extends java.lang.Object

This class handles the geometric considerations tracking an electron through Monte Carlo steps. Storing the geometric considerations for each electron independently may facilitate adding support for fast secondary electrons if desired.


Constructor Summary
MonteCarloSS.Electron(double[] initialPos, double kE)
          Electron - Construct an electron with the specified initial position and kinetic energy.
MonteCarloSS.Electron(double[] initialPos, double phi, double theta, double kE)
          Constructs a Electron at the initial position specified with motion in the direction specified by phi & theta and a kinetic energy of kE.
MonteCarloSS.Electron(MonteCarloSS.Electron parent, double phi, double theta, double kE)
          Constructs an Electron that starts its trajectory from the location of the specified parent electron with motion in the direction specified by phi & theta and a kinetic energy of kE.
 
Method Summary
 double[] candidatePoint(double alpha, double beta, double dS)
          candidatePoint - Computes the location of the next point assuming that the electron's current trajectory is deviated by angles alpha and beta and the step length is dS.
 MonteCarloSS.Region getCurrentRegion()
           
 double getEnergy()
          getEnergy - Returns the current kinetic energy of the electon in Joules.
 double[] getPosition()
          getPosition - Get the current position of the electron as a array of three doubles (x,y & z)
 MonteCarloSS.Region getPreviousRegion()
           
 double[] getPrevPosition()
          getPrevPosition - Get the previous position of the electron as a array of three doubles (x,y & z)
 int getStepCount()
          getStepCount - Gets the count of the number of steps since the trajectory began.
 void setDirection(double phi, double theta)
          setDirection - Permits changing the initial direction of the electron.
 double stepLength()
          stepLength - Gets the length of the step between the start of the step and the end of the step.
 void updatePosition(double[] newPoint, double dE)
          updatePosition - Update the position and energy of the electron to the specified point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonteCarloSS.Electron

public MonteCarloSS.Electron(double[] initialPos,
                             double kE)
Electron - Construct an electron with the specified initial position and kinetic energy.

Parameters:
initialPos - double[]
kE - double - Electron kinetic energy in Joules

MonteCarloSS.Electron

public MonteCarloSS.Electron(double[] initialPos,
                             double phi,
                             double theta,
                             double kE)
Constructs a Electron at the initial position specified with motion in the direction specified by phi & theta and a kinetic energy of kE. Phi is the angle measured from the z-axis and theta is the angle measured from x-axis.

Parameters:
initialPos -
phi -
theta -
kE -

MonteCarloSS.Electron

public MonteCarloSS.Electron(MonteCarloSS.Electron parent,
                             double phi,
                             double theta,
                             double kE)
Constructs an Electron that starts its trajectory from the location of the specified parent electron with motion in the direction specified by phi & theta and a kinetic energy of kE. Phi is the angle measured from the z-axis and theta is the angle measured from x-axis.

Parameters:
parent -
phi -
theta -
kE -
Method Detail

setDirection

public void setDirection(double phi,
                         double theta)
setDirection - Permits changing the initial direction of the electron. Normally phi=0 and theta=0 at t=0. Alternatively, phi=Math.PI, theta=0 would produce a trajectory down the z-axis.

Parameters:
phi - double - In radians
theta - double - In radians

getPosition

public double[] getPosition()
getPosition - Get the current position of the electron as a array of three doubles (x,y & z)

Returns:
double[]

getPrevPosition

public double[] getPrevPosition()
getPrevPosition - Get the previous position of the electron as a array of three doubles (x,y & z)

Returns:
double[]

getCurrentRegion

public MonteCarloSS.Region getCurrentRegion()

getPreviousRegion

public MonteCarloSS.Region getPreviousRegion()

getEnergy

public double getEnergy()
getEnergy - Returns the current kinetic energy of the electon in Joules.

Returns:
double

getStepCount

public int getStepCount()
getStepCount - Gets the count of the number of steps since the trajectory began.

Returns:
int

stepLength

public double stepLength()
stepLength - Gets the length of the step between the start of the step and the end of the step. This varies as the electron energy varies and as the material changes.

Returns:
double

candidatePoint

public double[] candidatePoint(double alpha,
                               double beta,
                               double dS)
candidatePoint - Computes the location of the next point assuming that the electron's current trajectory is deviated by angles alpha and beta and the step length is dS. It is called a candidate point because the point is not necessarily in the same material as the current point. If the candidate point is not in the same material then the actual step will be foreshortened at the interface between the two materials.. (The foreshortening is handled by the Region class.)

Parameters:
alpha - double - The scattering zenith angle
beta - double - The scattering azimuthal angle (Randomly distibuted from [0,2 pi)
dS - double
Returns:
double []

updatePosition

public void updatePosition(double[] newPoint,
                           double dE)
updatePosition - Update the position and energy of the electron to the specified point. The new point is the point returned by the candidatePoint unless the trajectory takes the electron between materials. In this case, the new point is the location of the interface between the two materials. The eE depends upon the material and the step length. The electrons kinetic energy is decreased by the amount dE.

Parameters:
newPoint - double[]
dE - double - in Joules