26 #ifndef GRALE_NFWLENS_H
28 #define GRALE_NFWLENS_H
30 #include "graleconfig.h"
37 class GRALE_IMPORTEXPORT NFWLensParams :
public GravitationalLensParams
41 NFWLensParams(
double rho_s,
double theta_s);
44 bool write(serut::SerializationInterface &si)
const;
45 bool read(serut::SerializationInterface &si);
46 GravitationalLensParams *createCopy()
const;
48 double get3DDensityScale()
const {
return m_densityScale3D; }
49 double getAngularRadiusScale()
const {
return m_angularRadiusScale; }
51 double m_densityScale3D;
52 double m_angularRadiusScale;
95 bool getAlphaVectorDerivatives(
Vector2D<double> theta,
double &axx,
double &ayy,
double &axy)
const;
96 bool getProjectedPotential(
double D_s,
double D_ds,
Vector2D<double> theta,
double *pPotentialValue)
const;
97 double getMassInside(
double thetaLength)
const;
98 double getProfileSurfaceMassDensity(
double thetaLength)
const;
101 static double F(
double x);
102 static double DF(
double x);
103 static double P(
double x);
105 double m_deflectionScale;
106 double m_angularRadiusScale;
107 double m_potentialScale;
109 double m_densityScale;
112 inline double NFWLens::F(
double x)
116 double tmp = SQRT(1.0-x*x);
117 return ATANH(tmp)/tmp;
121 double tmp = SQRT(x*x-1.0);
122 return ATAN(tmp)/tmp;
127 inline double NFWLens::DF(
double x)
131 return (1.0-x2*F(x))/(x*(x2-1.0));
134 inline double NFWLens::P(
double x)
139 double at = ATANH(SQRT(1.0-x*x));
145 double at = ATAN(SQRT(x*x-1.0));
148 return 0.48045301391820142465;
153 #endif // GRALE_NFWLENS_H