McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics

McXtrace

About McXtrace
 Publications
 Project Partners
 Project People
 Goal

Download
 Components

Documentation
 Manual
 Commands
 Wiki (GitHub)
 Tutorial

Mailing list

Links

Search

Code-repository (GitHub)

Report bugs (GitHub)


McXtrace: FluoPowder

[ Identification | Description | Input parameters | Links ]

The FluoPowder Component

Sample model handling absorption, fluorescence, Compton, Rayleigh scattering and powder diffraction.

Identification

  • Site:
  • Author: E. Farhi
  • Origin: Synchrotron SOLEIL
  • Date: April 2025

Description

Sample that models multiple photon-matter interactions:
- absorption          (photon excites an electron and creates a hole)
- fluorescence        (excited electrons emit light while falling into lower states)
- Compton scattering  (inelastic, incoherent)
- Rayleigh scattering (elastic,   coherent)
- powder diffraction  (elastic,   coherent)
- fluorescence detector escape  (energy shift from detector K-alpha)
- fluorescence detector pile-up (sum aka time coincidence aka pile-up in detector)

The 'material' specification is given as a chemical formulae, e.g. "LaB6". It
may also be given as a file name (CIF/LAU/LAZ/FullProf format) in which case
the formulae is guessed (but may be approximative), and the powder
diffraction is computed, following same options as the PowderN
sample component. The fluorescence is handled for atoms from Z=5 to Z=90.

By setting the 'order' to 1, the absorption along the scattered path is handled.
A higher 'order' will handle multiple scattering events, and final absorption.
For instance, a value order>=2 handles e.g. fluorescence iterative cascades
in the material. Leaving 'order=0' handles the single scattering only.

Example: FluoPowder(material="LaB6.cif",
xwidth=0.001,yheight=0.001,zdepth=0.0001, p_interact=0.99,
target_index=1, focus_xw=0.0005, focus_yh=0.0005)

Sample shape:
Sample shape may be a cylinder, a sphere, a box or any other shape
box/plate:       xwidth x yheight x zdepth (thickness=0)
hollow box/plate:xwidth x yheight x zdepth and thickness>0
cylinder:        radius x yheight (thickness=0)
hollow cylinder: radius x yheight and thickness>0
sphere:          radius (yheight=0 thickness=0)
hollow sphere:   radius and thickness>0 (yheight=0)
any shape:       geometry=OFF file

The complex geometry option handles any closed non-convex polyhedra.
It computes the intersection points of the photon ray with the object
transparently, so that it can be used like a regular sample object.
It supports the OFF, PLY and NOFF file format but not COFF (colored faces).
Such files may be generated from XYZ data using:
qhull < coordinates.xyz Qx Qv Tv o > geomview.off
or
powercrust coordinates.xyz
and viewed with geomview or java -jar jroff.jar (see below).
The default size of the object depends of the OFF file data, but its
bounding box may be resized using xwidth,yheight and zdepth.

Concentric components:
This component has the ability to contain other components when used in
hollow cylinder geometry (namely sample environment, e.g. cryostat and
furnace structure). Such component 'shells' should be split into input and
output side surrounding the 'inside' components. First part must then use
'concentric=1' flag to enter the inside part. The component itself must be
repeated to mark the end of the concentric zone. The number of concentric
shells and number of components inside is not limited.

COMPONENT F_in = FluoPowder(material="Al", concentric=1, ...)
AT (0,0,0) RELATIVE sample_position

COMPONENT something_inside ... // e.g. the sample itself or other materials

COMPONENT F_out = COPY(F_in)(concentric=0)
AT (0,0,0) RELATIVE sample_position

Enhancing computation efficiency:
An important option to enhance statistics is to set 'p_interact' to, say,
30 percent (0.3) in order to force a fraction of the beam to scatter. This
will result on a larger number of scattered events, retaining intensity.

In addition, it may be desirable to define a 'target' for the fluorescence
processes via e.g. the 'target_index' and the 'focus_xw / focus_yh' options.
This target should e.g. be the SDD area.
The powder scattering can be focused along an horizontal tore via the
'powder_d_phi' and 'powder_sign' options. To get a vertical tore, rotate
the sample by 90 deg around Z.

This sample component can advantageously benefit from the SPLIT feature, e.g.
SPLIT COMPONENT sample = FluoPowder(...)

Detector artifacts:
This component also simulates the escape and time coincidence peaks in a close-by
detector (e.g. SDD). The first process corresponds with a fluorescence excitation within
the detector that subtracts the K-alpha detector level from the sample scattered energy.
The second process is related to the detector dead-time, within which time coincidence
between two fluorescence photons are summed-up.
If you activate these features, with e.g. 'escape_ratio=0.01' and 'pileup_ratio=0.01', you
should further remove these contributions for the rest of the simulation beyond the
fluorescence detector, with an ABSORB keyword:

USERVARS %{
int fluo_type;
%}
COMPONENT F = FluoPowder(material="Al", escape_ratio=0.01, pileup_ratio=0.01) AT ...
EXTEND %{
if (SCATTERED) fluo_type=type;              // record type of interaction
%}

COMPONENT E_mon = Monitor_nD(options="energy", ...) AT ...
EXTEND %{
if (fluo_type>=FLUORESCENCE_ESCAPE) ABSORB; // remove detector artifacts further
%}

(...)


The fluorescence is computed via the XRayLib (apt install libxrl-dev).

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
geometrystrName of an Object File Format (OFF) or PLY file for complex geometry. The OFF/PLY file may be generated from XYZ coordinates using qhull/powercrust.0
radiusmOuter radius of sample in (x,z) plane. cylinder/sphere.0
thicknessmThickness of hollow sample Negative value extends the hollow volume outside of the box/cylinder.0
xwidthmWidth for a box sample shape.0
yheightmHeight of sample in vertical direction for box/cylinder shapes.0
zdepthmDepth for a box sample shape.0
concentric1Indicate that this component has a hollow geometry and may contain other components. It should then be duplicated after the inside part (only for box, cylinder, sphere).0
materialstrA CIF/LAZ/LAU file e.g. "LaB6.cif" to handle diffraction or chemical formulae, e.g. "Pb2SnO4" (no diffraction)."LaB6.cif"
packing_factor1How dense is the material compared to bulk 0-1.0
densityg/cm^3Density of material. V_rho=density/weight/1e24*N_A at/Angs^3.0
weightg/molAtomic/molecular weight of material.0
p_interact1Force a given fraction of the beam to scatter, keeping intensity right, to enhance small signals (-1 inactivate).0
target_xmPosition of target to focus at, along X (for fluorescence).0
target_ymPosition of target to focus at, along Y (for fluorescence).0
target_zmPosition of target to focus at, along Z (for fluorescence).0
focus_rmRadius of disk containing target. Use 0 for full space (for fluorescence).0
focus_xwmHoriz. dimension of a rectangular area (for fluorescence).0
focus_yhmVert. dimension of a rectangular area (for fluorescence).0
focus_awdegHoriz. angular dimension of a rectangular area (for fluorescence).0
focus_ahdegVert. angular dimension of a rectangular area (for fluorescence).0
target_index1Relative index of component to focus at, e.g. next is +1 (for fluorescence).0
flag_compton1When 0, the Compton scattering is ignored.1
flag_rayleigh1When 0, the Rayleigh scattering is ignored.1
flag_lorentzian1When 1, the fluorescence line shapes are assumed to be Lorentzian, else Gaussian.1
flag_powder1When 0, the powder diffraction is ignored.1
powder_reflstrA CIF/LAZ/LAU reflection file as for PowderN. When not given, 'material' is used. Specify it when 'material' is a chemical formula.""
powder_format{}List of structure file column indexes. See the PowderN component.{0,0,0,0,0,0,0,0}
powder_VcAA^3Volume of unit cell=nb atoms per cell/density of atoms.0
powder_delta_d_dAAGlobal relative Delta_d/d spreading when the 'w' column is not available. Use 0 if ideal.0
powder_DW1Global Debye-Waller factor when the 'DW' column is not available. Use 1 if included in F2.0
powder_d_phidegAngle corresponding to the vertical angular range to focus to, e.g. detector height. 0 for no focusing.0
powder_nb_atoms1Number of sub-unit per unit cell, that is ratio of sigma for chemical formula to sigma per unit cell.1
powder_barns1Flag to indicate if |F|^2 from 'material' is in barns or fm^2, (barns=1 for laz, barns=0 for lau type files).1
powder_sign1Sign of the scattering angle. If 0, the sign is chosen randomly (left and right).0
escape_ratio1Detector escape peak ratio, e.g. 0.01-0.02. 0 inactivates.0
escape_energykeVDetector escape peak energy, e.g. 1.739 for Si, 9.886 for Ge.1.739
pileup_ratio1Sum aka time coincidence aka pile-up detector peak ratio, e.g. 0.01-0.02. 0 inactivates.0
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links

  • Source code for FluoPowder.comp.
  • The XRayLib https://github.com/tschoonj/xraylib
  • Fluorescence https://en.wikipedia.org/wiki/Fluorescence
  • Rayleigh https://en.wikipedia.org/wiki/Rayleigh_scattering
  • Compton https://en.wikipedia.org/wiki/Compton_scattering
  • X-ray absorption edges http://skuld.bmsc.washington.edu/scatter/AS_periodic.html
  • X-ray fluorescence spectra http://www.xrfresearch.com/xrf-spectra/
  • X-ray edges and fluo lines https://physics.nist.gov/PhysRefData/XrayTrans/Html/search.html

[ Identification | Description | Input parameters | Links ]

Generated on mcxtrace 3.5.27


Last Modified: Tuesday, 29-Apr-2025 16:44:04 CEST
Search website mailinglist archive GitHub repos