Gravitational-wave events have become routine in observational astronomy: the Advanced LIGO [1]-Virgo [2] interferometers detected ten binary black hole and one binary neutron star mergers during the first and second observing runs. [3] [4] [5] [6] [7] [8] [9] . The third observing run began on 1 April 2019 and delivered by its [premature] end a year later the second binary neutron star merger [10] , the first binary black hole with a significant mass asymmetry [11] , and additionally more than four dozen triggers with false alarm rates of less than one per year [12] . Most of these triggers are likely due to the inspiral and merger of binary black holes.
In order for triggers to become confirmed events, with estimated properties such as masses and spins, parameter estimation studies must be conducted on a sufficiently "cleaned" version of the relevant segment of the detector data. This requires a large set of "realistic" theoretical gravitational waveform templates which can be cross-correlated with the data. For stellar-mass compact binary systems, there are currently three different approaches to generating the theoretical gravitational waves (GWs) resulting from the inspiral and merger of the systems: post-Newtonian theory [13] , numerical relativity, and the effective-one-body theory [14, 15] .
Post-Newtonian (PN) theory employs a largeseparation (weak-field) expansion to the Einstein field equations. Current PN technology for the evolution of quasi-circular inspirals is at the 3.5PN level with partial higher-order PN information available [16, 17] . As PN information is fully analytical, the resulting waveforms can be evaluated very quickly. Consequently, the LIGO-Virgo Collaboration (LVC) has at its disposalt a plethora of PN-based Taylor waveform approximants summarized in Ref. [18] . These approximants are employed to model the inspiral phase of binary neutron stars at low frequencies and extract the chirp mass [10, 19] .
Binary black hole (BBH) systems are more massive, thus transit through the LIGO-Virgo detection bandwidth much more quickly than binary neutron stars (BNSs), e.g., GW150914 lasted less than 20 milliseconds [3] whereas GW170817 lasted nearly a minute [4] . As such, we can detect only the last few dozen cycles of their GWs before merger. Such GWs are generated in the very-strong-gravity regime where PN approximation is not reliable. This is the domain of numerical relativity (NR). Since the breakthroughs of 2005 [20] [21] [22] , it has become routine to evolve strongly gravitating spacetimes of compact binary mergers on large computing clusters. There are now several NR catalogs containing thousands of simulations of compact binary inspirals [23] [24] [25] [26] [27] [28] [29] [30] [31] . Of these, the most comprehensive is the 2019 SXS catalog which contains 2018 simulations of precessing systems with the dimensionless Kerr spin parameter up to 0.998 [24] .
The effective-one-body (EOB) approach bridges PN theory and NR. It maps the two-body PN motion to a geodesic motion in an effective spacetime via a deformation performed in terms of a quantity called the symmetric mass ratio [14, 15] . In its core, EOB contains an effective Hamiltonian which resums the PN series in a suitable way to better embody the effects of the strong-field regime [32] . The inspiral is driven by a specially factorized/resummed radiation-reaction force [33] . The resulting multipolar gravitational waveforms are also written in a factorized form [34, 35] . The analytical EOB model is further supplemented with input from NR, thus extending the EOB evolution through the merger and, if exists, ringdown stages. These so-called EOBNR models [36] [37] [38] have been incorporated into several waveform-generating models (approximants) [37, [39] [40] [41] that are used for parameter estimation studies of LIGO-Virgo GW events. The main advantages of employing EOB-based waveform approximants for parameter estimation are that they (i) contain strong-field information (ii) can be extended to the full parameter space, and (iii) are much faster to evolve than NR simulations. In particular, EOB models are the only available method to accurately model binary neutron star coalescences from low frequencies and up to merger [19, [42] [43] [44] [45] . Thus, EOB is optimal for providing accurate waveforms for parameter estimation studies of long merger signals, and for extracting information about tides.
Although it has thus far been very difficult to distinguish the effects of precession on the gravitational waves from the few dozen sources hitherto detected, there are at least three GW events for which it has been inferred, at the 99% credible level, that the pre-merger binary components have nonzero spin. These are GW151226 [5] , where at least one black hole has dimensionless spin > 0.28 [46] , GW170729 [9, 47] , where at least one black hole has dimensionless spin > 0.27 [46] , and GW190412 where either the primary [11] or the secondary [48] has positive dimensionless spin depending on the priors used.
In binaries containing spinning black holes and/or millisecond pulsars, the spin-orbit and the spin-spin interactions contribute significantly to the phase and modulate distinguishably the amplitude of the emitted GWs. For example, there are more than 20 precession cycles contributing to the phasing of the GWs for a BNS with total mass of 3 M inspiralling from 30 Hz, [49] . Therefore, given that the required relative phase accuracy of the theoretical waveform templates must be better than ∼ 10 −3 [50] , the templates must incorporate the effects of precession. Neglecting precession for high-mass ratio binaries can cause event rate losses of ∼ 15% and as high as 25% -60% for the worst cases [51, 52] .
There has been a dedicated and an ever-increasing effort to produce accurate gravitational waveforms from precessing compact binary systems. Initial developments were made in post-Newtonian theory [53, 54] after the pioneering work of Mathisson, Papapetrou, and Dixon (MPD) on the motion of spinning test particles in curved spacetimes [55] [56] [57] . There are now several waveform approximants available for precessing spin analysis (and implemented in the LIGO Algorithm Library (LAL) [58]), which are, chiefly: (i) SpinTaylorT class of approximants which employ 1.5PN analytical expressions of Ref. [59] for the waveform harmonic modes as functions of the spherical angles of the Newtonian orbital angular momentum vector. (ii) (IMR)PhenomP class of approximants which initially transformed non-precessing waveforms into precessing waveforms using a single parameter [60] then were later upgraded to transformations consisting of Euler rotations of the modes via three Euler angles [61] [62] [63] [64] . (iii) SEOBNR class of approximants [39, 65, 66] which evolve the EOB dynamics and precession equations as a coupled system to determine the Euler angles for the rotation of the non-precessing waveform modes. (iv) NRSur class which are surrogate waveform models that interpolate large sets of numerical relativity waveforms in a certain non-inertial co-precessing frame [67, 68] . All of these approximants solve the same precession equations, albeit truncated at different PN orders or suitably incorporated into a particular EOB Hamiltonian. The solutions to the precession equations are then translated into the spherical angles of the Newtonian orbital angular momentum. On the other hand, the approximants construct the waveforms differently, but these can be grouped into two main approaches: (1) Using analytical 1.5 PN expressions of Ref. [59] . (2) Using the so-called twist method of Ref. [69] which is what concerns us in this article so we provide some details next. Note that a twisting procedure is used also in the NRsur approximants where the surrogate is trained using precessing waveforms that are Euler-rotated to the non-inertial co-orbital frame.
The seeds of the twist method were sown in Ref. [70] 1 , where it was shown that in a special non-inertial frame, called the precessing frame, the orbital phase agreed with the PN orbital phase of a non-precessing system. In other words, the modulations in the gravitational waveform phase due to precession factored out. Subsequently, Ref. [71] obtained rigorous expressions for the transformation waveform multipoles under rotations, which were then employed by Ref. [72] in order to generate precessing post-Newtonian waveforms to compare with their numerical results.
Motivated perhaps by these early works, Ref. [69] then introduced the quadrupole-aligned (QA) frame defined by the direction toward which the amplitudes of the (2, ±2) modes are maximized which turned out to coincide with the instantaneous direction of the total orbital angular momentum vector. Similarly, Ref. [73] constructed a new non-inertial frame by equating the radiation axis with the eigenvector of the rotation group generators which had the largest absolute eigenvalue. Subsequently, Ref. [74] demonstrated that the preferred precessing frames of Refs. [69, 73] are the same if one employs only the (2, ±2) modes in the m-mode sum. Additionally, Ref. [74] rigorously showed the necessity for a third Euler angle γ in order to obtain a unique precessing frame which they dubbed the minimal-rotation frame.
The size of the parameter space for generic precessing binaries presents another formidable challenge for parameter estimation as the number of intrinsic parameters increases from three (mass ratio and two spin magnitudes) for configurations where the spins are (anti)parallel to the orbital angular momentum, which we refer to as either non-precessing or aligned-spin configurations, to seven for binary black holes, and even more in the case of binary neutron stars to parametrize their tidal interaction.
As brute-force coverage of such a large space is computationally expensive, approaches based on reduced-order modelling have recently been developed starting with Ref. [75] , where the number of parameters is reduced to two in the QA frame by introducing an effective spin parameter 2 , χ eff . The precessing waveform is then obtained by twisting the QA waveform with three Euler angles as already described. Ref. [76] took this approach further by packaging the four in-plane (perpendicular to the Newtonian angular momentum) components of the binary's spin vectors into a single precession parameter, χ p , thereby reducing the dimensionality of the parameter space to four. Though most of the reduced-order models have been built for non-precessing systems [77] [78] [79] [80] [81] [82] , they have eventually led to the emergence of NR "trained" precessing surrogates [67, 68, 83, 84] . Additionally, new approaches are being developed such as "the two-harmonic approximation" [85] .
In summary, there now exist several diverse precessing waveform approximants of which the most prominent ones are SpinTaylorT4, NRSur7dq4, PhenomPv3HM (previously PhenomPv2), and SEOBNRv4PHM (previously SEOBNRv3). The latter three approximants have quickly become the preferred waveform models for parameter estimation by the LVC. Crucially, there seems to be a disagreement between the latter two for binary systems with large spins and mass ratios [86] , highlighting what one should always keep in mind: waveform approximants are approximate as the name implies so they can disagree.
This paper is the first of a series that develops TEOBResumSP, a generic-spin approximant based on the Euler rotation of aligned-spin waveforms generated by TEOBResumS [41] . TEOBResumS is a state-of-the-art aligned-spin EOBNR model with enhanced spin-orbit, spin-spin, and tidal interactions [45, 87] that is very fast [88] and robustly produces inspiral-merger-ringdown waveforms for five additional modes beside the dominant (2,2) mode [89, 90] . TEOBResumS is very different in its design from SEOBNRv4PHM, in particular in the spin sector [91] , thus provides the only fully independent waveform model from the approximants currently in use for GW analysis (e.g., PhenomPv3 uses fits of SEOBNR waveforms [66] ). Our goal in this initial implementation of TEOBResumSP is to introduce minimal modifications to the existing TEOBResumS infrastructure. Therefore, we opt for an approach whereby we produce aligned, constant spin waveforms using TEOBResumS then generate precessing waveforms by twisting the non-precessing waveforms as is done in, e.g., PhenomPv3HM.
This article is organized as follows. We start by introducing the PN precession equations in Sec. II. In Sec. III, we present some mathematical details for the waveform twist operation. In Sec. IV, we compare TEOBResumSP waveforms with the following waveform approximants:
SpinTaylorT4, NRSur7dq4, and SEOBNRv4PHM. We summarize our results in Sec. V. We work in geometrized units setting G = c = 1 from which one can recover the SI units via GM /c 3 ≈ 4.925491 × 10 −6 sec, where M denotes a solar mass. We use bold font to denote Euclidean three-vectors with an overhat representing threevectors of unit length. Overdots denote derivatives with respect to time.
Let us consider a compact binary system in a quasispherical inspiral with the subscript 1 labelling the primary and 2 labelling the secondary component. Accordingly,the individual masses are denoted by m 1 and m 2 with m 1 ≥ m 2 . The total mass is defined as M = m 1 + m 2 . Let us also introduce the mass ratio q ≡ m 2 /m 1 ≤ 1, the reduced mass µ ≡ M q/(1 + q) 2 , and the symmetric mass ratio η ≡ q/(1 + q) 2 . Note that in this article, we often set M = 1, e.g., Eqs. (1a)-(1c), but sometimes restore solar-mass units (M ) for M , cf. Eqs. (11) , (14) . We additionally endow the binary components with spins S 1 , S 2 , respectively.
The Newtonian orbital angular momentum for the binary is given by L N = µ r × v, where r, v are the relative separation and velocity vectors of the binary in the usual center-of-mass frame. Note that L N is different from its non-Newtonian counterpart L = r × p, where p is the relative momentum. This distinction, due to µv = p, is a consequence of the fully general relativistic MPD equations for the motion of a spinning test mass in curved spacetime. From PN theory, one obtains L = L N + ∆L 1PN + . . . with correction terms, ∆L nPN , known up to 3.5PN (see, e.g., Eq. (4.7) of Ref. [92] ). Note that, by definition, the Newtonian L N remains perpendicular to the orbital plane.
Let ω be the orbital frequency then via Kepler's third law: r ≡ |r| = ω −2/3 . Accordingly, L N ≡ |L N | = µr 2 ω = m 1 m 2 /ω 1/3 = η/v, where we have introduced v ≡ |v| = ω 1/3 , i.e., the relative speed between the binary's components in the usual center-of-mass frame. Clearly, v < 1 and furthermore, v 1 for most of the inspiral (recall, v = v/c in restored units). Note that each power of v corresponds to a half PN order. In this work, we will use v to track the orders in the precession equations. Consequently, we reserve expressions such as next-to-leading order (NLO) to verbally track each power of v beyond a given leading-order (LO) expression.
One can start with the general MPD equations of motion and obtain the PN expansions for the time evolution of S 1 , S 2 . The details of this derivation can be found in, e.g., Secs. II, III of Ref. [93] , and Sec. II of Ref. [94] . Up to NLO, i.e., 0.5PN, the orbital angular momentum and spin precession equations are given by [49, 95] 
Note that, as is usual in the literature, we present the orbit-averaged evolution equations. As such, our solutions to these equations do not capture the nutation of L N , but this is of no consequence for parameter estimation purposes at the sensitivity of the advanced GW detectors [96] . For non-averaged versions, cf. App. A of Ref. [93] . The particular form of Eq. (1c) above is the result of total angular momentum conservation:J = 0, where J = L + S with S ≡ S 1 + S 2 . The forms of Eqs. (1a-1c) have the added benefit that the evolution of the Newtonian orbital angular momentum can be written as a classical mechanical precession equation:
where Ω NLO can be extracted straightforwardly from
Eqs. (1a -1c). The effect of radiation reaction is implicit in v = v(t) in Eqs. (1a-1c). For nonspinning systems,v =v(v) is fully known as a PN series starting from ∼ v 9 and going up to 3.5PN order ∼ v 16 . For systems with spin, spinorbit terms enter first at 1.5PN and spin-spin terms at 2PN. Here, we employ the TaylorT4 resummed form oḟ v(v) [18, 70] as adopted in the SpinTaylorT4 approximant. The series coefficients forv(v) can be found, e.g., in App. A of Ref. [97] .
For precessing binaries, there are three time scales of relevance: radiation-reaction timescale T RR , precession time scale T pr , and orbital time scale
Since v 1 mostly, we have the following separation of time scales:
Thanks to this separation of scales, we expect our hybrid approach, which combines EOB dynamics with PN precession, to work well as we show in Secs. IV B, IV C. Recall that Eqs. (1a -1c) are 0.5-PN (NLO) accurate. Though this is the usual order in the literature, we employ versions of the precession ODEs that have been pushed to the limit of the current analytical PN knowledge, which we denote as N4LO (2 PN) here. As far we can tell these have never appeared in a journal article, but exist in written form in several approximants such as SpinTaylorT4. Defining δm = m 1 − m 2 in natural units (e.g., m 1 = 1/(1 + q)), the N4LO spin-orbit precession ODEs reaḋ
, c S2 , c S2L can be obtained via the (1 ↔ 2) exchange.
Note that from NNLO on, one no longer has a standard precession equation forL N of the form of Eq. (2). In fact, as can be seen from Eq. (4c),L N has components both perpendicular and parallel toL N . Therefore, as is done in the SpinTaylorT4 approximant, we definė
which then satisfieṡ
We use the solutions of Eq. (7) 3 , to computeL N (t), but we have also used directly the solutions to Eq. (4c) and found relative differences in the components ofL N of 10 −4 . We present the derivational details of these N4LO expressions in App. A. There are indications that the PN precession equations converge with increasing PN order despite missing higher-order information [98] . Indeed, we have found it slightly more beneficial to work with the N4LO precession equations rather than the NLO versions. We illustrate this is in App. B, where we show that the N4LO-Euler-angle twisted TEOBResumSP agrees better with both NRSur7dq4 and SEOBNRv4PHM than its NLO counterpart. This agreement is demonstrated specifically in terms of waveform strain mismatches which we introduce in Sec. IV. The NLO-N4LO disagreement is more severe for systems with more mass asymmetry, i.e., smaller values of q, which we show in terms of Euler angles in Fig, 11 in App. A. As the figure exhibits, there is considerable Euler-angle dephasing between NLO, NNLO, and N4LO solutions for small q, but no such dephasing between N3LO and N4LO, which we somewhat expect since their difference is at 2 PN. Here, as already stated, we work with N4LO ODEs, but provide more discussion on the various ODE orders in App. A We should add that instantaneous corrections to the orbit-averaged expressions start entering at N3LO [93] which we do not take into account here, but the precessing approximant SpinTaylorT4 has been upgraded to include these corrections. Our precession ODEs agree with those in the version of SpinTaylorT4 before the addition of these corrections.
As already mentioned, it is useful to package the six spin degrees of freedom into a space of lower dimensions. This is usually done by considering the projections of S 1 , S 2 parallel and orthogonal toL N (t), resulting in two commonly employed scalar quantities. The parallel scalar is
3 These expressions match their spinOrd = 7 counterparts as given in the SpinTaylorT4 approximant.
which is a conserved quantity of the orbit-averaged precession equations over the precession timescale [99] . The orthogonal parameter is χ p of Ref. [76] defined as 4
where S 1,⊥ , S 2,⊥ denote the components of S 1 (t), S 2 (t) perpendicular toL N , respectively. Both χ eff and χ p are commonly used in the LVC analysis of GW events [9] .
We now introduce our new orthogonal parameter
which may be just a useful as χ p in encoding the precessing degrees of freedom as we show in Secs. IV B, IV C. S ⊥,max is bounded above by (1+q 2 )/(1+q) 2 which yields 0.5 for q = 1 and 1 in the test-mass limit.
When considering precessing systems, there are three special frames of reference which have their respective zaxes aligned with J 0 ≡ J N (0), L 0 ≡ L N (0), and L N (t).
Here, we refer to these frames as the J 0 frame, L 0 frame, and the co-precessing frame, respectively. Clearly, the J 0 and L 0 frames are inertial whereas the co-precessing frame is not.
The L 0 frame is the preferred frame for most of the currently available precessing approximants such as SpinTaylorT4, NRSur7dq4, and SEOBNRv4PHM as it is clearly the most straightforward frame for solving the precession ODEs (1a) -(1c) even though the precessioninduced amplitude modulations are more pronounced in this frame. This will also be our preferred frame here. Accordingly, we label the azimuthal and the polar angles of L N (t) with respect to L 0 by α and β as shown in Fig. 1 . We delegate the discussion of the J 0 frame to Sec. II C.
Naturally, we must pick an x-axis in the L 0 frame, with respect to which we measure α(t). Here, we do this by imposing the condition that S 1 (0) is in the x-z plane as shown in Fig. 1 , which yieldsx = S 0 1,⊥ /|S 0 1,⊥ |, where S 0 1,⊥ ≡ S 1 (0) − (S 1 (0) ·L 0 )L 0 andL 0 ≡ L 0 /|L 0 |, which is the same choice as in Ref. [70] . We can therefore fully specify S 1 (0) via the parameters {q,
and φ 2 is the azimuthal angle with respect tox defined above. With our FIG. 1. The inertial L0 and J0 frames whose z-axes are parallel to LN(0) and JN(0), respectively. As explained in the text, we choose the x-axis of the L0 frame such that the initial spin of the primary component, S1(0) lays in the x-z plane. In this frame, we denote the spherical angles of LN ≡ LN(t) (red arrow) by α and β. In the J0 frame, it is easier to discern the precession of LN as it approximately traces out a cone per precession cycle (only approximately because |LN| decreases due to radiation reaction, see Sec. II C). We show such a cone in the right-hand panel along with its projection onto the plane perpendicular to JN(0). axes defined, it is straightforward to obtain
The third angle, as introduced by Ref. [74] , is given by the solution toγ =α cos β, where we chose to keep the righthand-side positive to have γ(t) monotonically increasing like α(t). Note that, for the purposes of data analysis and parameter estimation, we must restore M to its physical units which we denote by M tot (M ). This is because the detection band of the GW interferometers is roughly between 20 and 2000 Hz and heavier binary systems merge at lower frequencies. Therefore, we parametrize our precessing binary inspirals using the following finalized set consisting of eight parameters
where f 0 is the initial (2, 2)-mode GW frequency marking the starting point of each inspiral, satisfying the usual ω 0 = πf 0 relation.
Spin-orbit precession occurs when the spins are not (anti)parallel to the orbital angular momentum. The main effect is a slow precession of L N about an axis that Tracks of the components of the Newtonian orbital (LN(t), red) and total angular momenta (JN(t), black) in the plane orthogonal to JN(0) for a binary with Mtot = 30M , q = 1, χ1 = χ2 = 0.7, θ1 = θ2 = 90 • , and φ2 = 135 • starting from the GW frequency of 20 Hz. We additionally show the components of the 1PN-corrected orbital angular momentum, L1PN (dashed blue), and the corresponding total angular momentum, J1PN (dashed gray). The dots mark the starting positions for each vector. As described in the text, orbital angular momenta spiral inward while total angular momenta spiral outward. Note that J1PN outspirals much less than JN. is aligned with J N (0). Moreover, because of radiation reaction, L N shrinks, resulting in a precession cone whose opening angle decreases in time. Thus, the projection of L N orthogonal to J N (0) shows circularly inspiraling tracks as in Fig. 2 . Furthermore, J also precesses around, in fact, out-spirals around J N (0), which we also exhibit in Fig. 2 . This spiralling behavior persists for PN-corrected L and J, albeit with smaller precession cone opening angles for J, as we show for L 1PN , J 1PN in the figure. For three-dimensional versions of these, see Apostolatos et al. [49] which still remains the most illustrative resource for understanding the qualitative behavior of precessing systems. Ref. [49] also provides a useful expression for the number of precession cycles when the masses are small and initial separation is large, i.e., |L N | |S 1 + S 2 |,
where, recall M tot is M in solar masses. The precession of L N induces amplitude modulations in the waveform and modifies the phase. The modulations depend strongly on the orientation of the orbit with respect to an observer's line of sight. This is illustrated in Fig 3, where the gray curve is the precessing
Precessing (2, 2) modes as viewed by observers whose line of sight is parallel to L0 (red) and to J0 (gray) for a binary system with Mtot = 30M , q = 1/5, χ1 = χ2 = 0.7, θ1 = θ2 = φ2 = 135 • starting from 20 Hz. As discussed in the text, the L0-frame observers see much more pronounced amplitude modulations than their J0-frame counterparts.
(2, 2) mode as seen by an observer lined up with J 0 who receives less modulated GWs because L N (t) tracks a circularly inspiralling path as depicted in Fig. 2 whereas the L 0 -frame observer sees emissions over an elliptically inspiralling track, hence resulting in larger amplitude variations. This means that the reference frame in which the incoming GWs are received (e.g., detector frame) plays a significant role in GW detection as using non-precessing waveform template banks to match-filter the signal can lead to a significant fraction of precessing signals being missed or dismissed as glitches [75] .
Thus far, we have talked about simple precession dubbed so because both L and S precess around J. However, when L + S ≈ 0, a phenomenon known as transitional precession occurs in which J "tumbles" until radiation reaction decays L enough to take the system away from the L + S ≈ 0 configuration [49] . Since transitional precession requires careful fine-tuning of the parameters, it is expected to be a rare phenomenon [49, 70] so for our comparisons, we will consider only one case of it.
Having conceptually introduced the twist operation, we next provide mathematical details. Let us recall that α(t) and β(t) are the azimuthal and polar angles of L N (t) with respect to L 0 and the third angle γ(t) is obtained fromγ =α cos β. The set {α(t), β(t), γ(t)} is all we need when transforming between the L N (t) and L 0 frames. Specifically, when going from our inertial L 0 frame to the L N (t)-frame, we "forward"-Euler rotate using R(α, β, γ) ≡ R z (γ)R y (β)R z (α) where R j (ζ k ) rep-resent rotations by the angles ζ k with respect to the j axis 5 . In the following, we omit displaying the explicit time dependence of these angles and various other timedependent quantities, e.g., L N (t), which we restore when necessary.
Under the forward Euler rotation above, the gravitational-wave modes transform as follows
where D ( ) m ,m are Wigner's D matrices which can be related to spin-weighted spherical harmonics via [100] 
Note that different versions of this equation exist in the literature due to conventions of Wigner D matrices. Here, we employ the definition introduced in Ref. [ 
where d m ,m (β) ∈ R are the "little" D matrices given by
As explained in Sec. I, the key idea is to "unwrap" or twist aligned-spin waveforms generated in the L N frame using Euler rotations. In order to transform from L N to L 0 frame we "backward" Euler-rotate via the inverse rotation matrices:
where we introduced the superscripts T and NP to denote the twisted and the non-precessing waveforms, respectively. Using the standard identity D
Our coverage of the eight-dimensional parameter space of precessing compact binary inspirals used in assessing the faithfulness of TEOBResumSP. The parameters {f0, q, Mtot} span the space of nonspinning binaries, which is complemented by the set {χ eff,0 , χp} or {χ eff,0 , S ⊥,max } that maps the five spin degrees of freedom in S1(0), S2(0) [by design S1y(0) = 0] to only two via Eqs. (9), (10), and (11) . For our assessment, we made comparisons with SpinTaylorT4 for 50 precessing cases (green squares), with NRSur7dq4 for 200 cases (blue triangles), and with SEOBNRv4PHM for approximately 1100 cases (red dots). Note that some parameters are duplicate within the {f0, q, Mtot} subset, hence there are fewer points in the middle and right panels than the rough total of 1350.
where we restored the time dependences.
Note that the literature is replete with slightly different versions of Eq. (20) depending on: (i) Euler rotation conventions, (ii) Wigner D and spherical harmonic conventions, and (iii) the sign of the right-hand-side for theγ equation. Our definitions and conventions agree with Ref. [39] (modulo the sign of γ) and our practical expression (20) agrees with Ref. [61] which interestingly disagrees with its updated version in Ref. [62] , but then agrees with the most recent version of PhenomP [63] . We tested the performance of the alternate expression of Ref. [62] against ours in terms the = 2 detector strain mismatches of TEOBResumSP with SEOBNRv4PHM and NRSur7dq4. We found that our twist given by Eq. (20) performed better in the sense that it produced smaller mismatches. We delegate the details of this comparison to App. B.
In principle, one can also twist the non-precessing waveforms using the angles of PN-corrected L(t) with respect to L(0). Ref. [96] showed that the resulting differences in the twisted waveforms as compared with precessing NR waveforms are marginal, therefore we use only L N (t) with respect to L N (0) for TEOBResumSP.
We now have all the individual ingredients necessary to generate the precessing TEOBResumSP waveforms. The procedure for this operation is as follows:
1. Specify the initial parameters listed in Eq. (13).
2. Generate aligned-spin (non-precessing) = 2 waveform modes using TEOBResumS via the set of parameters {f 0 , M tot , q, χ 1 , χ 2 }. 5 In this article, we use the z-y -z convention for Euler rotations as is standard in the relevant literature.
3. Solve the orbit-averaged precession ODEs (4a-4c) using SpinTaylorT4 resummed radiation reaction forv.
4. Retrieve the spherical angles {α(t), β(t)} from the components of L N (t) in the L N (0) frame and subsequently obtain γ(t) by solvingγ =α cos β.
5. Construct the precessing = 2 TEOBResumSP modes via the twist formula (20) .
Let us conclude this section with three remarks: (i) We can generate twisted waveforms in the J N (0) frame as well as the L N (0) frame, but this is slower because the solutions to the ODEs, which are solved in the L N (0) frame, must be Euler-rotated to the J N (0) frame at each time step. Since the other approximants with which we compare TEOBResumSP use the L N (0) frame, we do the same. (ii) It is possible to extend the above scheme by coupling the precession ODEs to TEOBResumS dynamics, i.e., by setting χ i =L N (t) · S i /m 2 i (i = 1, 2) at each time step of the aligned-spin EOB dynamics, whereL N (t), S i (t) are obtained from the N4LO precession dynamics. We have tested this approach to some extent as discussed below.
(iii) For this initial version of TEOBResumSP, we truncate our precessing waveforms before the onset of mergerringdown. As explained in Refs. [39, 66] , attaching the merger-ringdown portions of the twisted waveform to its inspiralling portion introduces extra complications which we leave for the next version of TEOBResumSP. To assess the faithfulness of TEOBResumSP, we compared the twisted TEOBResumS waveforms against precessing waveforms generated by the following three approximants: SpinTaylorT4, NRSur7dq4, and SEOBNRv4PHM. For the comparisons, we considered approximately 1350 precessing inspirals for which we show {f 0 , M tot , q} of Eq. (13) in Fig. 4 . We additionally show in the figure {χ eff,0 , S ⊥,max (and χ p )} which reduce the remaining five spin degrees of freedom of S 1 (0), S 2 (0) (recall we set S 1y (0) = 0) to just two.
Within the set of roughly 1350 inspirals, we employed SpinTaylorT4 to generate precessing waveforms for 50 cases, NRSur7dq4 for 200 cases, and SEOBNRv4PHM for ∼ 1100 cases. Approximately, one tenth of the cases involved BNS inpirals, an additional ten involved black hole neutron star systems, and the rest were BBHs within which we also considered a dozen cases for both GW151226 and GW170729 using the best inferred parameters from Ref. [9] . The latter case clearly stands out as our most massive binary in the right panel of Fig. 4 .
As an initial assessment, we compared (2, ±2) modes, h 2,±2 (t), between SpinTaylorT4 and TEOBResumSP by computing the time-domain overlaps between the two approximants using
where T is short for TEOBResumSP and i for any approximant of our choosing (in this case SpinTaylorT4). We set t 0 = 0. For t f , we use the inspiral time at which f = 100 Hz which we determine from
where we once again use the SpinTaylorT4 expression forv(v). The upper limit of the integral (22) is given by v f = [(100 Hz) π GM tot /c 3 ] 1/3 where M tot has units of kilograms. Recall that we omit the merger-ringdown parts of the binary evolution in this work and since almost the entire SNR due to precession accumulates in the f < O(10 2 ) Hz regime [49] , 100 Hz is a suitable cutoff for waveform comparisons here. Note that some of the more massive BBH inspirals merge before f = 100 Hz, for which we use t peak , i.e., when the (2,2)-mode amplitude peaks.
As our main assessment of TEOBResumSP, we computed frequency-domain matches of the detector strains between TEOBResumSP and NRSur7dq4 for 200 inspirals, then between TEOBResumSP and SEOBNRv4PHM for approximately 1100 inspirals using pycbc [102] . The match (or faithfulness) between two approximants is defined as
where
is the detector-strain (S n )-weighted inner product between Fourier transformsh i ,h T with f f = 100 Hz. In principle,h i ,h T can be the Fourier transforms of an individual mode, but it is more appropriate to use the Fourier transform of the detector GW strain given by
where
and F + (θ, φ, ψ) = 1 + cos 2 θ 2 cos 2φ cos 2ψ − cos θ sin 2φ sin 2ψ,
F × (θ, φ, ψ) = 1 + cos 2 θ 2 cos 2φ sin 2ψ + cos θ sin 2φ cos 2ψ,
where D L is the distance to the source, −2 Y m are the (spin = −2)-weighted spherical harmonics, θ s , φ s are the sky-position angles, and ψ is the polarization angle of the GWs in the detector frame, set to zero for our comparisons. Formally, h(t) is obtained from a sum over all , m modes, but here, we suffice with the = 2 mode. We will incorporate the > 2 modes, which recently got upgraded [90] , in the next version of TEOBResumSP. Note that M is computed by maximizing over initial time and phase shifts, t 0 , φ 0 6 . It has become standard in waveform comparisons to use M = 0.965 as a benchmark. This cut-off translates to the loss of roughly 10% of events due to waveform systematics [103, 104] . We also employ this threshold and its mismatch counterpart 1 − M = 0.035 which we plot as a horizontal dashed orange line in many of our remaining figures.
SpinTaylorT4 is the spinning variant of the waveform approximant TaylorT4 [18, 70] , which constructs the precessing waveforms by solving the precession ODEs at a given specified order ranging from
. The solutions to the precession equations yield the angles α, β, and the third angle γ enters as a correction to the orbital phase via Ψ → Ψ − γ. These are then used to build the precessing waveforms via the expressions in App. B of Ref. [59] which yield 1.5PN-accurate precessing ( , m) modes.
(2, ±2) mode TEOBResumSP-SpinTaylorT4 overlaps for our set of 50 precessing compact binary inspirals. The large blue dots represent 1 − O22, the small red ones 1 − O2−2, and the green diamonds 1 − O22 for binary neutron stars. Note that since we plot 1 − O m here, the lower the dots, the better the agreement between the two approximants. Correspondingly, the dashed black, orange, gray, and light gray lines represent {0.99, 0.965, 0.95, 0.9} overlaps, respectively. The plot also shows that the agreement between TEOBResumSP and SpinTaylorT4 worsens for cases with larger χp, indicating stronger precession.
Overall, we used 50 cases for the SpinTaylorT4-TEOBResumSP waveform comparisons, but we exercised some care in choosing our cases because of the relatively low PN order of the spin sector of SpinTaylorT4 which may lead to significant disagreements between the nonprecessing modes so as to make the comparison of precessing modes pointless. There is also additional [nonprecessing waveform] disagreement because of the superior performance of the TEOBResumS in the merger, ringdown stages [41, 89, 90] . Therefore, we formed the comparison set by picking inspirals for which the nonprecessing (2,2)-mode overlap between SpinTaylorT4 and TEOBResumSP is ≥ 0.965. Strictly speaking, this cutoff is meant for assessing waveform matches; we nonetheless use it here for mode overlaps.
As a result of having to groom our assessment set, we treat the comparisons with SpinTaylorT4 as a "warmup" for the more detailed comparisons with NRSur7dq4 and SEOBNRv4PHM that we make in Secs. IV B, IV C. Consequently, in this section, we suffice with computing precessing waveform overlaps for only the (2, ±2) modes instead of detector strain matches.
Within our set of 50 precessing inspirals, we found that approximately half yielded precessing (2, ±2)-mode overlaps, O 2±2 , greater than 0.965 and a significant majority yielded overlaps greater than 0.9 as shown in Fig. 5 in terms of 1 − O 2±2 . The figure also shows a rough correlation between 1 − O 2±2 and χ p . 30 cases correspond to BNSs represented by the green dots in Fig. 5 . Once again, about half of these yielded O 2±2 > 0.965 and roughly 90% gave O 2±2 > 0.9. The correlation between χ p and 1 − O 2±2 also persisted for this subset. 
NRSur7dq4 is the most recent NR-surrogate based on ∼ 1500 precessing SXS simulations with a parameter range of 1/4 ≤ q ≤ 1 and χ 1 , χ 2 ≤ 0.8 [68] . It has been shown to be better than 99% faithful to NR simulations for > 95% of the cases in its extrapolation space [68] .
For our assessment here, we employed the gwsurrogate package [105, 106] to generate all the precessing = 2 modes for a set consisting of 200 cases. In order to maximize the number of orbital cycles, hence the number of precession cycles, we set f 0 ∈ [35, 40] Hz and M tot ∈ [35, 40] M . Making these values any smaller tended to hit the low frequency bound of NRSur7dq4, and setting them higher would miss the one, or at best two, precession cycles that we expect. We further set χ 1 = χ 2 = 0.75 since NRSur7dq4's current upper limit is 0.8. As the blue triangles in Fig. 4 show, our set covers the {S ⊥,max , χ p } space reasonably well. 7. Corner plots of the match (faithfulness) of the = 2-mode detector strain between TEOBResumSP and NRSur7dq4 for the 200 precessing compact binary inspirals. The corner parameters are χ eff,0 , S ⊥,max , and the mass ratio q plotted here as 1/q to better relate to values more familiar in the NR community. The cooler colors (purple, blue) represent cases with M ≥ 0.965 while the warmer colors (orange, red) represent M ≤ 0.9. As can be seen in the right panel, most of the 1/q = 4 cases yielded M < 0.965 whereas in the 3 ≤ 1/q < 4 regime, M ≥ 0.965 mostly. Therefore, some of the disagreements for the q = 0.25 cases are likely due to the fact that this value is the lower bound of NRSur7dq4's range for q.
For the match computation, we randomly selected 200 pairs of sky angles {θ s , φ s } with which we constructed the resulting = 2 GW detector strains from both the precessing NRSur7dq4 modes and the twisted TEOBResumSP modes. We then employed Eq. (23) to compute the matches for these 200 cases. We found that (i) ∼ 69% the cases yielded TEOBResumSP-NRSur7dq4 matches of 0.99 or better.
(ii) ∼ 85% of the cases yielded M ≥ 0.965.
(iii) Roughly 97% yielded M ≥ 0.9.
As we may expect, the disagreement between TEOBResumSP and NRSur7dq4 seems to be greater for cases with stronger precession. We illustrate this correlation in Fig. 6 , where we plot the mismatch, 1−M, against both χ p and our new quantity S ⊥,max . One may first notice that 1 − M seems to better correlate with S ⊥,max instead of χ p , which is further supported by Fig. 8 . Second, χ p values are often degenerate whereas S ⊥,max produces a better spread across its domain. Therefore, S ⊥,max may be at least as suitable as χ p in inheriting the precessing degrees of freedom in compact binary inspirals.
To further gauge the possible dependence of the match on other binary parameters, we show corner plots of the TEOBResumSP-NRSur7dq4 match in Fig. 7 with "corner" parameters given by the set {χ eff,0 , S ⊥,max , 1/q}. As can be deduced from the middle and right panels of Fig. 7 , the TEOBResumSP-NRSur7dq4 matches also worsen for the q = 0.25 subset beside large S ⊥,max cases, i.e., strong precession. Given that 0.25 < q ≤ 1/3 cases exhibit no such degradation, it is likely that the increased q = 0.25 mismatches are due to the fact the q = 0.25 is at the edge of NRSur7dq4's current interpolation range. However, it is also possible that with more data in the 0.25 < q ≤ 1/3 regime, we may start seeing a relation between the mismatches and q, but this is not one of our goals for this article. Nonetheless, we comment on related future work below.
Edge cases aside, the main reason for TEOBResumSP's mismatch is the fact that we twist S 1 (t) = S 1,z (0) = χ 1 m 2 1 , S 2 (t) = S 2,z (0) = χ 2 m 2 2 , i.e., χ 1 , χ 2 = constant, aligned-spin waveforms to construct the precessing TEOBResumSP modes whereas NRSur7dq4 interpolates time-dependent data for S 1 (t), S 2 (t) coming from ∼ 1500 NR simulations. For cases with stronger precession, we expect S 1,z (0), S 2,z (0) to disagree more with S 1 (t), S 2 (t), thus making the non-precessing constantspin TEOBResumS waveforms [used in the twist] more prone to disagreeing with NRSur7dq4's co-precessing waveforms which, recall, are Euler-rotated to give the final detector-frame ( , m) modes of NRSur7dq4 [67, 68] .
The other source of disagreement is the non-precessing (2, 0) mode. By default, TEOBResumS sets h NP 20 = 0, whereas NRSur7dq4 does not. This disagreement can cause considerable mismatches if the binary parameters are such that h NP 20 's contribution is amplified inside the twist and the strain formulae relative to that of h NP 22 and h NP 21 's contributions. We found that this occurred only a handful of times within our sample of 200 cases.
It is not in the scope of this article to conduct a more in-depth study of the mismatch's dependence on the intrinsic parameters. However, a future such study would be beneficial to the waveform community, and even more so if it is conducted ensuing two obvious improvements: (i) extending the NR surrogates' ranges to q < 1/4 and χ 1 , χ 2 > 0.8 and (ii) twisting alignedspin TEOBResumS waveforms with varying spins by setting χ 1 =L N (t) · S 1 (t)/m 2 1 , χ 2 =L N (t) · S 2 (t)/m 2 2 instead of constant initial values. Since the cost of NR simulations significantly increases for smaller mass ratios and higher spins, it seems unlikely that surrogates with expanded ranges for {q, χ 1 , χ 2 } will be available in the near future. On the other hand, item (ii) can be accomplished by coupling the precession ODEs to the TEOBResumS Hamiltonian which would result in alignedspin waveforms with varying χ 1 , χ 2 . This is what we plan to do for the next version of TEOBResumSP, and this is what is done in SEOBNRv4PHM (and initially in SEOBNRv3) which we discuss next.
SEOBNRv4PHM is the latest precessing approximant within the SEOBNR family. As the upgrade to SEOBNRv3 [39, 96] , it incorporates precession in higher modes up to = 5 [66] . The precession in SEOBNRv4PHM (also in v3) is coupled to the aligned-spin EOB dynamics so that the resulting aligned-spin waveforms in the co-precessing frame are obtained from time-dependent χ 1 , χ 2 . As such, SEOBNRv4PHM is currently the most NR-faithful, nonsurrogate precessing approximant. Most recent comparisons using approximately 1500 precessing SXS simulations have yielded SEOBNRv4PHM-NR matches of > 0.97 for > 94% of the cases when higher modes (2 < ≤ 5) are included [66] .
Since SEOBNRv4PHM does not suffer from the current parameter limitations of NRSur7dq4, we used a larger set of roughly 1100 precessing inspirals whose parameters span greater ranges. In particular, for the key parameters, we have: 0 ≤ χ p ≤ 1, f 0 ≥ 20 Hz, 0.1 ≤ q ≤ 1, and 3M ≤ M tot ≤ 84M (see Fig. 4 ). Within this set, we also had one case with transitional precession with the following specific parameters: f 0 = 30 Hz, M tot = 25M , q = 1/4, χ 1 = χ 2 = 1.0, θ 1 = 35π/36, θ 2 = 7π/12, φ 2 = π/2. For this particular case, we obtained TEOBResumSP-SEOBNRv4PHM match (at 100 Hz) of 0.992.
We computed ∼ 1100 TEOBResumSP-SEOBNRv4PHM matches using random sky angles for the = 2 detector strain [Eq. (25) ]. We obtained M ≥ 0.99, 0.965, and 0.9 for 60%, 75%, and 83% of the cases, respectively. As in the comparisons with NRSur7dq4, the mismatch seems to correlate with our parameter S ⊥,max better than χ p , which we show in Fig. 8 , where we plot 1 − M vs. S ⊥,max and χ p . On the other hand, the matches appear to be randomly distributed in the sky as we show in Fig. 9 . This is expected because we have compared here only the = 2-mode strains. The distribution of TEOBResumSP-SEOBNRv4PHM match in terms of the sky angles could change once higher modes are included due to the differences in the respective EOBs' aligned-spin dynamics and the different procedures used to obtain the precessing waveforms.
Since we were able to make comparisons with q as low as one tenth, we were able to discern that the TEOBResumSP-SEOBNRv4PHM matches deteriorate for small values of q as can be seen in Fig. 10 , where we display corner plots of the match against the set {S ⊥,max , T insp , q, χ eff,0 }. One can see an increasing density of M ≤ 0.85 points in the small q regions. This disagreement is expected as it is known that the mismatch between the non-precessing TEOBResumS and SEOBNRv3 increases as q decreases [41] . Fig. 10 also reiterates the mismatch-S ⊥,max correlation as can be seen from the left panels. The q-S ⊥,max corner plot situated in the left panel of the middle row is especially illustrative.
As far as we can tell, there do not seem to be discernible correlations between the match and the remaining two parameters, T insp , χ eff,0 . However, we have seen significant TEOBResumSP-SEOBNRv4PHM mismatches for long inspirals involving BNSs, specifically for f 0 30 Hz, whereas the BNS runs with f 0 ≥ 35 Hz had all yielded M > 0.97. We believe the reason for this is the fact that TEOBResumSP twists χ 1 , χ 2 = constant waveforms. We expect this issue to be resolved with the next version of TEOBResumSP when χ 1 , χ 2 will be obtained from the time-dependent solutions S 1 (t), S 2 (t). For this reason, in this article, we use BNSs with f 0 ≥ 35 Hz for the TEOBResumSP-SEOBNRv4PHM comparisons.
In this article, we introduced TEOBResumSP: the precessing upgrade to TEOBResumS. TEOBResumSP delivers precessing = 2, m ∈ [−2, 2] modes by Euler-rotating non-precessing (aligned spin) TEOBResumS modes from the instantaneous, non-inertial L N (t) frame to the inertial L N (0) frame. This frame rotation, given by Eq. (20) , is performed with Wigner's D matrices.
We also introduced a new parameter, S ⊥,max , in Eq. (11) for representing the strength of precession. Although it is akin to χ p [Eq. (10)], S ⊥,max seems to better encode the dependence of the strain mismatch on the strength of precession and is less degenerate.
We assessed the faithfulness of TEOBResumSP by computing first TEOBResumSP-SpinTaylorT4 (2, ±2)-mode overlaps for 50 inspirals, then =2 detector strain matches of TEOBResumSP with NRSur7dq4 for 200 inspirals and with SEOBNRv4PHM for nearly 1100 inspirals. Since TEOBResumSP currently does not compute the merger-ringdown portions of precessing modes, we computed mode overlaps and strain matches at f = 100 Hz, or at the peak of the (2,2)-mode amplitude in the case of heavy binary black hole inspirals which coalesce at f < 100 Hz.
TEOBResumSP's performance can be summarized as follows (i) TEOBResumSP (2, ±2) mode overlaps with SpinTaylorT4 were better than 0.965 for 50% of the cases. Overall, 90% of the cases yielded 0.9 overlaps. As expected, the overlaps worsened for more strongly precessing systems which we show in Fig. 5 in terms of χ p . Since, the precessing modes of SpinTaylorT4 are only 1.5PN accurate, this disagreement with stronger precession is not surprising.
(ii) TEOBResumSP =2 detector strains matched NRSur7dq4 to better than 0.99 for 69% and better than 0.965 for 85% of the 200 cases with χ p ranging up to 1. Overall, roughly 97% of the cases yielded M 0.9 with only one case giving M < 0.70.
(iii) The TEOBResumSP-NRSur7dq4 mismatches show a clearer correlation with S ⊥,max than χ p as exhibited in Fig. 6 .
(iv) The worst TEOBResumSP-NRSur7dq4 matches happen when q = 0.25 as shown in Fig. 7 . This may be due to the fact that q = 0.25 is the lower bound of NRSur7dq4's current range of mass ratios. As Fig. 7 hints, with the exception of the q = 0.25 cases, the match does not seem to depend on χ eff,0 or q.
(v) Of the circa 1100 TEOBResumSP-SEOBNRv4PHM =2 detector strain matches we computed, ∼ 60% gave M > 0.99, ∼ 75% gave M > 0.965, and ∼ 83% yielded M > 0.9.
(vi) The TEOBResumSP-SEOBNRv4PHM mismatch also seems to correlate better with S ⊥,max than χ p as shown in Fig. 8 .
(vii) The TEOBResumSP-SEOBNRv4PHM match is independent of the source sky location as Fig. 9 demonstrates. This may change when higher modes ( > 2) are included in the strain computation (25) . 10 . Corner plots of the = 2 detector strain matches between TEOBResumSP and SEOBNRv4PHM for approximately 1100 precessing compact binary inspirals. The corner parameters are once again χ eff,0 , S ⊥,max , q, and additionally, the inspiral time in seconds, Tinsp (note the log scale). The cooler colors (purple, blue) represent cases with M ≥ 0.965 while the warmer colors (orange, red) represent M ≤ 0.85. The rough correlation between the mismatch and S ⊥,max shown in Fig. 8 can be discerned in the left panels here. Additionally, the degradation of the match with decreasing q is evident in the middle row and the right-most panel.
(viii) The TEOBResumSP-SEOBNRv4PHM match worsens with decreasing q as shown in Fig. 10 . This is expected since the non-precessing TEOBResumS, SEOBNRv3 modes show increasing disagreement for decreasing values of q.
ODEs at the peak of the orbital frequency. The stitched inspiral-merger-ringdown GW modes are then rotated to the desired inertial frame. Finally, as a third improvement, we will replace the SpinTaylorT4 radiation reaction forv in the precession ODEs with one which we would obtain from the aligned-spin TEOBResumS dynamics. It is not clear that this would be an improvement, but may prove to be so for BBH mergers.
As it stands, the current version of TEOBResumSP agrees well, i.e., yields matches > 0.965, with the two main precessing approximants in the market, NRSur7dq4 and SEOBNRv4PHM, for 85%, 75% of the cases, respectively. The significantly disagreeing cases either have very strong precession, as indicated by our newly introduced parameter S ⊥,max , or small mass ratio. Another nice feature of TEOBResumSP is that it is fast thanks to the postadiabatic method implemented in TEOBResumS which "rushes" the inspiral [88] . TEOBResumSP will be added to the TEOBResumS git repository https://bitbucket. org/eob_ihes/teobresums/wiki/Home. This section builds upon the work of Ref. [107] . Recall that theL N equation is obtained by imposing total angular momentum conservation,J = 0 which leads tȯ
L is provided up to 3.5 PN in, e.g., Eq. (4.7) of Ref. [92] which we rewrite in the following compact form
where we defined the terms ∆L S nPN with n = 1.5, 2.5, 3.5 with their explicit v scalings factored out. From Ref. [92] , we can extract
where =L N , n = r/|r| is the relative separation unit vector, and λ = × n. Moreover, S ,λ,n ≡ { , λ, n} · S, Σ ,λ,n ≡ { , λ, n}·Σ, where S = S 1 +S 2 , Σ = S 2 /m 2 − S 1 /m 1 . Defining S 1 ≡ ( ·S 1 ) and similarly for S 1λ , S 1n as well as the 1 → 2 counterparts, Eq. (A3) becomes
where we restored M = m 1 +m 2 for clarity in this section.
We can now orbit-average this expression using n inj = λiλj = 1 2 (δ ij −ˆ iˆ j ) which yields S 1n = S 1λ = 1 2 (S 1 − S 1 ). Substituting these orbit-average terms into Eq. (A4) we arrive at
Similarly, with some more determination, one can obtain 
where L 1PN ≡ 1 + v 2 3 2 + 1 6 η and the constants c S1 , c S1L , etc., are given in Eqs. (6a, 6b) . Differentiating Eq. (A7) with respect to time, we obtaiṅ
where, e.g.,Ṡ NNLO 1 implies that only terms that scale as v ≤7 should be retained. Several simplifications occurred in reaching Eq. (A8). First, the secondṠ 1 ,Ṡ 2 terms contribute only at the LO. This is because of the factor of v 2 in front, which means that at our requested order, i.e., NNLO, the terms multiplying v 2 can be at most ∝ v 5 which is LO forṠ 1 ,Ṡ 2 as can be seen from Eqs. (1a,  1b) . Second, all the c S1L , c S2L terms have dropped from Eq. (A8) because (i) v 2L N ∝ v 8 , i.e., is N3LO and (ii) at NNLO only v 2L N ·Ṡ LO 1 scales as v 7 , but is actually zero becauseL N ⊥Ṡ LO 1 as is clear from Eqs. (1a, 1b) . 11 . The spherical angles of LN(t) in the L0 frame described in Sec. II B for three separate cases: binary neutron star (left panels), black hole neutron star (middle panels), and binary black hole (right panels) inspirals. α is the azimuthal angle and β is the polar angle (see Fig. 1 ). In each panel, we show the angle obtained from solving the precession ODEs truncated at four different orders: NLO, NNLO, N3LO, and N4LO. From left to right, the binaries respectively have M = 3, 20, 35M and q ≈ 0.85, 0.11, 0.35. f represents the (2,2)-mode gravitational wave frequency.
Pushing now to N4LO, Eq. (A1) becomeṡ
where L 2PN is given in Eq. (5b). Note that we omit the radiation reaction terms starting at NNLO via ηv/v 2 ∝ v 7 inL because they drop out fromL N,⊥ given in Eq. (7) since these terms are all parallel toL N . The effects of radiation reaction are incorporated via v = v(t) in the precession ODEs after the standard change of variables d/dt →v(v)d/dv in Eqs. (1a) -(5a). Explicitly writing out Eq. (A9) at N4LO then rearranging gives us Eq. (4c), where we used the property thatṠ i ⊥ S i up to NLO. In terms of powers of v, each term in Eq. (4c) goes up to v 9 , i.e., N4LO as defined.
We can now obtain L N , therefore, the angles α and β at any order of our choosing varying from NLO to N4LO, which we show in Fig. 11 as functions of the (2,2)-mode GW frequency for three different precessing compact binary inspirals. As can be seen in the figure, the angles from different orders remain very close to each other in general until the binaries enter their respective stronggravity regimes. The angle dephasing between different orders happens earlier and is most prominent for the most asymmetric system in the figure, i.e., a black hole neutron star binary with M = 20M and q ≈ 0.11. The differences between the N3LO and N4LO angles are much smaller, expectedly so since the differences of these two orders scales as v 9 .
A thorough survey of the effects of the truncation order of the precession ODEs, the instantaneous terms (entering at N3LO), and the neglected terms would be beneficial to the entire gravitational-wave community. Ref. [98] has already done some work in this regard, but a systematic, large-scale analysis quantified in terms of consequences to parameter estimation remains to be undertaken at this point. Performance of two alternate TEOBResumS twists against our standard twist measured in terms of = 2 detector strain mismatches with NRSur7dq4 (50 cases) and SEOBNRv4PHM (60 cases) ordered by increasing mismatch. Red circles represent mismatches obtained using our standard expression, dubbed Eq. (B2)[N4LO]: twisting via Eq. (B2) with angles obtained from the precession ODEs truncated at N4LO. Similarly, the blue triangles represent mismatches obtained with the same twist formula, but with angles coming from the NLO-truncated ODEs, hence dubbed Eq. (B2) [NLO] . Finally, the inverted black triangles represent mismatches resulting from using the alternate twist formula (B1) at N4LO. As before, the horizontal dashed black, orange, and gray lines mark M = 0.99, 0.965, 0.9. It is clear from the figure that our standard expression produces the best matches. We left the horizontal axis unlabelled since we reordered the total of 110 cases in terms of increasing 1 − M.
For both tests, we used a subset of precessing compact binary inspirals that is a combination of 50 cases from our NRSur7dq4 set and 60 cases from our SEOBNRv4PHM set. Using Eq. (B1) at N4LO and Eq. (B2) at NLO we generated two new sets of twisted = 2 TEOBResumS modes with which we then computed the = 2 detector strain matches as before. We show how these two alternate twists perform against ours, dubbed Eq. (B2)[N4LO], in Fig. 12 , where it is evident that our twist produces consistently the smallest mismatches (red circles). The alternate twist formula of Eq. (B1) is clearly the worst choice producing M > 0.965 for only about two thirds of the set (black inverted triangles). The reason why Eq. (B1)[N4LO] still somehow manages to mostly yield M > 0.965 is due to both the fact that γ remains close to α because β, starting from zero, is small for most binaries, and that the twisted (2, ±2) modes differ by a small amount as explained in Sec. IV A. Therefore, in binaries for which β(t) 1 and the precessing (2, ±2) modes dominate the mode-sum in the strain formula (25), Eqs. (B1) and (B2) are nearly equal under the m → −m exchange, thus produce twisted waveform strains that are very close to each other.
Returning to Fig. 12 , we see that the NLO version of our twist performs somewhat well in the sense that roughly three quarters of the cases yielded M > 0.965 (blue triangles). The details of the differences in the plotted NLO, N4LO mismatches lay with the differences in the Euler angles used in the respective twists. We have already shown in Fig. 11 how these Euler angles vary as the ODE truncation order goes from NLO to N4LO. For most cases, the difference in the angles become significant only in the last few orbital cycles, corresponding to the small differences between the NLO and N4LO mismatches of Fig. 12 . But for cases with small q, the differences in the Euler angles becomes more significant as can be seen in the middle panels of Fig. 11 . It is possible that the speed-up gained in using NLO-truncated precession ODEs, instead of N4LO, is significant enough to justify their use in parameter estimation. As we have not yet carried out detailed speed tests of our code, we can not verify or refute this hypothesis, but will do so with the next version of TEOBResumSP.