[503a972] | 1 | #if !defined(barbell_h) |
---|
| 2 | #define barbell_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | /** |
---|
| 5 | * Structure definition for BarBell parameters |
---|
| 6 | */ |
---|
| 7 | //[PYTHONCLASS] = BarBellModel |
---|
| 8 | //[DISP_PARAMS] = rad_bar,len_bar,rad_bell,phi, theta |
---|
| 9 | //[DESCRIPTION] =<text>Calculates the scattering from a barbell-shaped cylinder. That is |
---|
| 10 | // a sphereocylinder with spherical end caps |
---|
| 11 | // that have a radius larger than that of |
---|
| 12 | // the cylinder and the center of the end cap |
---|
| 13 | // radius lies outside of the cylinder. |
---|
| 14 | // Note: As the length of cylinder(bar) -->0, |
---|
| 15 | // it becomes a dumbbell. |
---|
| 16 | // And when rad_bar = rad_bell, |
---|
| 17 | // it is a spherocylinder. |
---|
| 18 | // It must be that rad_bar <(=) rad_bell. |
---|
| 19 | // [Parameters]; |
---|
| 20 | // scale: volume fraction of spheres, |
---|
| 21 | // background:incoherent background, |
---|
| 22 | // rad_bar: radius of the cylindrical bar, |
---|
| 23 | // len_bar: length of the cylindrical bar, |
---|
| 24 | // rad_bell: radius of the spherical bell, |
---|
| 25 | // sld_barbell: SLD of the barbell, |
---|
| 26 | // sld_solv: SLD of the solvent. |
---|
| 27 | // </text> |
---|
| 28 | //[FIXED]= rad_bar.width;len_bar;rad_bell;phi.width; theta.width |
---|
| 29 | //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text> |
---|
| 30 | |
---|
| 31 | class BarBellModel { |
---|
| 32 | public: |
---|
| 33 | // Model parameters |
---|
| 34 | |
---|
| 35 | /// Scale factor |
---|
| 36 | // [DEFAULT]=scale= 1.0 |
---|
| 37 | Parameter scale; |
---|
| 38 | |
---|
| 39 | /// rad_bar [A] |
---|
| 40 | // [DEFAULT]=rad_bar=20.0 [A] |
---|
| 41 | Parameter rad_bar; |
---|
| 42 | |
---|
| 43 | /// length of the bar [A] |
---|
| 44 | // [DEFAULT]=len_bar=400.0 [A] |
---|
| 45 | Parameter len_bar; |
---|
| 46 | |
---|
| 47 | /// Radius of sphere [A] |
---|
| 48 | // [DEFAULT]=rad_bell=40.0 [A] |
---|
| 49 | Parameter rad_bell; |
---|
| 50 | |
---|
| 51 | /// sld_barbell [1/A^(2)] |
---|
| 52 | // [DEFAULT]=sld_barbell= 1.0e-6 [1/A^(2)] |
---|
| 53 | Parameter sld_barbell; |
---|
| 54 | |
---|
| 55 | /// sld_solv [1/A^(2)] |
---|
| 56 | // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)] |
---|
| 57 | Parameter sld_solv; |
---|
| 58 | |
---|
| 59 | /// Incoherent Background [1/cm] |
---|
| 60 | // [DEFAULT]=background=0.0 [1/cm] |
---|
| 61 | Parameter background; |
---|
| 62 | |
---|
| 63 | /// Angle of the main axis against z-axis in detector plane [deg] |
---|
| 64 | // [DEFAULT]=theta=0.0 [deg] |
---|
| 65 | Parameter theta; |
---|
| 66 | |
---|
| 67 | /// Azimuthal angle around z-axis in detector plane [deg] |
---|
| 68 | // [DEFAULT]=phi=0.0 [deg] |
---|
| 69 | Parameter phi; |
---|
| 70 | |
---|
| 71 | // Constructor |
---|
| 72 | BarBellModel(); |
---|
| 73 | |
---|
| 74 | // Operators to get I(Q) |
---|
| 75 | double operator()(double q); |
---|
| 76 | double operator()(double qx, double qy); |
---|
| 77 | double calculate_ER(); |
---|
| 78 | double evaluate_rphi(double q, double phi); |
---|
| 79 | }; |
---|
| 80 | |
---|
| 81 | #endif |
---|