NAME

diffract - A library function to diffract off a reflection/transmission grating. See the file /proj/axaf/Simul/doc/analysis/grating_notes/grating_notes.ps for details.


SYNOPSIS

 namespace diffraction {
   enum ReflectTrans { REFLECTION=-1, NONE=0, TRANSMISSION=1 };
   void diffract( const diffraction::ReflectTrans& reflect_trans,
                  const double& myorder, const double& wavelength,
                  const double& groove_spacing, const dvm3_Vector& normal,
                  const dvm3_Vector& n_cross_g, dvm3_Vector& photon_dir );
 }


DESCRIPTION

The library function takes seven parameters, the first 6 are input parameters and the last parameter (the photon direction) is modified upon return.

The options are :

const diffraction::ReflectTrans reflect_trans
The first parameter is used to specify if the diffraction is a reflection or transmission.

const double& myorder
The second parameter is the order of diffraction.

const double& wavelength
The wavelength of the photon.

const double& groove_spacing
The local groove spacing of the grating.

const dvm3_Vector& normal
The normalized grating normal.

const dvm3_Vector& n_cross_g
The grating normal cross the groove directional vector, normalized.

dvm3_Vector& photon_dir
The photon direction, the parameter shall be modified upon return.