[503a972] | 1 | #if !defined(bcc_h) |
---|
| 2 | #define bcc_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for BCC_ParaCrystal parameters |
---|
| 7 | */ |
---|
| 8 | //[PYTHONCLASS] = BCCrystalModel |
---|
| 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 face centered cubic structure. |
---|
| 18 | // [Body Centered 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 | class BCCrystalModel{ |
---|
| 33 | public: |
---|
| 34 | // Model parameters |
---|
| 35 | /// Scale factor |
---|
| 36 | // [DEFAULT]=scale= 1.0 |
---|
| 37 | Parameter scale; |
---|
| 38 | |
---|
| 39 | /// Nearest neighbor distance [A] |
---|
| 40 | // [DEFAULT]=dnn=220.0 [A] |
---|
| 41 | Parameter dnn; |
---|
| 42 | |
---|
| 43 | /// Paracrystal distortion factor g |
---|
| 44 | // [DEFAULT]=d_factor=0.06 |
---|
| 45 | Parameter d_factor; |
---|
| 46 | |
---|
| 47 | /// Radius of sphere [A] |
---|
| 48 | // [DEFAULT]=radius=40.0 [A] |
---|
| 49 | Parameter radius; |
---|
| 50 | |
---|
| 51 | /// sldSph [1/A^(2)] |
---|
| 52 | // [DEFAULT]=sldSph= 3.0e-6 [1/A^(2)] |
---|
| 53 | Parameter sldSph; |
---|
| 54 | |
---|
| 55 | /// sldSolv [1/A^(2)] |
---|
| 56 | // [DEFAULT]=sldSolv= 6.3e-6 [1/A^(2)] |
---|
| 57 | Parameter sldSolv; |
---|
| 58 | |
---|
| 59 | /// Incoherent Background [1/cm] |
---|
| 60 | // [DEFAULT]=background=0 [1/cm] |
---|
| 61 | Parameter background; |
---|
| 62 | /// Orientation of the a1 axis w/respect incoming beam [deg] |
---|
| 63 | // [DEFAULT]=theta=0.0 [deg] |
---|
| 64 | Parameter theta; |
---|
| 65 | /// Orientation of the a2 in the plane of the detector [deg] |
---|
| 66 | // [DEFAULT]=phi=0.0 [deg] |
---|
| 67 | Parameter phi; |
---|
| 68 | /// Orientation of the a3 in the plane of the detector [deg] |
---|
| 69 | // [DEFAULT]=psi=0.0 [deg] |
---|
| 70 | Parameter psi; |
---|
| 71 | |
---|
| 72 | // Constructor |
---|
| 73 | BCCrystalModel(); |
---|
| 74 | |
---|
| 75 | // Operators to get I(Q) |
---|
| 76 | double operator()(double q); |
---|
| 77 | double operator()(double qx, double qy); |
---|
| 78 | double calculate_ER(); |
---|
[6319646] | 79 | double calculate_VR(); |
---|
[503a972] | 80 | double evaluate_rphi(double q, double phi); |
---|
| 81 | }; |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | #endif |
---|