gov.nist.microanalysis.NISTMonte
Class BremsstrahlungEventListener

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

public class BremsstrahlungEventListener
extends java.lang.Object
implements java.awt.event.ActionListener, XRaySource

An ActionListener for attaching to the MonteCarloSS class to integrate Bremsstrahlung calculation into the Monte Carlo model.

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
BremsstrahlungEventListener(MonteCarloSS mcss, double[] detectorPosition)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          actionPerformed - Handles MonteCarloSS.XRayEvents by caching some useful information then firing event listeners.
 void addActionListener(java.awt.event.ActionListener al)
          addActionListener - Objects that are interested in receiving notification whenever an event occurs should register an ActionListener using this method.
 double getEnergy(int n)
          getEnergy
 int getEventCount()
          getEventCount
 double getIntensity(int n)
          getIntensity
 MassAbsorptionCoefficient getMassAbsorptionCoefficient()
          getMassAbsorptionCoefficient - Returns the algorithm to use to compute the mass absorption coefficient.
 int getMaxTrajectories()
          Limits the number of trajectories that generate x-rays.
 double[] getPosition(int n)
          getPosition - Returns the position from which the x-ray is emitted.
 double getTransmittedFraction(double w, java.util.Map path)
          getTransmittedFraction - get the fraction of the x-ray intensity of the specified energy that would traverse the specified path.
 void removeActionListener(java.awt.event.ActionListener al)
          removeActionListener - Removes an ActionListener that was previously registered with addActionListener.
 void setMassAbsorptionCoefficient(MassAbsorptionCoefficient mac)
          setMassAbsorptionCoefficient - Specify the algorithm to use to compute the mass absorption coefficient.
 void setMaxTrajectories(int maxTrajectories)
          Limits the number of trajectories that generate x-rays.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BremsstrahlungEventListener

public BremsstrahlungEventListener(MonteCarloSS mcss,
                                   double[] detectorPosition)
Method Detail

getEventCount

public int getEventCount()
getEventCount

Specified by:
getEventCount in interface XRaySource
Returns:
int

getEnergy

public double getEnergy(int n)
getEnergy

Specified by:
getEnergy in interface XRaySource
Parameters:
n - int
Returns:
double

getIntensity

public double getIntensity(int n)
getIntensity

Specified by:
getIntensity in interface XRaySource
Parameters:
n - int
Returns:
double

getPosition

public double[] getPosition(int n)
Description copied from interface: XRaySource
getPosition - Returns the position from which the x-ray is emitted.

Specified by:
getPosition in interface XRaySource

getTransmittedFraction

public double getTransmittedFraction(double w,
                                     java.util.Map path)
getTransmittedFraction - get the fraction of the x-ray intensity of the specified energy that would traverse the specified path.

Parameters:
w - double - x-ray energy in Joules
path - Map - A path such as returned by getXRayPath(..)
Returns:
double

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed - Handles MonteCarloSS.XRayEvents by caching some useful information then firing event listeners. The EventListeners should call crossSection to access the Bremsstrahlung related information about the current electron energy and position.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ae - ActionEvent

addActionListener

public void addActionListener(java.awt.event.ActionListener al)
addActionListener - Objects that are interested in receiving notification whenever an event occurs should register an ActionListener using this method.

Parameters:
al - ActionListener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)
removeActionListener - Removes an ActionListener that was previously registered with addActionListener.

Parameters:
al - ActionListener

getMaxTrajectories

public int getMaxTrajectories()
Limits the number of trajectories that generate x-rays.

Returns:
Returns the maxTrajectories.

setMaxTrajectories

public void setMaxTrajectories(int maxTrajectories)
Limits the number of trajectories that generate x-rays.

Parameters:
maxTrajectories - The value to which to set maxTrajectories.

setMassAbsorptionCoefficient

public void setMassAbsorptionCoefficient(MassAbsorptionCoefficient mac)
setMassAbsorptionCoefficient - Specify the algorithm to use to compute the mass absorption coefficient.

Parameters:
mac -

getMassAbsorptionCoefficient

public MassAbsorptionCoefficient getMassAbsorptionCoefficient()
getMassAbsorptionCoefficient - Returns the algorithm to use to compute the mass absorption coefficient.

Returns:
MassAbsorptionCoefficient