1 #ifndef _LALSimIMRCalculateSpinPrecEOBHCoeffs_C
2 #define _LALSimIMRCalculateSpinPrecEOBHCoeffs_C
29 const UINT4 SpinAlignedEOBversion
56 const UINT4 SpinAlignedEOBversion
69 const int debugPK = 0;
72 XLAL_PRINT_INFO(
"In XLALSimIMRCalculateSpinPrecEOBHCoeffs: SpinAlignedEOBversion = %d,%d\n",
78 static const REAL8 c1 = -1.7152360250654402;
79 static const REAL8 c2 = -3.246255899738242;
81 static const REAL8 c20 = 1.712;
82 static const REAL8 c21 = -1.803949138004582;
83 static const REAL8 c22 = -39.77229225266885;
84 static const REAL8 c23 = 103.16588921239249;
86 static const REAL8 third = 1./3.;
87 static const REAL8 fifth = 1./5.;
88 static const REAL8 ln2 = 0.6931471805599453094172321214581765680755;
100 #define ifthenelse(cond, ifvalue, elsevalue) ((elsevalue) + (0.5 + copysign(0.5, cond)) * ((ifvalue)-(elsevalue)))
103 c20 + c21*eta + c22*(eta*eta) + c23*(eta*eta)*eta);
104 REAL8 chi =
a / (1. - 2. * eta);
105 REAL8 eta2 = eta * eta, eta3 = eta2 * eta;
106 REAL8 chi2 = chi * chi, chi3 = chi2 * chi;
107 if (SpinAlignedEOBversion == 4)
117 m1PlusEtaKK = -1. + eta*KK;
118 const REAL8 invm1PlusEtaKK = 1./m1PlusEtaKK;
120 coeffs->
k0 =
k0 = KK*(m1PlusEtaKK - 1.);
121 coeffs->
k1 =
k1 = - 2.*(
k0 + KK)*m1PlusEtaKK;
124 coeffs->
k2 =
k2 = (
k1 * (
k1 - 4.*m1PlusEtaKK)) * 0.5 -
a*
a*
k0*m1PlusEtaKK*m1PlusEtaKK;
125 coeffs->
k3 =
k3 = -(
k1*
k1)*
k1 * third +
k1*
k2 + (
k1*
k1)*m1PlusEtaKK - 2.*(
k2 - m1PlusEtaKK)*m1PlusEtaKK -
a*
a*
k1*(m1PlusEtaKK*m1PlusEtaKK);
127 + (48./96.)*(
a*
a)*(
k1*
k1 - 2.*
k2)*(m1PlusEtaKK*m1PlusEtaKK) +
128 (96./96.)*
k1*(
k3 + 2.*
k2*m1PlusEtaKK) - m1PlusEtaKK*((192./96.)*
k3 + m1PlusEtaKK*(-(3008./96.) + (123./96.)*
LAL_PI*
LAL_PI)));
129 #define ifthenelsezero(cond, ifvalue) ((0.5 + copysign(0.5, cond)) * (ifvalue))
131 m1PlusEtaKK*m1PlusEtaKK
133 - third*(
a*
a)*(k1p3-3.*(
k1*
k2)+3.*
k3)
134 - ((k1p3*k1p2)-5.*(k1p3*
k2)+5.*
k1*
k2*
k2+5.*k1p2*
k3-5.*
k2*
k3-5.*
k1*
k4)*fifth*invm1PlusEtaKK*invm1PlusEtaKK
135 + ((k1p2*k1p2)-4.*(k1p2*
k2)+2.*
k2*
k2+4.*
k1*
k3-4.*
k4)*0.5*invm1PlusEtaKK+(256./5.)*ln2)
137 coeffs->
k5l= k5l=
ifthenelsezero(SpinAlignedEOBversion-1.5, (m1PlusEtaKK*m1PlusEtaKK) * (64./5.));
138 if ( SpinAlignedEOBversion == 4 ) {
139 coeffs->
k5 =
k5 = m1PlusEtaKK*m1PlusEtaKK
141 - third*(
a*
a)*(k1p3-3.*(
k1*
k2)+3.*
k3)
142 - ((k1p3*k1p2)-5.*(k1p3*
k2)+5.*
k1*
k2*
k2+5.*k1p2*
k3-5.*
k2*
k3-5.*
k1*
k4)*fifth*invm1PlusEtaKK*invm1PlusEtaKK
143 + ((k1p2*k1p2)-4.*(k1p2*
k2)+2.*
k2*
k2+4.*
k1*
k3-4.*
k4)*0.5*invm1PlusEtaKK+(256./5.)*ln2 + (41. *
LAL_PI *
LAL_PI / 32. -
145 coeffs->
k5l= k5l= (m1PlusEtaKK*m1PlusEtaKK) * (64./5.);
151 coeffs->
d1v2 =
ifthenelsezero(SpinAlignedEOBversion-1.5, -74.71 - 156.*eta + 627.5*eta*eta);
154 if (SpinAlignedEOBversion==4) {
194 const UINT4 SpinAlignedEOBversion
207 const int debugPK = 0;
210 XLAL_PRINT_INFO(
"In XLALSimIMRCalculateSpinPrecEOBHCoeffs: SpinAlignedEOBversion = %d,%d\n",
215 static const REAL8 third = 1. / 3.;
216 static const REAL8 fifth = 1. / 5.;
217 static const REAL8 ln2 = 0.6931471805599453094172321214581765680755;
220 REAL8 eta2 = eta * eta, eta3 = eta2 * eta;
221 REAL8 chi2 = chi * chi, chi3 = chi2 * chi;
223 if (SpinAlignedEOBversion == 4)
233 m1PlusEtaKK = -1. + eta * KK;
234 const REAL8 invm1PlusEtaKK = 1. / m1PlusEtaKK;
236 coeffs->
k0 =
k0 = KK * (m1PlusEtaKK - 1.);
237 coeffs->
k1 =
k1 = -2. * (
k0 + KK) * m1PlusEtaKK;
240 coeffs->
k2 =
k2 = (
k1 * (
k1 - 4. * m1PlusEtaKK)) * 0.5 -
a *
a *
k0 * m1PlusEtaKK * m1PlusEtaKK;
241 coeffs->
k3 =
k3 = -(
k1 *
k1) *
k1 * third +
k1 *
k2 + (
k1 *
k1) * m1PlusEtaKK - 2. * (
k2 - m1PlusEtaKK) * m1PlusEtaKK -
a *
a *
k1 * (m1PlusEtaKK * m1PlusEtaKK);
242 coeffs->
k4 =
k4 = ((24. / 96.) * (
k1 *
k1) * (
k1 *
k1) - (96. / 96.) * (
k1 *
k1) *
k2 + (48. / 96.) *
k2 *
k2 - (64. / 96.) * (
k1 *
k1) *
k1 * m1PlusEtaKK + (48. / 96.) * (
a *
a) * (
k1 *
k1 - 2. *
k2) * (m1PlusEtaKK * m1PlusEtaKK) +
243 (96. / 96.) *
k1 * (
k3 + 2. *
k2 * m1PlusEtaKK) - m1PlusEtaKK * ((192. / 96.) *
k3 + m1PlusEtaKK * (-(3008. / 96.) + (123. / 96.) *
LAL_PI *
LAL_PI)));
244 if (SpinAlignedEOBversion == 4)
247 coeffs->
k5 =
k5 = m1PlusEtaKK * m1PlusEtaKK * (-4237. / 60. + 128. / 5. *
LAL_GAMMA + 2275. *
LAL_PI *
LAL_PI / 512. - third * (
a *
a) * (k1p3 - 3. * (
k1 *
k2) + 3. *
k3) - ((k1p3 * k1p2) - 5. * (k1p3 *
k2) + 5. *
k1 *
k2 *
k2 + 5. * k1p2 *
k3 - 5. *
k2 *
k3 - 5. *
k1 *
k4) * fifth * invm1PlusEtaKK * invm1PlusEtaKK + ((k1p2 * k1p2) - 4. * (k1p2 *
k2) + 2. *
k2 *
k2 + 4. *
k1 *
k3 - 4. *
k4) * 0.5 * invm1PlusEtaKK + (256. / 5.) * ln2 + (41. *
LAL_PI *
LAL_PI / 32. - 221. / 6.) * eta);
249 coeffs->
k5l = k5l = (m1PlusEtaKK * m1PlusEtaKK) * (64. / 5.);
253 if (SpinAlignedEOBversion == 4)
#define ifthenelse(cond, ifvalue, elsevalue)
static int XLALSimIMRCalculateSpinPrecEOBHCoeffs_v2(SpinEOBHCoeffs *coeffs, const REAL8 eta, REAL8 a, REAL8 chi, const UINT4 SpinAlignedEOBversion)
This function is used to calculate some coefficients which will be used in the spinning EOB Hamiltoni...
static int XLALSimIMRCalculateSpinPrecEOBHCoeffs(SpinEOBHCoeffs *coeffs, const REAL8 eta, const REAL8 a, const UINT4 SpinAlignedEOBversion)
This function is used to calculate some coefficients which will be used in the spinning EOB Hamiltoni...
#define ifthenelsezero(cond, ifvalue)
static const REAL8 coeff12dSO
static const REAL8 coeff00dSO
static const REAL8 coeff02K
static const REAL8 coeff21dSO
static const REAL8 coeff12dSS
static const REAL8 coeff31dSS
static const REAL8 coeff20K
static const REAL8 coeff31dSO
static const REAL8 coeff32dSS
static const REAL8 coeff23K
static const REAL8 coeff33K
static const REAL8 coeff32K
static const REAL8 coeff11dSS
static const REAL8 coeff11dSO
static const REAL8 coeff21K
static const REAL8 coeff10dSO
static const REAL8 coeff31K
static const REAL8 coeff23dSO
static const REAL8 coeff10dSS
static const REAL8 coeff01K
static const REAL8 coeff02dSS
static const REAL8 coeff13dSS
static const REAL8 coeff10K
static const REAL8 coeff20dSS
static const REAL8 coeff30dSS
static const REAL8 coeff11K
static const REAL8 coeff03K
static const REAL8 coeff22K
static const REAL8 coeff23dSS
static const REAL8 coeff20dSO
static const REAL8 coeff03dSS
static const REAL8 coeff22dSO
static const REAL8 coeff32dSO
static const REAL8 coeff33dSS
static const REAL8 coeff33dSO
static const REAL8 coeff01dSS
static const REAL8 coeff02dSO
static const REAL8 coeff03dSO
static const REAL8 coeff21dSS
static const REAL8 coeff13K
static const REAL8 coeff22dSS
static const REAL8 coeff00K
static const REAL8 coeff00dSS
static const REAL8 coeff01dSO
static const REAL8 coeff12K
static const REAL8 coeff30K
static const REAL8 coeff30dSO
static const REAL8 coeff13dSO
#define XLAL_PRINT_INFO(...)
Parameters for the spinning EOB model, used in calculating the Hamiltonian.
UINT4 SpinAlignedEOBversion