External module functions drixs1 - used by mcdisp

Very similar to the inelastic neutron scattering (module function dmq1) the Resonant inelastic X-ray scattering cross sections in the program mcdisp can be done with module functions drixs1 and estates. The input of drixs1 has similar arguments as du1calc, but as additional argument an orientation of the scattering vector, output should be a corresponding vector ${{\mathbf r\mathbf i\mathbf x\mathbf s}^s_{\alpha1}}(\mathbf Q)=\sqrt{(p_--p_+)...
...athbf Q)-\langle \hat \mathbf R_{\alpha}^{\dag }(\mathbf Q)\rangle\vert+\rangle$. Here $\hat R_{\alpha}$ with $\alpha= xx, xy ,xz, yx, yy, yz, zx,zy, zz$ are the 9 components of the RIXS scattering operator, see equ (65). drixs1 is called many times, for every scattering vector. In order to do an efficient calculation the eigenstates should be calculated only once, this is the task of function estates (see above).

The format to be used is:

extern "C" int drixs1(int & tn,double & th,double & ph,double J0,
double & J2, double & J4, double & J6,ComplexMatrix & est,double & T,
ComplexVector & rixs, float & maxE)

The meaning of the symbols is as follows:

on input
   |tn|            transition-number  
   sign(tn)        >0 standard with printouts for user information, 
                   <0 routine should omit any printout
   th              polar angle theta of the scattering vector Q 
                   (angle with the axb axis=c axis) in rad
   ph              polar angle phi of the scattering vector Q 
                   (angle with bx(axb)=a in the projection into
                   the  bx(axb),b plane = angle with a in the projection into 
				   the ab plane) in rad
   J0,J2,J4,J6     form factor functions <jn(Q)>   
   est             eigenstate matrix (as calculated by estates),
                   it should also contain population numbers of the states (row 0)
   T               Temperature[K]
   rixs(1)           ninit + i pinit (from mcdisp options  -ninit and -pinit)
   maxE            maximum transition energy (from mcdisp option maxE)
on output
   int             total number of transitions
   rixs            vector rixs(alpha)=<-|Ralpha|+>sqrt(p- - p+) 
                   with alpha=1,..9=xx, xy ,xz, yx, yy, yz, zx,zy, zz
                   
     Note on coordinate system:
        x||bx(axb)
        y||b                         
        z||axb

The module function must perform the following tasks:

  1. for the transition number tn the vector mq1 is to be filled with the 9-components of ${{\mathbf r\mathbf i\mathbf x\mathbf s}^s_{\alpha1}}(\mathbf Q)=\sqrt{(p_--p_+)...
...athbf Q)-\langle \hat \mathbf R_{\alpha}^{\dag }(\mathbf Q)\rangle\vert+\rangle$ , i.e. for $\alpha=1,..9$. IMPORTANT: the numbering scheme of transitions has to be the same for du1calc and all the corresponding d...1 functions for observables !
  2. If the energy of this transition is zero, i.e. $\Delta(tn)=0$ (diffuse scattering), the ${{\mathbf r\mathbf i\mathbf x\mathbf s}^s_{\alpha1}}(\mathbf Q)$ would be zero because $(p_--p_+)$ vanishes (compare expression (195)). In this case the single ion module should calculate $(p_+/kT)$ instead of $(p_--p_+)$.
  3. if $T<0$ all quantities should be evaluated assuming that all Boltzmann probabilities $p_i$ are zero except for the state number $n=(-T)$, for which the probability $p_n=1$.

Martin Rotter 2017-01-10