Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ObjCryst::Radiation Class Reference

Class to define the radiation (type, monochromaticity, wavelength(s)) of an experiment. More...

#include <ScatteringData.h>

Inheritance diagram for ObjCryst::Radiation::

ObjCryst::RefinableObj List of all members.

Public Methods

 Radiation ()
 Default constructor.

 Radiation (const RadiationType rad, const double wavelength)
 \ brief Constructor. More...

 Radiation (const string &XRayTubeElementName, const double alpha2Alpha2ratio=0.5)
 \ brief Constructor for X-Ray tube radiation. More...

 Radiation (const Radiation &)
 Copy constructor.

 ~Radiation ()
virtual const string GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry.

void operator= (const Radiation &)
RadiationType GetRadiationType () const
 Get the radiation type (X-Rays, Neutron).

void SetRadiationType (const RadiationType)
 Set the radiation type (X-Rays, Neutron).

WavelengthType GetWavelengthType () const
const CrystVector_double & GetWavelength () const
 Get the wavelength(s) in Angstroems. Currently only monochromatic is used, so the vector should only return only one wavelength.

void SetWavelength (const double)
 Set the (monochromatic) wavelength of the beam.

void SetWavelength (const string &XRayTubeElementName, const double alpha2Alpha2ratio=0.5)
 \ brief Set X-Ray tube radiation. More...

double GetXRayTubeDeltaLambda () const
 Get the wavelength difference for Alpha1 and Alpha2.

double GetXRayTubeAlpha2Alpha1Ratio () const
 Get the Kalpha2/Kalpha1 ratio.

const RefinableObjClockGetClockWavelength () const
 Last time the wavelength has been changed.

const RefinableObjClockGetClockRadiation () const
 Last time the nature (X-Rays/Neutron, number of wavelengths)radiation has been changed.

virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML. More...

virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream. More...

void Print () const
 Print to screen/console the charcteristics of the radiation.


Private Methods

void InitOptions ()

Private Attributes

RefObjOpt mRadiationType
 Neutron ? X-Ray ? (Electron: unimplemented).

RefObjOpt mWavelengthType
 monochromatic ? Alpha1 & Alpha2 ? Multi-Wavelength ?

CrystVector_double mWavelength
 Wavelength of the Experiment, in Angstroems.

string mXRayTubeName
 Name of the X-Ray tube used, if relevant. ie "Cu", "Fe",etc... "CuA1" for Cu-alpha1, etc...

double mXRayTubeDeltaLambda
 Absolute difference between alpha1 and alpha2, in angstroems.

double mXRayTubeAlpha2Alpha1Ratio
 Ratio alpha2/alpha1 (should be 0.5).

RefinableObjClock mClockWavelength
RefinableObjClock mClockRadiation

Detailed Description

Class to define the radiation (type, monochromaticity, wavelength(s)) of an experiment.

This can be developped for more complex experiments, hence the vector of wavelengths (so far it is not possible to use several wavelengths, though).

X-Rays and Neutrons are available. Electrons are not available yet in ScatteringData classes.

Todo:
also add here information about the polarization of the beam.


Constructor & Destructor Documentation

Radiation const RadiationType    rad,
const double    wavelength
 

\ brief Constructor.

Parameters:
rad  the RadiationType used (X-Rays, neutrons)
wavelength  the wavelength (in Angstroems) of the monochromatic radiation.

Radiation const string &    XRayTubeElementName,
const double    alpha2Alpha2ratio = 0.5
 

\ brief Constructor for X-Ray tube radiation.

Parameters:
XRayTubeElementName  : name of the anticathode element name. Known ones are Cr, Fe, Cu, Mo, Ag.
alpha2Alpha2ratio:  Kalpha2/Kalpha1 ratio (0.5 by default)
the average wavelength is calculated using the alpha2/alpha1 weight. All structure factors computation are made using the average wavelength, and for powder diffraction, profiles are output at the alpha1 and alpha2 ratio for the calculated pattern.

NOTE : if the name of the wavelength is generic (eg"Cu"), then the program considers that there are both Alpha1 and Alpha2, and thus automatically changes the WavelengthType to WAVELENGTH_ALPHA12. If instead either alpha1 or alpha2 (eg "CuA1") is asked for, the WavelengthType is set to WAVELENGTH_MONOCHROMATIC. In both cases, the radiation type is set to X-Ray.


Member Function Documentation

void SetWavelength const string &    XRayTubeElementName,
const double    alpha2Alpha2ratio = 0.5
 

\ brief Set X-Ray tube radiation.

Parameters:
XRayTubeElementName  : name of the anticathode element name. Known ones are Cr, Fe, Cu, Mo, Ag.
alpha2Alpha2ratio:  Kalpha2/Kalpha1 ratio (0.5 by default)
the average wavelength is calculated using the alpha2/alpha1 weight. All structure factors computation are made using the average wavelength, and for powder diffraction, profiles are output at the alpha1 and alpha2 ratio for the calculated pattern.

NOTE : if the name of the wavelength is generic (eg"Cu"), then the program considers that there are both Alpha1 and Alpha2, and thus automatically changes the WavelengthType to WAVELENGTH_ALPHA12. If instead either alpha1 or alpha2 (eg "CuA1") is asked for, the WavelengthType is set to WAVELENGTH_MONOCHROMATIC. In both cases, the radiation type is set to X-Ray.

virtual void XMLInput istream &    is,
const XMLCrystTag   tag
[virtual]
 

Input From stream.

Todo:
Add an bool XMLInputTag(is,tag) function to recognize all the tags from the stream. So that each inherited class can use the XMLInputTag function from its parent (ie take advantage of inheritance). The children class would first try to interpret the tag, then if unsuccessful would pass it to its parent (thus allowing overloading), etc...

Reimplemented from ObjCryst::RefinableObj.

virtual void XMLOutput ostream &    os,
int    indent = 0
const [virtual]
 

Output to stream in well-formed XML.

Todo:
Use inheritance.. as for XMLInputTag()...

Reimplemented from ObjCryst::RefinableObj.


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 19:48:37 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001