source: sasview/sansmodels/src/c_extensions/capcyl.h @ 8343e18

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 8343e18 was 0c2389e, checked in by Mathieu Doucet <doucetm@…>, 13 years ago

refactored capped cylinder

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[339ce67]1#if !defined(capcyl_h)
2#define capcyl_h
[0c2389e]3#include "parameters.hh"
[339ce67]4
5/**
6 * Structure definition for CappedCylinder parameters
7 */
8 //[PYTHONCLASS] = CappedCylinderModel
9 //[DISP_PARAMS] = rad_cyl,len_cyl,rad_cap,phi,  theta
[18f2ca1]10 //[DESCRIPTION] =<text>Calculates the scattering from a cylinder with spherical section end-caps.
11 //                             That is, a sphereocylinder
[339ce67]12 //                             with end caps that have a radius larger than
13 //                             that of the cylinder and the center of the
14 //                             end cap radius lies within the cylinder.
15 //                             Note: As the length of cylinder -->0,
16 //                             it becomes a ConvexLens.
17 //                             It must be that rad_cyl <(=) rad_cap.
18 //                             [Parameters];
19 //                             scale: volume fraction of spheres,
20 //                             background:incoherent background,
21 //                             rad_cyl: radius of the cylinder,
22 //                             len_cyl: length of the cylinder,
23 //                             rad_cap: radius of the semi-spherical cap,
24 //                             sld_capcyl: SLD of the capped cylinder,
25 //                             sld_solv: SLD of the solvent.
26 //             </text>
27 //[FIXED]=  rad_cyl.width;len_cyl;rad_cap;phi.width; theta.width
28 //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text>
29
[0c2389e]30class CappedCylinderModel{
31public:
32  // Model parameters
33  /// Scale factor
34  //  [DEFAULT]=scale= 1.0
35  Parameter scale;
[339ce67]36
[0c2389e]37  /// rad_cyl [A]
38  //  [DEFAULT]=rad_cyl=20.0 [A]
39  Parameter rad_cyl;
[339ce67]40
[0c2389e]41  /// length of the cylinder
42  //  [DEFAULT]=len_cyl=400.0 [A]
43  Parameter len_cyl;
[339ce67]44
[0c2389e]45  /// Radius of sphere [A]
46  //  [DEFAULT]=rad_cap=40.0 [A]
47  Parameter rad_cap;
[339ce67]48
[0c2389e]49  /// sld_capcyl [1/A^(2)]
50  //  [DEFAULT]=sld_capcyl= 1.0e-6 [1/A^(2)]
51  Parameter sld_capcyl;
[339ce67]52
[0c2389e]53  /// sld_solv [1/A^(2)]
54  //  [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)]
55  Parameter sld_solv;
[339ce67]56
[0c2389e]57  /// Incoherent Background [1/cm]
58  //  [DEFAULT]=background=0.0 [1/cm]
59  Parameter background;
[339ce67]60
[0c2389e]61  /// Angle of the main axis against z-axis in detector plane [deg]
62  //  [DEFAULT]=theta=0.0 [deg]
63  Parameter theta;
[339ce67]64
[0c2389e]65  /// Azimuthal angle around z-axis in detector plane [deg]
66  //  [DEFAULT]=phi=0.0 [deg]
67  Parameter phi;
[339ce67]68
[0c2389e]69  // Constructor
70  CappedCylinderModel();
[339ce67]71
[0c2389e]72  // Operators to get I(Q)
73  double operator()(double q);
74  double operator()(double qx, double qy);
75  double calculate_ER();
76  double evaluate_rphi(double q, double phi);
77};
[339ce67]78
79#endif
Note: See TracBrowser for help on using the repository browser.