Theoretical groundwork supporting the precessing-spin two-body dynamics of the effective-one-body waveform models SEOBNRv5

Waveform models are essential for gravitational-wave (GW) detection and parameter estimation of coalescing compact-object binaries. More accurate models are required for the increasing sensitivity of current and future GW detectors. The effective-one-body (EOB) formalism combines the post-Newtonian (PN) and small mass-ratio approximations with numerical-relativity results, and produces highly accurate inspiral-merger-ringdown waveforms. In this paper, we derive the analytical precessing-spin two-body dynamics for the SEOBNRv5 waveform model, which has been developed for the upcoming LIGO-Virgo-KAGRA observing run. We obtain an EOB Hamiltonian that reduces to the exact Kerr Hamiltonian in the test-mass limit. It includes the full 4PN precessing-spin information, and is valid for generic compact objects (i.e., for black holes or neutron stars). We also build an efficient and accurate EOB Hamiltonian that includes partial precessional effects, notably orbit-averaged in-plane spin effects for circular orbits, and derive 4PN-expanded precessing-spin equations of motion, consistent with such an EOB Hamiltonian. The results were used to build the computationally-efficient precessing-spin multipolar SEOBNRv5PHM waveform model.


I. INTRODUCTION
Since 2015, gravitational-wave (GW) observations [1][2][3] by the LIGO and Virgo detectors [4,5] have significantly improved our understanding of binary black holes (BHs) and neutron stars (NSs), and their astrophysical formation channels [6][7][8].Making these detections and inferring the properties of GW sources requires accurate waveform models, and the accuracy requirements for these models will increase significantly [9] with upgrades to current GW detectors [10], and with future detectors in space and on the ground, such as LISA [11], the Einstein Telescope [12] and Cosmic Explorer [13,14].
Numerical relativity (NR) simulations [15][16][17] provide very accurate waveforms, but they are computationally expensive, which makes it important to develop waveform models that combine analytical approximation methods with NR results to produce longer waveforms and to cover the entire parameter space of binary systems.The most commonly used approaches for GW sources of groundbased detectors are post-Newtonian (PN), NR surrogate, phenomenological, and effective-one-body (EOB) waveform models.
EOB waveform models consist of three main components: (i) the Hamiltonian, which describes the conservative binary dynamics, and from which one obtains the equations of motion (EOMs); (ii) the inspiral-mergerringdown waveform, which resums PN information for the inspiral and includes functional fits to NR results for the plunge and merger-ringdown parts; and (iii) the radiation reaction (RR) force, which is computed from the inspiral waveform modes and is added to the EOMs to account for the energy and angular momentum losses due to the emitted GWs.
Two main families of EOB waveform models exist: SEOBNR (e.g., see Refs.[107,108,111]) and TEOBResumS (e.g., see Refs.[113,115,150]).In this paper, we derive the analytical precessing-spin two-body dynamics of the SEOBNRv5 waveform model 1 , which has been developed for the upcoming LIGO-Virgo-KAGRA observing run (O4) [151].This waveform model has been built in Python language and is publicly available.Details of the model are provided in Ref. [152] for the software (pySEOBNR), in Ref. [153] for the aligned-spin model (SEOBNRv5HM), in Ref. [154] for the precessing-spin model (SEOBNRv5PHM), and in Ref. [155] for the inclusion of second-order gravitational self-force results in the nonspinning dissipative sector of the SEOBNRv5 dynamics.
This paper is organized as follows.In Sec.II, we derive a Hamiltonian, H prec EOB , that includes the full 4PN precessing-spin information, and reduces in the test-mass limit to the exact Hamiltonian of a nonspinning point particle in Kerr background.The Hamiltonian is valid for generic orbits (inclined, circular or eccentric), and for generic compact objects (BHs or NSs), since we include the spin-multipole constants, which account for the tidal deformability of the compact object due to its spin.As realized in Refs.[109-111, 156, 157], solving the EOMs when using the full precessing-spin EOB Hamiltonian can be computationally expensive.Therefore, to develop a more efficient model, we first build a simpler EOB Hamiltonian that includes partial precessional effects, H pprec EOB .Notably, we incorporate in such Hamiltonian in-plane spin effects only for circular orbits, and average them over an orbit, while neglecting fourth order spin terms.
Then, building on previous studies [79,114,115,158], which employed an aligned-spin orbital dynamics in the co-precessing frame [31,[159][160][161] and PN-expanded precessing-spin equations, we derive in Sec.III PNexpanded, orbit-averaged, precessing-spin equations for quasi-circular orbits, and couple them consistently with H pprec EOB , which is not restricted to aligned spins.We include in the PN-expanded EOMs, the spin-orbit (SO) and spin-spin (SS) couplings to next-to-next-to-leading order (NNLO), which generalizes some results in the literature [39,114,158,162] to higher PN orders for the SS coupling.Furthermore, even for the SO contributions, our results for the EOMs employ a different gauge and spin-supplementary condition (SSC), to be consistent with the Hamiltonian, which leads to some differences compared to previous results in the literature.
We summarize our results in Sec.IV, and include a few Appendices with more details about some aspects of the calculations.We provide our results as Mathematica files in the Supplemental Material [163].

Notation
We use geometric units in which c = G = 1.
1 SEOBNRv5 is publicly available through the python package pySEOBNR git.ligo.org/waveforms/software/pyseobnr.Stable versions of pySEOBNR are published through the Python Package Index (PyPI), and can be installed via pip install pyseobnr.
We consider a binary with masses m 1 and m 2 , with m 1 ≥ m 2 , and define the total mass M , reduced mass µ, symmetric mass ratio ν, anti-symmetric mass ratio δ, and relative masses X i as follows: where i = 1, 2. We denote the spin vector of each body by S i , and define the dimensionless spins χ i as along with the intermediate definition for a i .The spin magnitudes χ i vary between -1 and 1, with positive spins being in the direction of the orbital angular momentum.We define the following combinations of a i : The spin quadrupole, octupole, and hexadecapole constants are denoted C iES 2 , C iBS 3 , and C iES 4 , respectively.These constants equal one for BHs, but are greater than one for NSs.We define such that expressions for BHs can be easily recovered by setting C ... → 0. To simplify some expressions, we define the following combinations of spins and multipole constants: which are zero for BHs (see below the definition of n).
In the binary's center-of-mass, we denote the relative position and momentum vectors, r and p, with where n ≡ r/r, L is the orbital angular momentum with magnitude L, and J = L + S 1 + S 2 is the total angular momentum.For precessing spins, we use the spherical-coordinates phase-space variables {r, θ, φ, p r , p θ , p φ }, where θ is the polar angle, φ is the azimuthal angle, and p φ and p θ are their conjugate momenta.For equatorial orbits (aligned spins), the angular momentum reduces to L = p φ .
For precessing spins, we use two orthonormal frames: {l, n, λ} and {l N , n, λ N }.In both frames, n is the unit vector in the direction of r.The vector l is the direction of L, while l N is the direction of L N ≡ µr × v, where v ≡ ṙ is the velocity with ˙≡ d/dt being the time derivative.The other unit vectors are defined by λ ≡ l × n and λ N ≡ l N × n.
The orbital angular frequency is denoted Ω, and we define the velocity parameter v ≡ (M Ω) 1/3 .We also often use u ≡ M/r instead of r.

II. HAMILTONIAN
In the EOB formalism, the Hamiltonian H EOB , describing the conservative binary dynamics, is related to an effective Hamiltonian H eff , describing the dynamics of a test body in a deformed BH background, with ν being the deformation, via the energy map [82] For nonspinning binaries, in the ν → 0 limit, H eff reduces to the Hamiltonian of a (nonspinning) test mass in a Schwarzschild background.The nonspinning EOB Hamiltonian was first derived in Refs.[82,83] with 2PN information, and then extended to 3PN [84] and 4PN [93], with partial information at 5PN [164][165][166] and 6PN [167,168].
For spinning binaries, one can follow two strategies: either map the spinning binary dynamics into that of a test mass or a test spin in a deformed Kerr background.Indeed, the first spinning EOB Hamiltonian [85] was constructed based on the Hamiltonian for the geodesic motion of a test mass in Kerr spacetime, while including leading-order (LO) SO and SS effects.This was later extended to the next-to-leading order (NLO) [96] and NNLO [101] SO levels, in addition to the NLO SS level for aligned [102,169,170] and precessing spins [103], then to NNLO SS for aligned spins and circular orbits [112], which was used to build the (publicly available) TEOBResumS waveform model [114,115].The complete 4PN conservative dynamics for precessing spins and generic orbits was incorporated in EOB Hamiltonians in Ref. [104], and the 4.5PN SO dynamics in Refs.[171,172].
The second strategy, which maps the spinning binary dynamics into that of a test spin, was first developed in Ref. [173] (to pole-dipole order) with NLO SO and LO SS corrections [99], and then extended to NNLO SO in Ref. [100].Such a Hamiltonian is applicable for generic (precessing) spins, and reproduces (resums) spin-orbit couplings at all PN orders in the test-body limit, which makes it more complicated than Hamiltonians based on the dynamics of a test mass.The test-spin dynamics was augmented to quadrupolar order in Ref. [174], and the EOB Hamiltonian was extended to 4PN order in Ref. [104].
The first SEOBNR waveform model developed for aligned-spin BHs [97] used an effective Hamiltonian for a test mass in a deformed Kerr spacetime.Subsequently, the SEOBNRv1 [105], SEOBNRv2 [106], SEOBNRv3 [109,110], and SEOBNRv4 [107,108,111] models, publicly available in the LIGO Algorithm Library [175], employed an effective Hamiltonian for a test spin in a deformed Kerr background.Here, to build the SEOBNRv5 model [153,154], we take the effective Hamiltonian to be a deformation of the test-mass Kerr Hamiltonian.The masses of the background BH and test mass are identified to be M = m 1 + m 2 and µ = m 1 m 2 /M , respectively, while the Kerr spin a is mapped to be An advantage of this map, besides its simplicity, is that the Kerr Hamiltonian reproduces all even-in-spin leading PN orders for binary BHs [176].
In the following subsections, we begin by reviewing the Kerr Hamiltonian, and by building on it, we construct the effective Hamiltonian, which we first present for nonspinning binaries, then for aligned and precessing spins.We end this section by describing the differences between our EOB Hamiltonian and others in the literature.In Sec.(III A), we obtain a more computationally efficient precessing-spin Hamiltonian, albeit with partial precession effects.More specifically, when PN expanded, such a simplified Hamiltonian reduces to the (PN-expanded) precessing-spin Hamiltonian at cubic-in-spin order, with orbit-averaged in-plane-spin effects for circular orbits.
For convenience, Table I summarizes the Hamiltonians used in this paper.to O(S 3 ) (included), with orbit-averaged in-plane-spin effects for circular orbits (pr = 0)

A. Kerr Hamiltonian
In Boyer-Lindquist coordinates (t, r, θ, φ), the (inverse) Kerr metric g µν Kerr can be expressed by the line element (see, e.g., Refs.[174,220]) where M is the mass of the BH, a is its spin, and The Kerr Hamiltonian for a nonspinning test mass H Kerr can be obtained by solving the mass-shell constraint g µν Kerr p µ p ν = −µ 2 for H Kerr , where µ is the mass of the test mass and p µ = (−H Kerr , p r , p θ , p φ ).
Instead of using components to express the Kerr Hamiltonian, we transform to a 3-vector notation, following Ref.[103], by treating the Boyer-Lindquist coordinates as spherical coordinates, with r = r(sin θ cos φ, sin θ sin φ, cos θ) and a = (0, 0, a), in addition to writing the momentum components in terms of the momentum vector p using The Kerr Hamiltonian can then be written as [103,104] The first term in Eq. ( 13) only contains odd-in-spin contributions, while the square root is the even-in-spin part, with and where we used a cos θ = n • a, a 2 sin 2 θ = a 2 − (n • a) 2 , and a 2 p 2 φ /r 2 = (n × p • a) 2 .For equatorial orbits, the Kerr Hamiltonian reduces to where In the zero-spin limit, we obtain the Schwarzschild Hamiltonian

B. Effective Hamiltonian for nonspinning binaries
The effective Hamiltonian for nonspinning (noS) binaries can be expressed as where Q noS (r, p r ) is at least quartic in p r .In the testmass limit, we have and the effective Hamiltonian reduces to Eq. (18).For the potentials A noS , DnoS , and Q noS , we use the results of Ref. [165] (see where u ≡ M/r, γ E ≃ 0.5772 is the Euler gamma constant, and we replaced the coefficient of u 6 in A noS , except for the log part, by the parameter a 6 , which is calibrated to quasi-circular NR simulations.Note that we pull out a factor of ν from a 6 compared to its definition in Ref. [165].Then, we perform a (1,5) Padé resummation of A Tay noS (u), while treating ln u as a constant, i.e., we use The Padé resummation of A noS was first introduced in Ref. [84] at 3PN order to ensure the presence of an innermost stable circular orbit (ISCO) in the EOB dynamics for any mass ratio.It was then adopted in the initial nonspinning and spinning EOBNR models (e.g., see Refs. [87,91,97]), and in all TEOBResumS models (e.g., see Refs.[88,96,113,115,150]).
The 5PN potential DnoS reads DTay noS = 1 + 6νu where we set the remaining unknown coefficient d ν 2 5 to zero, but it can be determined in the future from PN calculations, or replaced by a calibration parameter to NR results for eccentric orbits.To improve agreement with NR, we perform a (2,3) Padé resummation of DTay noS (u), i.e., The 5.5PN contributions to A noS and DnoS are known [93,165]; however, since we Padé resum these potentials, we find it more convenient to stop at 5PN.For Q noS , we use the full 5.5PN expansion, which is also expanded in eccentricity to O(p 8 r ), and it reads [165,168]

C. Effective Hamiltonian for aligned spins
For aligned spins, the effective Hamiltonian reduces to the equatorial Kerr Hamiltonian ( 16) in the test-mass limit.To include PN information for arbitrary mass ratios, we use the following ansatz: where the gyro-gravitomagnetic factors 2 g a+ and g a− include the SO corrections, SO calib is a calibration term to NR results, and G align a 3 contains cubic-in-spin corrections.The nonspinning and SS contributions are included in A align , B align np and Q align , while the quartic-in-spin corrections are added in A align .The potential B Kerr eq npa is kept the same as in the Kerr Hamiltonian for equatorial orbits.
In some papers [96,101], the gyro-gravitomagnetic factors in the SO part of the Hamiltonian were chosen to be in a gauge such that they are functions of 1/r and p 2 r only, but other papers [99,100] made different choices. 2 The SO part of EOB Hamiltonians is often expressed in terms of S ≡ S 1 + S 2 and S * ≡ S 1 m 2 /m 1 + S 2 m 1 /m 2 , i.e., H SO ∝ (g S S + g S * S * ) p φ /r 3 .The relation between the gyrogravitomagnetic factors in this case and our definition in Eq. ( 26) is that For SEOBNRv5, we find better results when using a gauge in which g a+ and g a− depend on 1/r and L 2 /r where the square brackets collect different PN orders, and we defined L ≡ L/(M µ).These PN expressions were obtained by canonically transforming the 3.5PN results of, e.g., Ref. [203].The 4.5PN SO coupling was derived in Refs.[171,172,221,222], and can be included in the effective Hamiltonian.However, we found that using a calibration term at 5.5PN had a small effect on the dynamics, and thus only included the 3.5PN information with a 4.5PN calibration term of the form For completeness, we write the 4.5PN part in terms of L 2 /r 2 instead of p 2 r , which we obtained by canonically transforming Eq. (5.6) of Ref. [172], leading to For the cubic-in-spin term G align a 3 in Eq. ( 26), we obtain where only the first two terms contribute for BHs.The coefficients C ... ± are defined in Eq. ( 5).As mentioned, we include SS and S 4 PN information in the effective Hamiltonian (26) through the following ansatz (cf.Eqs. ( 17)): where the nonspinning contributions A noS , DnoS and Q noS are given by Eqs. ( 22), ( 24) and ( 25), respectively.For the SS contributions, we obtain The quartic-in-spin contribution in A is given by which vanishes for BHs since the Kerr Hamiltonian with the mapping (8) reproduces it [176].

D. Effective Hamiltonian for precessing spins
For precessing spins, we derive an effective Hamiltonian that reduces to the Kerr Hamiltonian in Eq. ( 13), and includes higher PN information through the following ansatz: Similarly to the aligned-spin case, g a+ and g a− include the SO corrections, SO calib is an NR calibration term, and G prec a 3 contains S 3 corrections.The nonspinning and SS contributions are included in A prec , B prec p , B prec np and Q prec , while the S 4 corrections are added in A prec .The potential B Kerr npa is the same as in the Kerr Hamiltonian.The gyro-gravitomagnetic factors g a+ and g a− are given by Eq. ( 28); the same as in the aligned-spin case, since they are independent of spin.The calibration term is also similar, except for adding a dot product For the cubic-in-spin term G prec a 3 , we obtain We include SS and S 4 PN information in the effective Hamiltonian (35) through the following ansatz for the potentials (cf.Eq. ( 14)): where the nonspinning contributions A noS , DnoS and Q noS are given by Eqs. ( 22), ( 24) and ( 25), respectively, while only contain in-plane spin components, which vanish in the aligned-spin case.The spin-spin contributions read while the quartic-in-spin contributions in A prec are given by which are zero for BHs.

E. Hamiltonian in tortoise coordinates
EOB waveform models often use the tortoisecoordinate p r * instead of p r , since it improves stability of the EOMs near the event horizon [97,223].In the nonspinning case, the tortoise-coordinate r * is defined by and the conjugate momentum p r * is given by The nonspinning effective Hamiltonian in Eq. ( 19) can be written in terms of p r * as where we obtain Q noS (r, p r * ) from Eq. ( 25) by converting p r to p r * using Eq. ( 42), then PN expand to 5.5PN.
For both aligned and precessing spins, a convenient choice for ξ(r) is which is similar to what was used for ξ in SEOBNRv4 [97,105] except for the different resummation and PN orders in A noS and DnoS .In the ν → 0 limit, ξ reduces to the Kerr value (dr/dr * ) Kerr = (r 2 − 2M r + a 2 + )/(r 2 + a 2 + ).The PN expansion of ξ(r) is given by which equals one at LO, while the spin contribution enters at 3PN.Hence, we can directly replace p r by p r * in the 3.5PN S 3 and 4PN SS contributions in the Hamiltonian.

F. Comparison with other models
In this Section, we obtained an EOB Hamiltonian that reduces in the ν → 0 limit to the Kerr Hamiltonian for a nonspinning test mass in a generic orbit.The nonspinning part of the Hamiltonian contains 4PN and partial 5PN results, which are Padé resummed.The Hamiltonian also includes the full 4PN precessing-spin contributions, which are the same PN information included in the Hamiltonians derived in Ref. [104], which extended the results of Ref. [103] to higher orders; however, we use different resummations/factorizations from those employed in the above references.
Table II summarizes the main features of the SEOBNRv5 Hamiltonian, and compares it to two other waveform models: SEOBNRv4 [99,100,107,111] and TEOBResumS [102,112,113].

III. COMPUTATIONALLY EFFICIENT PRECESSING-SPIN DYNAMICS
In Sec.II D, we derived an effective Hamiltonian for precessing spins that reduces to the Kerr Hamiltonian for generic orbits.The EOMs from that Hamiltonian read where F is the RR force, and ṠRR i is the RR contribution to the spin-evolution equations, which starts at O(v 11 S 2 ) [224,225] and is thus neglected to the order we consider here.
These equations are computationally expensive to evolve numerically.Therefore, we simplify them such that we can solve the two-body dynamics more efficiently without losing much accuracy when describing the precessional effects.It was shown in Refs.[31,[159][160][161] that precessing-spin waveforms can be built starting from aligned-spin waveforms in the co-precessing frame, in which the z-axis remains perpendicular to the instantaneous orbital plane, and then applying a suitable rotation to the inertial frame.The precessing-spin SEOBNRv3 and SEOBNRv4 models employed the full EOB precessingspin Hamiltonian [99,100] to evolve the dynamics in the co-precessing frame.To build the precessing-spin TEOBResumS model and speed-up the computational time, Refs.[114,115] used an aligned-spin EOB Hamiltonian when evolving the EOMs in the co-precessing frame.Also, the IMRPhenomT model [79] is built using a purely aligned-spin dynamics in the co-precessing frame.
Here, to improve the accuracy in describing precession effects, we find it important to incorporate at least partial precessing-spin information in the Hamiltonian used in the co-precessing frame, as studies in Ref. [154] have demonstrated.To do that, we first obtain a precessingspin Hamiltonian simpler than the full one derived in Sec.II D, such that it reduces to H align eff for aligned spins, and only includes the in-plane spin components for circular orbits (p r = 0).Then, we orbit average the inplane spin components in the Hamiltonian, and use it to evolve the EOMs for the dynamical variables r, p r , φ and p φ , while the evolution equations for the spin and angular momentum vectors are computed in a PN-expanded, orbit-averaged form for quasi-circular orbits.The procedure to obtain the PN-expanded EOMs, and the appropriate dynamical variables, is similar to what was used in Refs.[79,114,115,158], but we include higher PN orders in the EOMs, and derive them from the SEOBNRv5 EOB Hamiltonian, employing a different gauge and SSC.Other differences in the waveform model from previous work are described in Ref. [154].
In the following subsections, we present the Hamiltonian, then derive the PN-expanded EOMs for precessing spins, in EOB coordinates, up to NNLO SO (3.5PN) and NNLO SS (4PN).

A. Hamiltonian with partial precessing-spin dynamics
The precessing-spin Hamiltonian presented in Sec.II D reduces to the exact Kerr Hamiltonian in Eq. ( 13) for generic orbits.Here, we consider a simpler Hamiltonian that starts with an ansatz similar to the aligned-spin Hamiltonian in Eqs. ( 26) and ( 32), then complement it with precessing-spin corrections for circular orbits only (i.e., we do not include in-plane spin terms proportional to p r ).Thus, this Hamiltonian reduces to H align eff from Sec. II C for aligned spins, and to H Kerr eq for ν → 0, but does not reduce to the full precessing-spin Hamiltonian H prec eff and the Kerr Hamiltonian for generic orbits.We use the following ansatz for the partial precessingspin (pprec) effective Hamiltonian (cf.Eqs. ( 26) and ( 35)) where the gyro-gravitomagnetic factors and SO calibration term are the same as in Eqs.(28) and Eq. ( 36), with the same value of d SO as the aligned-spin model.
The SS corrections are added such that (cf.Eqs. ( 32) and ( 38)) where the nonspinning contributions are given by Eqs. ( 21)-( 25), the SS corrections A prec SS , B prec np,SS and Q prec SS are the same as in Eqs.(39), and the S 4 term A prec S 4 is given by Eq. (40a).The purely in-plane SS contributions are included in Ãin plane SS and Bin plane p,SS , which are obtained by writing an ansatz with unknown coefficients and matching it to a 4PN-expanded precessingspin Hamiltonian with p r = 0. We indicate with .. the result of orbit averaging the in-plane spin components, as explained in Sec.III B below.We do not include inplane S 4 corrections for simplicity, and because it is not straightforward to consistently orbit average the S 4 terms in the Hamiltonian.Thus, the partial precessing-spin Hamiltonian agrees with the full precessing-spin Hamiltonian H prec eff from Sec. II D when PN expanded to 4PN and to O(S 3 ) (included) for circular orbits.
For the terms Ãin plane SS and Bin plane p,SS , we obtain and for the cubic-in-spin term G pprec a 3 , we get

B. Orbit averaging the precessing-spin contributions
To simplify the EOMs, we remove the explicit dependence of the Hamiltonian on the n • a i terms by taking their orbit average.Since the spin-precession timescale (∼ v −5 ) is larger than the orbital timescale (∼ v −3 ), orbit-averaging the in-plane spin contributions is expected to provide a good approximation for the dynamics.
We define the unit vectors (l N , n, λ N ) in Cartesian coordinates such that l N is aligned with the z-axis, and hence the vector components are given by l N = (0, 0, 1), n = (cos φ, sin φ, 0), λ N ≡ l N × n = (− sin φ, cos φ, 0), (51) where φ is the orbital phase.When neglecting RR effects, an orbit average yields which lead to the following relations for the spin dot products: (n (n The Hamiltonian from Sec. III A depends on (n • a + ) 2 , (n • a − ) 2 and (n • a + )(n • a − ), and can be made a function of only a ± and l N using the following orbit-averaged expressions: When taking the orbit average, we neglect RR since the Hamiltonian encodes the conservative dynamics, and the RR timescale (∼ v −8 ) is much larger than the spinprecession timescale.We account for dissipative effects in the EOMs through the RR force and the orbitalfrequency evolution equation, as described below.
When restricting to binary black holes, the explicit expression of the partial-precessing Hamiltonian as function of a ± and l N is given in Appendix A of Ref. [154].

C. Equations of motion
The "Newtonian" angular-momentum vector L N is perpendicular to the instantaneous orbital plane, since it is defined by where v ≡ ṙ is the velocity.We use a co-precessing frame aligned with the orthonormal unit vectors (l N , n, λ N ), with l N being the direction of L N .Since l N is perpendicular to r and v, we can write the velocity as which can be considered as a definition for the orbital frequency Ω, implying that Ω = |n × v|/r.The Hamiltonian is expressed in terms of the canonical angular momentum L ≡ r × p.We denote the L-based unit vectors by (l, n, λ), where l is the direction of L and λ ≡ l × n, then express the EOMs derived from the Hamiltonian in terms of l N .
In the co-precessing frame, the partial precessing-spin dynamics can be approximated by the following EOMs: where H pprec EOB is related to H pprec eff from Eq. ( 47) through Eq. ( 7), and the quantities G pprec in H pprec eff can be expressed in terms of a + , a − and l N once we replace the n • a ± terms by their orbit average using Eq.(54).The explicit expressions are given in Appendix A of Ref. [154].
At each time step, we also evolve the PN-expanded equations for the spins and angular momentum, given by Ṡi = Ω Si × S i , where v ≡ (M Ω) 1/3 , and Ω Si ≡ ∂H prec EOB /∂S i is the spinprecession frequency, computed in a PN expansion from the precessing-spin EOB Hamiltonian.These equations are derived in the following subsections to NNLO SS in an orbit average for quasi-circular orbits.
Equations ( 57) and ( 58) can be solved simultaneously for the dynamical variables.Alternatively, they can be decoupled by computing the orbital frequency used in Eqs.(58) in a PN expansion, which can be expressed as where E(v) is the energy of the binary system and Ė(v) is the rate of energy loss.
In Sec.III F below, we obtain v in a PN-expanded form, including the NNLO SS contribution that was recently derived in the flux in Ref. [229].In all equations derived in this Section, we include PN orders up to NNLO SS, which implies different powers in v for each quantity depending on the LO, as summarized in Table III.
Some precessing-spin waveform models, such as Refs.[109,111,230], considered a co-precessing frame adapted to the orbital angular momentum L, instead of L N .Therefore, for completeness, we also provide in Appendix C, the EOMs expressed in terms of l.

D. Angular momentum vector
To obtain the angular momentum unit vector l in terms of l N , we first use the EOMs (46), and the definition of L N from Eq. ( 55), to get l N in a PN expansion, i.e., where we use the Hamiltonian before taking the orbit average of the in-plane spin terms.
Then, we specialize to circular orbits, which are defined by p r = 0 and ṗr = 0. To obtain r and L as functions of v for circular orbits, we solve for r(l, λ, n, S i , v) and L(l, λ, n, S i , v), perturbatively in a PN expansion, after using the EOMs (46) without RR.
We substitute that solution for r and L in Eq. ( 60), and replace λ using which implies that That way, the right-hand side of Eq. ( 60) only depends on l, l N , λ N , v and the spins.
To solve Eq. ( 60) for l(l N , λ N , S i , v), we expand it in spin, such that since l is in the same direction as l N for nonspinning binaries, while l SO and l SS are the SO and SS contributions.Solving order by order in spin, we obtain which is independent of the spin-quadrupole constants.Substituting l(l N ) in the solution of Eqs.(61) yields r(l N , λ N , n, S i , v) and L(l N , λ N , n, S i , v), which are given in Appendix A. Finally, we use these relations to obtain L = Ll and take its orbit average using Eqs.( 53), leading to For aligned spins, L(v) is gauge invariant, and our result agrees with the literature (e.g., with Refs.[202,219,229,231]).However, for precessing spins, L is gauge dependent, and our result disagrees with Refs.[114,158,202], even at LO SO, because these references used the covariant (Tulczyjew-Dixon) SSC [191,232], while we use the canonical Newton-Wigner (NW) SSC [233,234], since we are working in a Hamiltonian formalism [173,174].Appendix B shows how to transform between our result and that of Refs.[114,158,202] at LO SO.

E. Spin-evolution equations
We obtain the spin-precession frequency Ω Si by differentiating the Hamiltonian with respect to the spin vector.Then, we take the circular-orbit limit by setting p r = 0 and replacing r and L by Eqs.(A1) and (A2).Finally, averaging the spin components over an orbit using Eqs.( 53) yields and similarly Ṡ2 = Ω S2 ×S 2 , with Ω S2 given by Eq. (66b) after exchanging the two bodies' labels 1 ↔ 2. The SO and LO SS parts of the spin-precession frequency agree with the orbit-averaged results given by Eqs. ( 1)-( 5) of Ref. [114], but the NLO and NNLO SS terms do not agree with Refs.[158,235] because of the different gauge.

F. Evolution of the orbital frequency
The evolution equation for the orbital frequency is given by Eq. ( 59) in terms of the energy loss and the derivative of the binding energy.The circular-orbit bind-ing energy can be obtained from the Hamiltonian (minus the rest mass) by setting p r = 0, replacing r, L and l by Eqs.(A1), (A2) and ( 64), then taking the orbit average.This leads to Note that we did not include the 4PN nonspinning contribution in the binding energy to keep it at the same order as the energy flux, which is known to 3.5PN [236].
The NNLO SO contribution to the energy flux was de-rived in Ref. [162], while the NNLO SS (4PN beyond the LO) contribution was derived in Ref. [229], though the SS tail contribution at 3.5PN was obtained for aligned spins only.The result in Ref. [229] is expressed in terms of gauge-dependent quantities.Therefore, we use their EOMs to obtain the circular-orbit energy flux as a function of v, and orbit-average the in-plane spin components, leading to where the SS tail part (O(v 7 ) beyond the LO) is only known for aligned spins, so we expressed it in terms of l N • S i as an approximation for the precessing case, which would also depend on S 2 1 and S 1 • S 2 .Inserting E and Ė in Eq. ( 59) and PN expanding yields The SO and LO SS parts of v agree with, e.g., Eq. (A1) of Ref. [39].

G. Evolution of the angular momentum vector
To obtain the PN expansion for lN , we start from the equation for the total angular momentum J = L + S 1 + S 2 .We first neglect RR, and in the following subsection compute the RR contribution.Setting J = 0 yields where Ṡi is given by Eq. ( 66), while L can be computed by taking the time derivative of Eq. ( 65).
Solving Eq. ( 70) for lN yields  )) with Eq. (4c) of Ref. [114] provided that one uses the coefficients of L(l N ) from Eq. ( 65), instead of those in Ref. [114] because of the different SSC.Note that lN has a component parallel to l N , which enters at NLO and NNLO S 1 S 2 , and is given by 3 To solve Eq. ( 70), we split lN and Ṡi into SO and SS contributions, such that lN ≡ lSO N + lSS N and Ṡi ≡ ṠSO i + ṠSS i , then solve order by order in spin for lSO N and lSS N .When performing this calculation, several simplifications can be done: Ṡi is perpendicular to S i , leading to S 1 • Ṡ1 = 0 = S 2 • Ṡ2 , and since ṠSO i is perpendicular to l N , we get l N • ṠSO i = 0.

H. Radiation-reaction contribution to lN
When computing lN , RR enters through v, which is given by Eq. ( 69), and from the nonzero J , which is given by where we used the EOMs (46) to relate J to the RR force F .Since we are working to NNLO SS (i.e. to O(v 10 )) in L and Ṡi , we only need J to O(v 3 ) beyond its LO, which is O(v 7 ), and we can neglect the RR contribution to Ṡi because it starts at O(v 11 S 2 ) [224,225].
The RR force F for circular orbits in the SEOBNR wave-form models is chosen to be in a gauge such that [86,111] 4 Using the energy loss from Eq. ( 68) and expanding to LO SO for circular orbits, we get where we did not write the n component of F since it does not contribute to J and is proportional to p r .Then, from Eq. ( 73), and using Eq. ( 64) to replace l = n × λ by l N , we obtain Following similar steps as in the previous subsection, except for including J and v, we obtain the following RR contribution to lN : We do not include this RR contribution in the SEOBNRv5PHM waveform model [154], but we checked that it has a negligible effect on the dynamics.

IV. CONCLUSIONS
In this paper, we derived an aligned-spin Hamiltonian (Sec.II C), which is used in the SEOBNRv5HM waveform model [153], and a full precessing-spin Hamiltonian (Sec.II D) that reduces in the test-mass limit to the exact Kerr Hamiltonian for generic orbits.The Hamiltonians include the nonspinning part at 4PN order, with partial 5PN and 5.5PN results, in addition to the full 4PN spin information (NNLO SO, NNLO SS, LO S 3 , LO S 4 ).The full 5PN spin contributions (NNNLO SO and SS, NLO S 3 and S 4 ) to the conservative dynamics are known from the recent work in Refs.[171,172,221,222,[237][238][239][240][241][242], but we leave their inclusion in the Hamiltonian for future work.Our results include the spin-multipole constants, and are thus valid for NSs, though one also needs to include dynamical tidal effects, which can be included as was done in SEOBNRv4T [124].
Furthermore, we derived (in Sec.III) a simpler precessing-spin Hamiltonian, H pprec EOB , and PN-expanded EOMs, which orbit average the in-plane spin components, and are used in the computationally efficient SEOBNRv5PHM waveform model [154].We included in the EOMs the NNLO SO and SS contributions in a gauge consistent with our EOB Hamiltonian and the NW (canonical) SSC.Extending the precessing-spin EOMs to include LO S 3 and LO S 4 is straightforward, but the equations become lengthy, and would likely have a smaller effect than the error introduced due to orbit averaging the SS contributions.It would still be interesting to compute those higher-order spin contributions and quantify their effect on the dynamics.It is also important to extend the RR force and waveform modes for precessing spins beyond the LO SO and SS contributions derived in Refs.[243,244].
The results obtained in this paper have contributed to improving the accuracy of SEOBNRv5 waveform models, as detailed in Refs.[153,154].For example, Ref. [154] demonstrated that using the partially-precessing Hamiltonian H pprec EOB , and comparing the waveforms to a set of highly-precessing NR simulations, led to 100% (86.4%) of cases with a maximum unfaithfulness below 3% (1%), while using the aligned-spin Hamiltonian H align EOB led to 95.8% (75.4%) of cases below 3% (1%).Furthermore, we generally find that SEOBNRv5 waveform models provide noticeable improvements in accuracy compared to the previous version of the model, SEOBNRv4, and to other IMRPhenom and TEOBResumS models (see for example Fig. 9 of Ref. [153] and Fig. 4 of Ref. [154]).These results highlight the importance of including and resumming analytical PN information in waveform models.In this Appendix, we write r and L for circular orbits and precessing spins, which are obtained by solving Eqs.(61) and replacing l by l(l N ) from Eq. (64).
For r(l N , n, λ N , S i , v), we obtain In Sec.III, we derived the PN-expanded EOMs for precessing spins by using a frame adapted to the vector L N ≡ µr × v.In this Appendix, we include the corresponding equations in a frame adapted to the orbital angular momentum L ≡ r × p, since one can define a co-precessing frame to be aligned with l, as in the SEOBNRv4PHM waveform model [111] for example.
The EOMs in this case are given by Eqs.(57) and The effective Hamiltonian is the same as in Sec.III A, except that we replace the n • a ± terms by the following orbit average i.e., in terms of l, instead of l N as in Eqs.(54).The spin-precession frequency Ω Si can be directly computed by taking the derivative of the Hamiltonian with respect to the spin vector, then orbit averaging the inplane spin components, leading to where the nonspinning part is the same as in Eq. (69b).
Appendix A: Angular momentum and separation for circular orbits

TABLE I .
(7)mary of the Hamiltonians and their relations to each other.For each of the effective Hamiltonians, the corresponding EOB Hamiltonian is obtained via the energy map in Eq.(7).

Table IV
B prec np,SS , and Q prec SS are the same as in Eqs.(33) except for replacing a + a − by a + • a − .The other terms A in plane

TABLE II .
[103,104]f the main differences of the SEOBNRv5 Hamiltonian derived here, which builds on the results of Refs.[103,104], compared to that of SEOBNRv4 and TEOBResumS.

TABLE III .
Orders in v at which the nonspinning, SO and SS contributions first enter r, L, Ṡi, lN and v for quasi-circular orbits.The last column indicates the highest power in v we include in each quantity.
Perimeter Institute for Theoretical Physics.Research at Perimeter Institute is supported in part by the Government of Canada through the Department of Innovation, Science and Economic Development and by the Province of Ontario through the Ministry of Colleges and Universities.