gov.nist.microanalysis.NISTMonte
Class AnnularDetector

java.lang.Object
  extended by gov.nist.microanalysis.NISTMonte.AnnularDetector
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class AnnularDetector
extends java.lang.Object
implements java.awt.event.ActionListener

A software implementation of an annular detector such as might be found on an idealized AEM. The detector is constructed from a series of annular rings. The total radius of the detector, a center point, a surface normal and the ring count define the detector. The detector must be placed within the chamber region but outside of the sample.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Company: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas W. M. Ritchie

Constructor Summary
AnnularDetector(double radius, int nRings, double[] center, double[] normal)
          AnnularDetector - Construct an annular detector of the specified total radius which is subdivided into nRing equal width rings detectors.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
           
 int detectedElectronCount(int ring)
          detectedElectronCount - The number of electron trajectories that were detected by the specified ring.
 void dump(java.io.Writer wr)
          dump - Writes a summary of the results collected by this detector.
 double innerRadius(int ring)
          innerRadius - The inner radius of the specified ring.
 boolean isTopOnly()
          Determines whether the detector accepts electrons only anti-parallel to the normal (front of the detector) or also parallel (back of the detector)
 int numberOfRings()
          numberOfRings - The number of rings into which the detector is divided.
 double outerRadius(int ring)
          outerRadius - The outer radius of the specified ring.
 double ringArea(int ring)
          ringArea - The area of the specified ring.
 double ringWidth()
          ringWidth - The width of each ring.
 void setTopOnly(boolean topOnly)
          Determines whether the detector accepts electrons only anti-parallel to the normal (front of the detector) or also parallel (back of the detector)
 int sumElectronCount(int lowerRing, int upperRing)
          sumElectronCount - The sum of the number of electrons detected over the range of rings [ring0, ring1) (inclusive of ring0, excluding ring1).
 int totalElectronCount()
          totalElectronCount - The total number of electron trajectories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnularDetector

public AnnularDetector(double radius,
                       int nRings,
                       double[] center,
                       double[] normal)
AnnularDetector - Construct an annular detector of the specified total radius which is subdivided into nRing equal width rings detectors.

Parameters:
radius - double - Outer radius (in meters)
nRings - int - The number of equal width rings into which the detector is subdivided.
center - double[] - A point defining the center of the detector
normal - double[] - A vector defining the orientation of the detector (oriented towards the incoming electrons)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

numberOfRings

public int numberOfRings()
numberOfRings - The number of rings into which the detector is divided.

Returns:
int

ringWidth

public double ringWidth()
ringWidth - The width of each ring.

Returns:
double

totalElectronCount

public int totalElectronCount()
totalElectronCount - The total number of electron trajectories.

Returns:
int

detectedElectronCount

public int detectedElectronCount(int ring)
detectedElectronCount - The number of electron trajectories that were detected by the specified ring.

Returns:
int

sumElectronCount

public int sumElectronCount(int lowerRing,
                            int upperRing)
sumElectronCount - The sum of the number of electrons detected over the range of rings [ring0, ring1) (inclusive of ring0, excluding ring1). This method is a little redundant.

Parameters:
lowerRing - - index of lower ring
upperRing - - index of upper most ring
Returns:
The sum of detectedElectronCount(i) for i from lowerRing to upperRing-1

innerRadius

public double innerRadius(int ring)
innerRadius - The inner radius of the specified ring.

Parameters:
ring - int
Returns:
double

outerRadius

public double outerRadius(int ring)
outerRadius - The outer radius of the specified ring.

Parameters:
ring - int
Returns:
double

ringArea

public double ringArea(int ring)
ringArea - The area of the specified ring.

Parameters:
ring - int
Returns:
double

dump

public void dump(java.io.Writer wr)
          throws java.io.IOException
dump - Writes a summary of the results collected by this detector.

Parameters:
wr -
Throws:
java.io.IOException

isTopOnly

public boolean isTopOnly()
Determines whether the detector accepts electrons only anti-parallel to the normal (front of the detector) or also parallel (back of the detector)

Returns:
Returns true for top only, false for both sides

setTopOnly

public void setTopOnly(boolean topOnly)
Determines whether the detector accepts electrons only anti-parallel to the normal (front of the detector) or also parallel (back of the detector)

Parameters:
topOnly - true for top only (default is true)