[94a3f8f] | 1 | #if !defined(sc_h) |
---|
| 2 | #define sc_h |
---|
[6e10cff] | 3 | #include "parameters.hh" |
---|
[94a3f8f] | 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for SC_ParaCrystal parameters |
---|
| 7 | */ |
---|
[6e10cff] | 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> |
---|
[94a3f8f] | 31 | |
---|
| 32 | |
---|
| 33 | |
---|
[6e10cff] | 34 | class SCCrystalModel{ |
---|
| 35 | public: |
---|
| 36 | // Model parameters |
---|
| 37 | /// Scale factor |
---|
| 38 | // [DEFAULT]=scale= 1.0 |
---|
| 39 | Parameter scale; |
---|
[94a3f8f] | 40 | |
---|
[6e10cff] | 41 | /// Nearest neighbor distance [A] |
---|
| 42 | // [DEFAULT]=dnn=220.0 [A] |
---|
| 43 | Parameter dnn; |
---|
[94a3f8f] | 44 | |
---|
[6e10cff] | 45 | /// Paracrystal distortion factor g |
---|
| 46 | // [DEFAULT]=d_factor=0.06 |
---|
| 47 | Parameter d_factor; |
---|
[94a3f8f] | 48 | |
---|
[6e10cff] | 49 | /// Radius of sphere [A] |
---|
| 50 | // [DEFAULT]=radius=40.0 [A] |
---|
| 51 | Parameter radius; |
---|
[94a3f8f] | 52 | |
---|
[6e10cff] | 53 | /// sldSph [1/A^(2)] |
---|
| 54 | // [DEFAULT]=sldSph= 3.0e-6 [1/A^(2)] |
---|
| 55 | Parameter sldSph; |
---|
[94a3f8f] | 56 | |
---|
[6e10cff] | 57 | /// sldSolv [1/A^(2)] |
---|
| 58 | // [DEFAULT]=sldSolv= 6.3e-6 [1/A^(2)] |
---|
| 59 | Parameter sldSolv; |
---|
[94a3f8f] | 60 | |
---|
[6e10cff] | 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; |
---|
[94a3f8f] | 73 | |
---|
[6e10cff] | 74 | // Constructor |
---|
| 75 | SCCrystalModel(); |
---|
[94a3f8f] | 76 | |
---|
[6e10cff] | 77 | // Operators to get I(Q) |
---|
| 78 | double operator()(double q); |
---|
| 79 | double operator()(double qx, double qy); |
---|
| 80 | double calculate_ER(); |
---|
| 81 | double evaluate_rphi(double q, double phi); |
---|
| 82 | }; |
---|
[94a3f8f] | 83 | |
---|
| 84 | #endif |
---|