[503a972] | 1 | #if !defined(sc_h) |
---|
| 2 | #define sc_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for SC_ParaCrystal parameters |
---|
| 7 | */ |
---|
| 8 | //[PYTHONCLASS] = SCCrystalModel |
---|
| 9 | //[DISP_PARAMS] = radius,phi, psi, theta |
---|
| 10 | //[DESCRIPTION] =<text>P(q)=(scale/Vp)*V_lattice*P(q)*Z(q)+bkg where scale is the volume |
---|
| 11 | // fraction of sphere, |
---|
| 12 | // Vp = volume of the primary particle, |
---|
| 13 | // V_lattice = volume correction for |
---|
| 14 | // for the crystal structure, |
---|
| 15 | // P(q)= form factor of the sphere (normalized), |
---|
| 16 | // Z(q)= paracrystalline structure factor |
---|
| 17 | // for a simple cubic structure. |
---|
| 18 | // [Simple Cubic ParaCrystal Model] |
---|
| 19 | // Parameters; |
---|
| 20 | // scale: volume fraction of spheres |
---|
| 21 | // bkg:background, R: radius of sphere |
---|
| 22 | // dnn: Nearest neighbor distance |
---|
| 23 | // d_factor: Paracrystal distortion factor |
---|
| 24 | // radius: radius of the spheres |
---|
| 25 | // sldSph: SLD of the sphere |
---|
| 26 | // sldSolv: SLD of the solvent |
---|
| 27 | // |
---|
| 28 | // </text> |
---|
| 29 | //[FIXED]= radius.width;phi.width;psi.width; theta.width |
---|
| 30 | //[ORIENTATION_PARAMS]= <text> phi;psi; theta; phi.width;psi.width; theta.width</text> |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | class SCCrystalModel{ |
---|
| 35 | public: |
---|
| 36 | // Model parameters |
---|
| 37 | /// Scale factor |
---|
| 38 | // [DEFAULT]=scale= 1.0 |
---|
| 39 | Parameter scale; |
---|
| 40 | |
---|
| 41 | /// Nearest neighbor distance [A] |
---|
| 42 | // [DEFAULT]=dnn=220.0 [A] |
---|
| 43 | Parameter dnn; |
---|
| 44 | |
---|
| 45 | /// Paracrystal distortion factor g |
---|
| 46 | // [DEFAULT]=d_factor=0.06 |
---|
| 47 | Parameter d_factor; |
---|
| 48 | |
---|
| 49 | /// Radius of sphere [A] |
---|
| 50 | // [DEFAULT]=radius=40.0 [A] |
---|
| 51 | Parameter radius; |
---|
| 52 | |
---|
| 53 | /// sldSph [1/A^(2)] |
---|
| 54 | // [DEFAULT]=sldSph= 3.0e-6 [1/A^(2)] |
---|
| 55 | Parameter sldSph; |
---|
| 56 | |
---|
| 57 | /// sldSolv [1/A^(2)] |
---|
| 58 | // [DEFAULT]=sldSolv= 6.3e-6 [1/A^(2)] |
---|
| 59 | Parameter sldSolv; |
---|
| 60 | |
---|
| 61 | /// Incoherent Background [1/cm] |
---|
| 62 | // [DEFAULT]=background=0 [1/cm] |
---|
| 63 | Parameter background; |
---|
| 64 | /// Orientation of the a1 axis w/respect incoming beam [deg] |
---|
| 65 | // [DEFAULT]=theta=0.0 [deg] |
---|
| 66 | Parameter theta; |
---|
| 67 | /// Orientation of the a2 in the plane of the detector [deg] |
---|
| 68 | // [DEFAULT]=phi=0.0 [deg] |
---|
| 69 | Parameter phi; |
---|
| 70 | /// Orientation of the a3 in the plane of the detector [deg] |
---|
| 71 | // [DEFAULT]=psi=0.0 [deg] |
---|
| 72 | Parameter psi; |
---|
| 73 | |
---|
| 74 | // Constructor |
---|
| 75 | SCCrystalModel(); |
---|
| 76 | |
---|
| 77 | // Operators to get I(Q) |
---|
| 78 | double operator()(double q); |
---|
| 79 | double operator()(double qx, double qy); |
---|
| 80 | double calculate_ER(); |
---|
[6319646] | 81 | double calculate_VR(); |
---|
[503a972] | 82 | double evaluate_rphi(double q, double phi); |
---|
| 83 | }; |
---|
| 84 | |
---|
| 85 | #endif |
---|