[503a972] | 1 | #if !defined(core_shell_cylinder_h) |
---|
| 2 | #define core_shell_cylinder_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for core-shell cylinder parameters |
---|
| 7 | */ |
---|
| 8 | //[PYTHONCLASS] = CoreShellCylinderModel |
---|
| 9 | //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi |
---|
[3bd7cec] | 10 | //[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg, |
---|
| 11 | // where: f(q)= 2(core_sld |
---|
[503a972] | 12 | // - solvant_sld)* Vc*sin[qLcos(alpha/2)] |
---|
| 13 | // /[qLcos(alpha/2)]*J1(qRsin(alpha)) |
---|
| 14 | // /[qRsin(alpha)]+2(shell_sld-solvent_sld) |
---|
| 15 | // *Vs*sin[q(L+T)cos(alpha/2)][[q(L+T) |
---|
| 16 | // *cos(alpha/2)]*J1(q(R+T)sin(alpha)) |
---|
| 17 | // /q(R+T)sin(alpha)] |
---|
| 18 | // |
---|
| 19 | // alpha:is the angle between the axis of |
---|
| 20 | // the cylinder and the q-vector |
---|
| 21 | // Vs: the volume of the outer shell |
---|
| 22 | // Vc: the volume of the core |
---|
| 23 | // L: the length of the core |
---|
| 24 | // shell_sld: the scattering length density |
---|
| 25 | // of the shell |
---|
| 26 | // solvent_sld: the scattering length density |
---|
| 27 | // of the solvent |
---|
| 28 | // bkg: the background |
---|
| 29 | // T: the thickness |
---|
| 30 | // R+T: is the outer radius |
---|
| 31 | // L+2T: The total length of the outershell |
---|
| 32 | // J1: the first order Bessel function |
---|
| 33 | // theta: axis_theta of the cylinder |
---|
| 34 | // phi: the axis_phi of the cylinder... |
---|
| 35 | // </text> |
---|
| 36 | //[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness.width</text> |
---|
| 37 | //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width |
---|
| 38 | |
---|
| 39 | class CoreShellCylinderModel{ |
---|
| 40 | public: |
---|
| 41 | // Model parameters |
---|
| 42 | |
---|
| 43 | /// Core radius [A] |
---|
| 44 | // [DEFAULT]=radius=20.0 [A] |
---|
| 45 | Parameter radius; |
---|
| 46 | |
---|
| 47 | /// Scale factor |
---|
| 48 | // [DEFAULT]=scale=1.0 |
---|
| 49 | Parameter scale; |
---|
| 50 | |
---|
| 51 | /// Shell thickness [A] |
---|
| 52 | // [DEFAULT]=thickness=10.0 [A] |
---|
| 53 | Parameter thickness; |
---|
| 54 | |
---|
| 55 | /// Core length [A] |
---|
| 56 | // [DEFAULT]=length=400.0 [A] |
---|
| 57 | Parameter length; |
---|
| 58 | |
---|
| 59 | /// Core SLD [1/A^(2)] |
---|
| 60 | // [DEFAULT]=core_sld=1.0e-6 [1/A^(2)] |
---|
| 61 | Parameter core_sld; |
---|
| 62 | |
---|
| 63 | /// Shell SLD [1/A^(2)] |
---|
| 64 | // [DEFAULT]=shell_sld=4.0e-6 [1/A^(2)] |
---|
| 65 | Parameter shell_sld; |
---|
| 66 | |
---|
| 67 | /// Solvent SLD [1/A^(2)] |
---|
| 68 | // [DEFAULT]=solvent_sld=1.0e-6 [1/A^(2)] |
---|
| 69 | Parameter solvent_sld; |
---|
| 70 | |
---|
| 71 | /// Incoherent Background [1/cm] |
---|
| 72 | // [DEFAULT]=background=0 [1/cm] |
---|
| 73 | Parameter background; |
---|
| 74 | |
---|
| 75 | /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [deg] |
---|
| 76 | // [DEFAULT]=axis_theta=90.0 [deg] |
---|
| 77 | Parameter axis_theta; |
---|
| 78 | |
---|
| 79 | /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [deg] |
---|
| 80 | // [DEFAULT]=axis_phi=0.0 [deg] |
---|
| 81 | Parameter axis_phi; |
---|
| 82 | |
---|
| 83 | // Constructor |
---|
| 84 | CoreShellCylinderModel(); |
---|
| 85 | |
---|
| 86 | // Operators to get I(Q) |
---|
| 87 | double operator()(double q); |
---|
| 88 | double operator()(double qx, double qy); |
---|
| 89 | double calculate_ER(); |
---|
[6319646] | 90 | double calculate_VR(); |
---|
[503a972] | 91 | double evaluate_rphi(double q, double phi); |
---|
| 92 | }; |
---|
| 93 | |
---|
| 94 | #endif |
---|