LALSimulation  5.4.0.1-fe68b98
LALSimIMRSpinEOBAuxFuncs.c
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2011 Craig Robinson, Enrico Barausse
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19 
20 /**
21  * \author Craig Robinson, Collin Capano, Yi Pan
22  *
23  * \ file
24  *
25  * \brief Functions for producing EOB waveforms for
26  * spinning binaries, as described in Barausse and Buonanno PRD 81, 084024 (2010).
27  */
28 
29 #ifndef _LALSIMIMREOBSPINAUXFUNCS_C
30 #define _LALSIMIMREOBSPINAUXFUNCS_C
31 
32 #include <complex.h>
33 #include "LALSimIMREOBNRv2.h"
34 
35 /*------------------------------------------------------------------------------------------
36  *
37  * Prototypes of functions defined in this code.
38  *
39  *------------------------------------------------------------------------------------------
40  */
41 
43  REAL8Vector *sigmaKerr,
44  REAL8 mass1,
45  REAL8 mass2,
46  REAL8Vector *s1,
47  REAL8Vector *s2 );
48 
50  REAL8Vector *sigmaStar,
51  REAL8 mass1,
52  REAL8 mass2,
53  REAL8Vector *s1,
54  REAL8Vector *s2 );
55 
56 /*------------------------------------------------------------------------------------------
57  *
58  * Defintions of functions.
59  *
60  *------------------------------------------------------------------------------------------
61  */
62 
63 /**
64  * Function to calculate normalized spin of the deformed-Kerr background in SEOBNRv1.
65  * Eq. 5.2 of Barausse and Buonanno PRD 81, 084024 (2010).
66  */
68  REAL8Vector *sigmaKerr, /**<< OUTPUT, normalized (to total mass) spin of deformed-Kerr */
69  REAL8 mass1, /**<< mass 1 */
70  REAL8 mass2, /**<< mass 2 */
71  REAL8Vector *s1, /**<< spin vector 1 */
72  REAL8Vector *s2 /**<< spin vector 2 */)
73 {
74 
75  UINT4 i;
76  REAL8 totalMass = mass1 + mass2;
77 
78  for ( i = 0; i < 3; i++ )
79  {
80  sigmaKerr->data[i] = (s1->data[i] + s2->data[i])/(totalMass*totalMass);
81  }
82 
83  return XLAL_SUCCESS;
84 }
85 
86 /**
87  * Function to calculate normalized spin of the test particle in SEOBNRv1.
88  * Eq. 5.3 of Barausse and Buonanno PRD 81, 084024 (2010).
89  */
91  REAL8Vector *sigmaStar, /**<< OUTPUT, normalized (to total mass) spin of test particle */
92  REAL8 mass1, /**<< mass 1 */
93  REAL8 mass2, /**<< mass 2 */
94  REAL8Vector *s1, /**<< spin vector 1 */
95  REAL8Vector *s2 /**<< spin vector 2 */)
96 {
97 
98  UINT4 i;
99  REAL8 totalMass = mass1 + mass2;
100 
101  for ( i = 0; i < 3; i++ )
102  {
103  sigmaStar->data[i] = (mass2/mass1 * s1->data[i] + mass1/mass2 * s2->data[i])/(totalMass*totalMass);
104  }
105 
106  return XLAL_SUCCESS;
107 }
108 
109 
110 #endif /* _LALSIMIMREOBSPINAUXFUNCS_C */
static int XLALSimIMRSpinEOBCalculateSigmaKerr(REAL8Vector *sigmaKerr, REAL8 mass1, REAL8 mass2, REAL8Vector *s1, REAL8Vector *s2)
Function to calculate normalized spin of the deformed-Kerr background in SEOBNRv1.
static int XLALSimIMRSpinEOBCalculateSigmaStar(REAL8Vector *sigmaStar, REAL8 mass1, REAL8 mass2, REAL8Vector *s1, REAL8Vector *s2)
Function to calculate normalized spin of the test particle in SEOBNRv1.
double i
Definition: bh_ringdown.c:118
double REAL8
uint32_t UINT4
XLAL_SUCCESS
REAL8 * data