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

ObjCryst::Radiation Class Reference

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

Inheritance diagram for ObjCryst::Radiation:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::Radiation:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Radiation ()
 Default constructor.

 Radiation (const RadiationType rad, const REAL wavelength)
 \ brief Constructor

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

 Radiation (const Radiation &)
 Copy constructor.

 ~Radiation ()
virtual const string & GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...).

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).

void SetWavelengthType (const WavelengthType &type)
 Set the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...).

WavelengthType GetWavelengthType () const
 Get the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...).

const CrystVector_REAL & GetWavelength () const
 Get the wavelength(s) in Angstroems.

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

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

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

REAL 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.

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

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

REAL GetLinearPolarRate () const
void SetLinearPolarRate (const REAL f)

Private Member Functions

void InitOptions ()

Private Attributes

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

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

CrystVector_REAL mWavelength
 Wavelength of the Experiment, in Angstroems.

string mXRayTubeName
 Name of the X-Ray tube used, if relevant.

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

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

RefinableObjClock mClockWavelength
RefinableObjClock mClockRadiation
REAL mLinearPolarRate
 Linear Polarization Rate (default:0, X-Ray tube unmonochromatized).


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

ObjCryst::Radiation::Radiation  ) 
 

Default constructor.

ObjCryst::Radiation::Radiation const RadiationType  rad,
const REAL  wavelength
 

\ brief Constructor

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

ObjCryst::Radiation::Radiation const string &  XRayTubeElementName,
const REAL  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.

ObjCryst::Radiation::Radiation const Radiation  ) 
 

Copy constructor.

ObjCryst::Radiation::~Radiation  ) 
 


Member Function Documentation

virtual const string& ObjCryst::Radiation::GetClassName  )  const [virtual]
 

Name for this class ("RefinableObj", "Crystal",...).

This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry

Reimplemented from ObjCryst::RefinableObj.

const RefinableObjClock& ObjCryst::Radiation::GetClockRadiation  )  const
 

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

const RefinableObjClock& ObjCryst::Radiation::GetClockWavelength  )  const
 

Last time the wavelength has been changed.

REAL ObjCryst::Radiation::GetLinearPolarRate  )  const
 

RadiationType ObjCryst::Radiation::GetRadiationType  )  const
 

Get the radiation type (X-Rays, Neutron).

const CrystVector_REAL& ObjCryst::Radiation::GetWavelength  )  const
 

Get the wavelength(s) in Angstroems.

Currently only monochromatic is used, so the vector should only return only one wavelength.

WavelengthType ObjCryst::Radiation::GetWavelengthType  )  const
 

Get the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...).

REAL ObjCryst::Radiation::GetXRayTubeAlpha2Alpha1Ratio  )  const
 

Get the Kalpha2/Kalpha1 ratio.

REAL ObjCryst::Radiation::GetXRayTubeDeltaLambda  )  const
 

Get the wavelength difference for Alpha1 and Alpha2.

void ObjCryst::Radiation::InitOptions  )  [private]
 

void ObjCryst::Radiation::operator= const Radiation  ) 
 

void ObjCryst::Radiation::Print  )  const [virtual]
 

Print to screen/console the charcteristics of the radiation.

Reimplemented from ObjCryst::RefinableObj.

void ObjCryst::Radiation::SetLinearPolarRate const REAL  f  ) 
 

void ObjCryst::Radiation::SetRadiationType const  RadiationType  ) 
 

Set the radiation type (X-Rays, Neutron).

void ObjCryst::Radiation::SetWavelength const string &  XRayTubeElementName,
const REAL  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.

void ObjCryst::Radiation::SetWavelength const  REAL  ) 
 

Set the (monochromatic) wavelength of the beam.

void ObjCryst::Radiation::SetWavelengthType const WavelengthType type  ) 
 

Set the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...).

virtual void ObjCryst::Radiation::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 ObjCryst::Radiation::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.


Member Data Documentation

RefinableObjClock ObjCryst::Radiation::mClockRadiation [private]
 

RefinableObjClock ObjCryst::Radiation::mClockWavelength [private]
 

REAL ObjCryst::Radiation::mLinearPolarRate [private]
 

Linear Polarization Rate (default:0, X-Ray tube unmonochromatized).

RefObjOpt ObjCryst::Radiation::mRadiationType [private]
 

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

CrystVector_REAL ObjCryst::Radiation::mWavelength [private]
 

Wavelength of the Experiment, in Angstroems.

RefObjOpt ObjCryst::Radiation::mWavelengthType [private]
 

monochromatic ? Alpha1 & Alpha2 ? Multi-Wavelength ?

REAL ObjCryst::Radiation::mXRayTubeAlpha2Alpha1Ratio [private]
 

Ratio alpha2/alpha1 (should be 0.5).

REAL ObjCryst::Radiation::mXRayTubeDeltaLambda [private]
 

Absolute difference between alpha1 and alpha2, in angstroems.

string ObjCryst::Radiation::mXRayTubeName [private]
 

Name of the X-Ray tube used, if relevant.

ie "Cu", "Fe",etc... "CuA1" for Cu-alpha1, etc...


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:05:08 2006 for ObjCryst++ by doxygen 1.3.6