|
RooParticle
Particle scattering simulator with ROOT
|
Analytic two-body 1/r asymptote calculator. More...
#include <asymptote.hpp>
Public Types | |
| enum | status { kUnbound = 0 , kHeadOn , kFree , kRadialAttractive , kParabolic , kBound , kInvalid } |
| Classification of the relative orbit. Only kUnbound, kHeadOn and kFree have asymptotes (see HasAsymptote()). More... | |
Public Member Functions | |
| asymptote () | |
| Empty object; the status is kInvalid until Compute() is called. | |
| asymptote (particle *p1, particle *p2, Double_t kappa) | |
| From two particles of an event (IsInvincible() selects the fixed centre). | |
| asymptote (TVector3 x1, TVector3 v1, Double_t m1, Bool_t fixed1, TVector3 x2, TVector3 v2, Double_t m2, Bool_t fixed2, Double_t kappa) | |
From raw states. fixed1 / fixed2: that particle is a fixed centre. | |
| asymptote (TVector3 r, TVector3 v, Double_t mu, Double_t kappa) | |
| From the relative state only. | |
| Bool_t | Compute (particle *p1, particle *p2, Double_t kappa) |
| Recompute from two particles (arguments as the matching constructor); all previous results are discarded. | |
| Bool_t | Compute (TVector3 x1, TVector3 v1, Double_t m1, Bool_t fixed1, TVector3 x2, TVector3 v2, Double_t m2, Bool_t fixed2, Double_t kappa) |
| Recompute from raw states (arguments as the matching constructor); all previous results are discarded. | |
| Bool_t | Compute (TVector3 r, TVector3 v, Double_t mu, Double_t kappa) |
| Recompute from the relative state (arguments as the matching constructor); all previous results are discarded. | |
| Double_t | GetThetaLab1 () const |
| Lab scattering angle of particle 1 (rad). | |
| Double_t | GetThetaLab2 () const |
| Lab scattering angle of particle 2 (rad); same rules as GetThetaLab1(). | |
| TString | Print (Bool_t mute=kFALSE) const |
| Text summary (status, kappa, mu, E, |L|, e, rmin, b, vinf, theta, outgoing velocities). | |
Status | |
| status | GetStatus () const |
| TString | GetStatusName () const |
| Name of the status as text: "UNBOUND", "HEADON", "FREE", "RADIAL_ATTRACTIVE", "PARABOLIC", "BOUND" or "INVALID". | |
| Bool_t | HasAsymptote () const |
| true for kUnbound, kHeadOn, kFree | |
| Bool_t | IsFixedCentre () const |
| exactly one of the two bodies is fixed | |
| Bool_t | IsOutgoing () const |
| the given state is past closest approach ( \(\vec r\cdot\vec v>0\)); no check of the status | |
Input, relative motion | |
| Double_t | GetKappa () const |
| interaction constant of \(U=\kappa/r\) | |
| Double_t | GetMu () const |
| reduced (or moving) mass (amu) | |
| TVector3 | GetR () const |
| \(\vec x_1-\vec x_2\) (fm) | |
| TVector3 | GetV () const |
| \(\vec v_1-\vec v_2\) (c) | |
| TVector3 | GetVcm () const |
| centre-of-mass velocity (c; 0 for a fixed centre) | |
Conserved quantities and orbital elements | |
| Double_t | GetEnergy () const |
| \(E=\mu v^2/2+\kappa/r\) (amu c^2) | |
| TVector3 | GetL () const |
| \(\mu\,\vec r\times\vec v\) | |
| Double_t | GetLMag () const |
| \(|\vec L|\) | |
| TVector3 | GetLRL () const |
| Laplace-Runge-Lenz vector \((\mu\vec v)\times\vec L+\mu\kappa\,\hat r\). | |
| TVector3 | GetEccentricityVector () const |
| toward periapsis, \(|\vec e|=e\) | |
| Double_t | GetEccentricity () const |
| eccentricity; 0 for kFree / kInvalid | |
| TVector3 | GetPeriapsisDirection () const |
| unit vector, centre to closest approach | |
| Double_t | GetClosestApproach () const |
| distance of closest approach (fm) | |
Asymptotes (relative motion) | |
| Double_t | GetVinf () const |
| relative speed at infinity (c) | |
| TVector3 | GetVInRel () const |
| incoming relative velocity at \(t\to-\infty\) | |
| TVector3 | GetVOutRel () const |
| outgoing relative velocity at \(t\to+\infty\) | |
| Double_t | GetThetaCM () const |
| scattering angle in the relative (CM) frame (rad) | |
| Double_t | GetImpactParameter () const |
| effective \(b=|\vec L|/(\mu v_\infty)\) (fm) | |
Asymptotes (lab) | |
Lab velocities of each particle at \(t\to\mp\infty\) (c): the centre-of-mass velocity plus its share of the relative velocity. A fixed particle has the zero vector. | |
| TVector3 | GetV1In () const |
| particle 1, incoming | |
| TVector3 | GetV1Out () const |
| particle 1, outgoing | |
| TVector3 | GetV2In () const |
| particle 2, incoming | |
| TVector3 | GetV2Out () const |
| particle 2, outgoing | |
Static Public Member Functions | |
Closed-form relations (for validation; angles in rad) | |
Static helpers with the textbook Rutherford formulas, independent of any object. | |
| static Double_t | RutherfordAngle (Double_t b, Double_t vinf, Double_t mu, Double_t kappa) |
| Rutherford scattering angle in the CM frame. | |
| static Double_t | RutherfordImpactParameter (Double_t theta, Double_t vinf, Double_t mu, Double_t kappa) |
| Inverse of RutherfordAngle(). | |
| static Double_t | RutherfordClosestApproach (Double_t b, Double_t vinf, Double_t mu, Double_t kappa) |
Closest approach for impact parameter b. | |
| static Double_t | HeadOnClosestApproach (Double_t vinf, Double_t mu, Double_t kappa) |
| Head-on ( \(b=0\)) closest approach, repulsive. | |
| static Double_t | LabAngle (Double_t thetaCM, Double_t m1, Double_t m2) |
Lab angle of the projectile (mass m1) on a target (mass m2) at rest, from the CM angle. | |
| static Double_t | RecoilAngle (Double_t thetaCM) |
| Lab angle of the recoiling target at rest, \((\pi-\theta)/2\). | |
| static Double_t | Angle (const TVector3 &a, const TVector3 &b) |
| Angle between two vectors, \(\mathrm{atan2}(|\vec a\times\vec b|, \vec a\cdot\vec b)\), accurate at 0 and \(\pi\). | |
Private Member Functions | |
| void | Reset () |
| set every result and input to its empty value (status kInvalid) | |
| void | Solve () |
| from r, v, mu, kappa (set by Compute) | |
| void | SetLab () |
| lab velocities and angles from the relative asymptotes | |
Private Attributes | |
| status | st = kInvalid |
| orbit classification | |
| Bool_t | fixedCentre = kFALSE |
| exactly one body fixed | |
| Bool_t | fixed1 = kFALSE |
| particle 1 is a fixed centre | |
| Bool_t | fixed2 = kFALSE |
| particle 2 is a fixed centre | |
| Double_t | m1 = 0. |
| mass of particle 1 (amu) | |
| Double_t | m2 = 0. |
| mass of particle 2 (amu) | |
| Double_t | mu = 0. |
| reduced (or moving) mass (amu) | |
| Double_t | kappa = 0. |
| interaction constant | |
| TVector3 | r |
| TVector3 | v |
| TVector3 | vcm |
| relative position, relative velocity, centre-of-mass velocity | |
| Double_t | energy = 0. |
| orbital energy | |
| TVector3 | lvec |
| TVector3 | avec |
| TVector3 | evec |
| TVector3 | phat |
| angular momentum, Laplace-Runge-Lenz, eccentricity vector, periapsis direction | |
| Double_t | ecc = 0. |
| eccentricity | |
| Double_t | rmin = 0. |
| closest approach | |
| Double_t | vinf = 0. |
| relative speed at infinity | |
| TVector3 | vinRel |
| TVector3 | voutRel |
| incoming / outgoing relative velocity | |
| Double_t | thetaCM = 0. |
| CM scattering angle. | |
| Double_t | bimp = 0. |
| effective impact parameter | |
| TVector3 | v1in |
| TVector3 | v1out |
| TVector3 | v2in |
| TVector3 | v2out |
| lab asymptotic velocities | |
| Double_t | thetaLab1 = 0. |
| lab angle of particle 1 | |
| Double_t | thetaLab2 = 0. |
| lab angle of particle 2 | |
Analytic two-body 1/r asymptote calculator.
The simulation starts and stops at finite distance, where the potential energy is not negligible. For two bodies interacting through a pure 1/r potential the relative orbit is a conic section, and the state at infinity follows exactly from the state at ANY single instant through the conserved orbital energy, angular momentum and Laplace-Runge-Lenz vector. asymptote takes that one state and returns the incoming and outgoing asymptotes (speed at infinity, directions, scattering angle, effective impact parameter, closest approach, lab velocities).
\[ U(r) = \frac{\kappa}{r} \]
\(\kappa > 0\) is repulsive, \(\kappa < 0\) attractive. For the Coulomb force \(\kappa = k\,q_1 q_2\) with \(k = 0.00154629\ \mathrm{amu\,fm\,c^2/e^2}\). Units are fm, amu, c, fm/c (any consistent set works: nothing is hard-coded). Angles are in radians.
The result is EXACT only when all of these hold:
Otherwise it is only an approximation that improves as the given state is taken farther from the other bodies.
Relative coordinates are those of particle 1 with respect to particle 2: \(\vec r = \vec x_1 - \vec x_2\), \(\vec v = \vec v_1 - \vec v_2\).
The masses taken from a particle are its rest masses (particle::GetM0), even if the event integrates relativistically.
\[ E = \frac{\mu v^2}{2} + \frac{\kappa}{r} \]
\[ \vec L = \mu\,\vec r \times \vec v \]
\[ \vec A = (\mu \vec v) \times \vec L + \mu\kappa\,\hat r \]
\(E\) is the orbital energy, \(\vec L\) the angular momentum and \(\vec A\) the Laplace-Runge-Lenz vector. For either sign of \(\kappa\), \(\vec A\) points from the centre toward the point of closest approach (periapsis), and \(|\vec A| = \mu|\kappa|\,e\). The eccentricity vector is defined here as \(\vec e = \vec A/(\mu|\kappa|)\), so it also points toward periapsis (for \(\kappa > 0\) this is minus the textbook \(\vec e\) vector of a repulsive orbit).
See asymptote::status. Only kUnbound, kHeadOn and kFree have asymptotes (HasAsymptote()). For every other state the asymptotic getters (speed at infinity, directions, angles, b, lab velocities) return 0 or zero vectors, never NaN. What remains set for each state:
Definition at line 102 of file asymptote.hpp.
| enum asymptote::status |
Classification of the relative orbit. Only kUnbound, kHeadOn and kFree have asymptotes (see HasAsymptote()).
Definition at line 106 of file asymptote.hpp.
|
inline |
Empty object; the status is kInvalid until Compute() is called.
Definition at line 117 of file asymptote.hpp.
From two particles of an event (IsInvincible() selects the fixed centre).
Uses the current position, velocity and rest mass of each particle.
| p1 | particle 1 (the relative coordinate is \(\vec x_1-\vec x_2\)); not owned |
| p2 | particle 2; not owned |
| kappa | interaction constant of \(U=\kappa/r\) (amu fm c^2 for the Coulomb force: k q1 q2) |
Definition at line 14 of file asymptote.cpp.
| asymptote::asymptote | ( | TVector3 | x1, |
| TVector3 | v1, | ||
| Double_t | m1, | ||
| Bool_t | fixed1, | ||
| TVector3 | x2, | ||
| TVector3 | v2, | ||
| Double_t | m2, | ||
| Bool_t | fixed2, | ||
| Double_t | kappa | ||
| ) |
From raw states. fixed1 / fixed2: that particle is a fixed centre.
| x1 | position of particle 1 (fm) |
| v1 | velocity of particle 1 (c); ignored if fixed1 |
| m1 | mass of particle 1 (amu); only needs to be positive if not fixed |
| fixed1 | particle 1 is a fixed centre |
| x2 | position of particle 2 (fm) |
| v2 | velocity of particle 2 (c); ignored if fixed2 |
| m2 | mass of particle 2 (amu); only needs to be positive if not fixed |
| fixed2 | particle 2 is a fixed centre |
| kappa | interaction constant |
Definition at line 18 of file asymptote.cpp.
| asymptote::asymptote | ( | TVector3 | r, |
| TVector3 | v, | ||
| Double_t | mu, | ||
| Double_t | kappa | ||
| ) |
From the relative state only.
\(\vec r=\vec x_1-\vec x_2\), \(\vec v=\vec v_1-\vec v_2\), reduced mass \(\mu\). Same as a moving particle 1 of mass \(\mu\) around a fixed particle 2 at the origin (so IsFixedCentre() is true, the centre-of-mass velocity is zero and the lab velocities are the relative ones).
| r | relative position (fm) |
| v | relative velocity (c) |
| mu | reduced mass (amu) |
| kappa | interaction constant |
Definition at line 24 of file asymptote.cpp.
|
static |
Angle between two vectors, \(\mathrm{atan2}(|\vec a\times\vec b|, \vec a\cdot\vec b)\), accurate at 0 and \(\pi\).
Definition at line 261 of file asymptote.cpp.
Recompute from two particles (arguments as the matching constructor); all previous results are discarded.
Definition at line 43 of file asymptote.cpp.
| Bool_t asymptote::Compute | ( | TVector3 | r, |
| TVector3 | v, | ||
| Double_t | mu, | ||
| Double_t | kappa | ||
| ) |
Recompute from the relative state (arguments as the matching constructor); all previous results are discarded.
Definition at line 81 of file asymptote.cpp.
| Bool_t asymptote::Compute | ( | TVector3 | x1, |
| TVector3 | v1, | ||
| Double_t | m1, | ||
| Bool_t | fixed1, | ||
| TVector3 | x2, | ||
| TVector3 | v2, | ||
| Double_t | m2, | ||
| Bool_t | fixed2, | ||
| Double_t | kappa | ||
| ) |
Recompute from raw states (arguments as the matching constructor); all previous results are discarded.
Definition at line 53 of file asymptote.cpp.
|
inline |
distance of closest approach (fm)
Definition at line 190 of file asymptote.hpp.
|
inline |
eccentricity; 0 for kFree / kInvalid
Definition at line 188 of file asymptote.hpp.
|
inline |
toward periapsis, \(|\vec e|=e\)
Definition at line 187 of file asymptote.hpp.
|
inline |
\(E=\mu v^2/2+\kappa/r\) (amu c^2)
Definition at line 183 of file asymptote.hpp.
|
inline |
effective \(b=|\vec L|/(\mu v_\infty)\) (fm)
Definition at line 199 of file asymptote.hpp.
|
inline |
interaction constant of \(U=\kappa/r\)
Definition at line 174 of file asymptote.hpp.
|
inline |
\(\mu\,\vec r\times\vec v\)
Definition at line 184 of file asymptote.hpp.
|
inline |
\(|\vec L|\)
Definition at line 185 of file asymptote.hpp.
|
inline |
Laplace-Runge-Lenz vector \((\mu\vec v)\times\vec L+\mu\kappa\,\hat r\).
Definition at line 186 of file asymptote.hpp.
|
inline |
reduced (or moving) mass (amu)
Definition at line 175 of file asymptote.hpp.
|
inline |
unit vector, centre to closest approach
Definition at line 189 of file asymptote.hpp.
|
inline |
\(\vec x_1-\vec x_2\) (fm)
Definition at line 176 of file asymptote.hpp.
|
inline |
classification of the orbit
Definition at line 164 of file asymptote.hpp.
| TString asymptote::GetStatusName | ( | ) | const |
Name of the status as text: "UNBOUND", "HEADON", "FREE", "RADIAL_ATTRACTIVE", "PARABOLIC", "BOUND" or "INVALID".
Definition at line 206 of file asymptote.cpp.
|
inline |
scattering angle in the relative (CM) frame (rad)
Definition at line 198 of file asymptote.hpp.
|
inline |
Lab scattering angle of particle 1 (rad).
The angle between its own asymptotic incoming and outgoing lab velocity. If that particle is at rest before the collision (target at rest, fixed centre), it is measured from the incoming direction of the OTHER particle (recoil angle); 0 if both are 0. 0 for a fixed particle and when there is no asymptote.
Definition at line 224 of file asymptote.hpp.
|
inline |
Lab scattering angle of particle 2 (rad); same rules as GetThetaLab1().
Definition at line 226 of file asymptote.hpp.
|
inline |
\(\vec v_1-\vec v_2\) (c)
Definition at line 177 of file asymptote.hpp.
|
inline |
particle 1, incoming
Definition at line 207 of file asymptote.hpp.
|
inline |
particle 1, outgoing
Definition at line 208 of file asymptote.hpp.
|
inline |
particle 2, incoming
Definition at line 209 of file asymptote.hpp.
|
inline |
particle 2, outgoing
Definition at line 210 of file asymptote.hpp.
|
inline |
centre-of-mass velocity (c; 0 for a fixed centre)
Definition at line 178 of file asymptote.hpp.
|
inline |
relative speed at infinity (c)
Definition at line 195 of file asymptote.hpp.
|
inline |
incoming relative velocity at \(t\to-\infty\)
Definition at line 196 of file asymptote.hpp.
|
inline |
outgoing relative velocity at \(t\to+\infty\)
Definition at line 197 of file asymptote.hpp.
|
inline |
true for kUnbound, kHeadOn, kFree
Definition at line 167 of file asymptote.hpp.
|
static |
Head-on ( \(b=0\)) closest approach, repulsive.
\[ d = \frac{\kappa}{E} = \frac{2\kappa}{\mu v_\infty^2} \]
Negative (meaningless) for an attractive kappa.
| vinf | relative speed at infinity (c) |
| mu | reduced mass (amu) |
| kappa | interaction constant |
Definition at line 249 of file asymptote.cpp.
|
inline |
exactly one of the two bodies is fixed
Definition at line 168 of file asymptote.hpp.
|
inline |
the given state is past closest approach ( \(\vec r\cdot\vec v>0\)); no check of the status
Definition at line 169 of file asymptote.hpp.
|
static |
Lab angle of the projectile (mass m1) on a target (mass m2) at rest, from the CM angle.
\[ \tan\theta_{lab} = \frac{\sin\theta}{\cos\theta + m_1/m_2} \]
| thetaCM | scattering angle in the CM frame (rad) |
| m1 | projectile mass (amu) |
| m2 | target mass (amu) |
Definition at line 253 of file asymptote.cpp.
| TString asymptote::Print | ( | Bool_t | mute = kFALSE | ) | const |
Text summary (status, kappa, mu, E, |L|, e, rmin, b, vinf, theta, outgoing velocities).
| mute | if true, only build the string; otherwise also print it on std::cout |
Definition at line 219 of file asymptote.cpp.
|
static |
Lab angle of the recoiling target at rest, \((\pi-\theta)/2\).
| thetaCM | scattering angle in the CM frame (rad) |
Definition at line 257 of file asymptote.cpp.
|
private |
set every result and input to its empty value (status kInvalid)
Definition at line 28 of file asymptote.cpp.
|
static |
Rutherford scattering angle in the CM frame.
\[ \theta = 2\arctan\frac{\kappa}{\mu v_\infty^2 b} \]
Signed: negative for an attractive kappa (deflection toward the centre); \(|\theta|\) is the angle between incoming and outgoing directions. \(b=0\) gives \(\pm\pi\). The sign of b is ignored ( \(|b|\) is used).
| b | impact parameter (fm) |
| vinf | relative speed at infinity (c) |
| mu | reduced mass (amu) |
| kappa | interaction constant |
Definition at line 234 of file asymptote.cpp.
|
static |
Closest approach for impact parameter b.
\[ r_{min} = a + \sqrt{a^2 + b^2},\qquad a = \frac{\kappa}{\mu v_\infty^2} \]
(evaluated as \(b^2/(\sqrt{a^2+b^2}-a)\) for \(a<0\) to avoid cancellation).
| b | impact parameter (fm) |
| vinf | relative speed at infinity (c) |
| mu | reduced mass (amu) |
| kappa | interaction constant |
Definition at line 242 of file asymptote.cpp.
|
static |
Inverse of RutherfordAngle().
\[ b = \frac{|\kappa|}{\mu v_\infty^2\tan(|\theta|/2)} \]
Gives infinity for \(\theta=0\).
| theta | scattering angle (rad); the sign is ignored |
| vinf | relative speed at infinity (c) |
| mu | reduced mass (amu) |
| kappa | interaction constant |
Definition at line 238 of file asymptote.cpp.
|
private |
lab velocities and angles from the relative asymptotes
Definition at line 187 of file asymptote.cpp.
|
private |
from r, v, mu, kappa (set by Compute)
Definition at line 86 of file asymptote.cpp.
|
private |
Definition at line 306 of file asymptote.hpp.
|
private |
effective impact parameter
Definition at line 313 of file asymptote.hpp.
|
private |
eccentricity
Definition at line 307 of file asymptote.hpp.
|
private |
orbital energy
Definition at line 305 of file asymptote.hpp.
|
private |
Definition at line 306 of file asymptote.hpp.
|
private |
particle 1 is a fixed centre
Definition at line 297 of file asymptote.hpp.
|
private |
particle 2 is a fixed centre
Definition at line 298 of file asymptote.hpp.
|
private |
exactly one body fixed
Definition at line 296 of file asymptote.hpp.
|
private |
interaction constant
Definition at line 302 of file asymptote.hpp.
|
private |
Definition at line 306 of file asymptote.hpp.
|
private |
mass of particle 1 (amu)
Definition at line 299 of file asymptote.hpp.
|
private |
mass of particle 2 (amu)
Definition at line 300 of file asymptote.hpp.
|
private |
reduced (or moving) mass (amu)
Definition at line 301 of file asymptote.hpp.
|
private |
angular momentum, Laplace-Runge-Lenz, eccentricity vector, periapsis direction
Definition at line 306 of file asymptote.hpp.
|
private |
Definition at line 303 of file asymptote.hpp.
|
private |
closest approach
Definition at line 308 of file asymptote.hpp.
orbit classification
Definition at line 295 of file asymptote.hpp.
|
private |
CM scattering angle.
Definition at line 312 of file asymptote.hpp.
|
private |
lab angle of particle 1
Definition at line 316 of file asymptote.hpp.
|
private |
lab angle of particle 2
Definition at line 317 of file asymptote.hpp.
|
private |
Definition at line 303 of file asymptote.hpp.
|
private |
Definition at line 315 of file asymptote.hpp.
|
private |
Definition at line 315 of file asymptote.hpp.
|
private |
Definition at line 315 of file asymptote.hpp.
|
private |
lab asymptotic velocities
Definition at line 315 of file asymptote.hpp.
|
private |
relative position, relative velocity, centre-of-mass velocity
Definition at line 303 of file asymptote.hpp.
|
private |
relative speed at infinity
Definition at line 310 of file asymptote.hpp.
|
private |
Definition at line 311 of file asymptote.hpp.
|
private |
incoming / outgoing relative velocity
Definition at line 311 of file asymptote.hpp.