McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
77 stars 54 forks source link

McXtrace Sqw: thoughts about converting from neutrons #1233

Closed farhi closed 1 year ago

farhi commented 2 years ago

The commit 38558f966d997ef7fad4efe89f5a6b56fb51e38f imports the Isotropic_Sqw sample component from McStas into an X version. The neutron vx,vy,vz were converted to kx,ky,kz, and relevant logic (constants) were adjusted so that the component compiles.

The two attached papers indicate how the theory should be adapted. One big difference resides in the selection rules:

but with photons, we have a linear dependency between E and k (whereas with neutrons k ~ sqrt(E) ) , so that there is not need to solve a 2nd order equation for the energy conservation. The line 2578:

is thus not needed with photons. An other difference is that the sigma (both coherent and incoherent) are constant. They do not depend on the central atoms, as the photons only interact with the electron shells. Thus we have:

where r0 is the electron radius. This is the Thompson cross-section.

As a conclusion, porting to photons is probably very simple.

Alfred Q.R. Baron: 1504.01098.pdf K. Sturm: dSigmadOmega-sturm-1993.pdf

farhi commented 2 years ago

We may also implement a Compton scattering, described for instance in:

It only depends on the incident photon energy, and has an angular dependency (see Eq 1). Again, the cross-section only depends on the electron radius r0.

A factor 1/2 is introduced to take into account the averaging of the polarisation scalar product:

This is also true for the inelastic cross-section with S(q,w).

farhi commented 2 years ago

One more review paper for absorption, IXS and RIXS. Nina Rohringer 1811.12052.pdf

This is from https://arxiv.org/pdf/1811.12052.pdf

farhi commented 2 years ago

And have a look at the simpler doc at ESRF:

And the r0^2 |e0.e1|^2 term is 0.67b.

farhi commented 2 years ago

Add more references: Schulke 20017 Schulke2007.pdf

Sahle 2015 Sahle2015.pdf

farhi commented 1 year ago

This is done, but needs fixing for e.g. test and McCode-3. Commit bc4547e3a36fd53de9a9288c8187cc7357c0f044

farhi commented 1 year ago

also done for McXtrace cogen-3