1 | /** \file points_model.h child class of SANSmodel*/ |
---|
2 | |
---|
3 | #ifndef POINTSMODEL_H |
---|
4 | #define POINTSMODEL_H |
---|
5 | |
---|
6 | #include <vector> |
---|
7 | #include "tnt/tnt.h" |
---|
8 | #include <string> |
---|
9 | #include "Point3D.h" |
---|
10 | #include "iq.h" |
---|
11 | #include "sans_model.h" |
---|
12 | |
---|
13 | using namespace std; |
---|
14 | |
---|
15 | class PointsModel : public SANSModel{ |
---|
16 | public: |
---|
17 | PointsModel(); |
---|
18 | virtual ~PointsModel(); |
---|
19 | |
---|
20 | void CalculateIQ(IQ *iq); |
---|
21 | double CalculateIQ(double q); |
---|
22 | double CalculateIQError(double q); |
---|
23 | |
---|
24 | // Old lengthy 2D simulation (unchecked) |
---|
25 | void CalculateIQ_2D(IQ *iq,double phi); |
---|
26 | double CalculateIQ_2D(double qx, double qy); |
---|
27 | |
---|
28 | // Fast 2D simulation |
---|
29 | double CalculateIQ_2D(const vector<Point3D>&, double qx, double qy); |
---|
30 | |
---|
31 | //given a set of points, calculate distance correlation |
---|
32 | //function, and return the max dist |
---|
33 | double DistDistribution(const vector<Point3D>&); |
---|
34 | void DistDistributionXY(const vector<Point3D>&); |
---|
35 | |
---|
36 | Array2D<double> GetPr(); |
---|
37 | void OutputPR(const std::string &); |
---|
38 | void OutputPR_XY(const std::string &); |
---|
39 | |
---|
40 | virtual int GetPoints(Point3DVector &) = 0; |
---|
41 | void OutputPDB(const vector<Point3D>&,const char*); |
---|
42 | |
---|
43 | //will be used in calculating P(r), the maximum distance |
---|
44 | virtual double GetDimBound() = 0; |
---|
45 | //will be used to determin the maximum distance for |
---|
46 | //several pointsmodel instances |
---|
47 | virtual vector<double> GetCenter(); |
---|
48 | |
---|
49 | protected: |
---|
50 | double CalculateRstep(int num_points, double rmax); |
---|
51 | double rmax_, rstep_,cormax_,cormax_xy_; |
---|
52 | int r_grids_num_; |
---|
53 | vector<double> center_; |
---|
54 | |
---|
55 | private: |
---|
56 | Array2D<double> pr_,pr_xy_; |
---|
57 | vector<double> product_sld_; |
---|
58 | }; |
---|
59 | |
---|
60 | #endif |
---|