kinematics¶
analysis_helpers.kinematics
¶
ip_all(a_x, a_y, a_z, n_x, n_y, n_z, p_x, p_y, p_z)
¶
Function to calculate the impact parameter of a point \(\vec{p}\) from a line passing from a point \(\vec{a}\) and having direction \(\vec{n}\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a_x, a_y, a_z
|
(float, float, float)
|
coordinates (x,y,z) of a point on the line |
required |
n_x, n_y, n_z
|
(float, float, float)
|
magnitudes (x,y,z) of the unit vector of the line direction |
required |
p_x. p_y, p_z
|
(float, float, float)
|
coordinates (x,y,z) of the point |
required |
Source code in src/analysis_helpers/kinematics.py
doca(Ax, Ay, Az, Atx, Aty, Bx, By, Bz, Btx, Bty)
¶
Calculate the Distance of Closest Approach (DOCA) between two lines in 3D space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Ax
|
float
|
x-coordinate of a point on line A |
required |
Ay
|
float
|
y-coordinate of a point on line A |
required |
Az
|
float
|
z-coordinate of a point on line A |
required |
Atx
|
float
|
x-component of the local direction (slope) vector of line A |
required |
Aty
|
float
|
y-component of the local direction (slope) vector of line A |
required |
Bx
|
float
|
x-coordinate of a point on line B |
required |
By
|
float
|
y-coordinate of a point on line B |
required |
Bz
|
float
|
z-coordinate of a point on line B |
required |
Btx
|
float
|
x-component of the local direction (slope) vector of line B |
required |
Bty
|
float
|
y-component of the local direction (slope) vector of line B |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the Distance of Closest Approach (DOCA) between the two lines |
Source code in src/analysis_helpers/kinematics.py
dira(Px, Py, Pz, Vx, Vy, Vz, PVx, PVy, PVz)
¶
Calculate the Directional Angle (DIRA) between a particle and a vertex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Px
|
float
|
x-component of the particle's momentum |
required |
Py
|
float
|
y-component of the particle's momentum |
required |
Pz
|
float
|
z-component of the particle's momentum |
required |
Vx
|
float
|
x-coordinate of the vertex |
required |
Vy
|
float
|
y-coordinate of the vertex |
required |
Vz
|
float
|
z-coordinate of the vertex |
required |
PVx
|
float
|
x-coordinate of the primary vertex |
required |
PVy
|
float
|
y-coordinate of the primary vertex |
required |
PVz
|
float
|
z-coordinate of the primary vertex |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the Directional Angle (DIRA) between the particle and the vertex |
Source code in src/analysis_helpers/kinematics.py
opening_angle(P1x, P1y, P1z, P2x, P2y, P2z)
¶
Calculate the opening angle between two 3D vectors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
P1x
|
float
|
x-component of the first vector |
required |
P1y
|
float
|
y-component of the first vector |
required |
P1z
|
float
|
z-component of the first vector |
required |
P2x
|
float
|
x-component of the second vector |
required |
P2y
|
float
|
y-component of the second vector |
required |
P2z
|
float
|
z-component of the second vector |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the opening angle between the two vectors |
Source code in src/analysis_helpers/kinematics.py
ctau(L, m, p)
¶
Calculate the proper time (CTAU) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
L
|
float
|
length of the particle's trajectory in millimeters |
required |
m
|
float
|
mass of the particle in MeV/c^2 |
required |
p
|
float
|
momentum of the particle in MeV/c per millimeter |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
proper time (CTAU) of the particle in millimeters |
Source code in src/analysis_helpers/kinematics.py
ctau_from_tau(tau)
¶
Calculate the proper time (CTAU) from the lifetime (TAU) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tau
|
float
|
lifetime of the particle in nanoseconds |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
proper time (CTAU) of the particle in millimeters |
Source code in src/analysis_helpers/kinematics.py
distance(x0, y0, z0, x1, y1, z1)
¶
Calculate the distance between two points in 3D space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x0
|
float
|
x-coordinate of the first point |
required |
y0
|
float
|
y-coordinate of the first point |
required |
z0
|
float
|
z-coordinate of the first point |
required |
x1
|
float
|
x-coordinate of the second point |
required |
y1
|
float
|
y-coordinate of the second point |
required |
z1
|
float
|
z-coordinate of the second point |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
distance between the two points |
Source code in src/analysis_helpers/kinematics.py
mass(px, py, pz, pe)
¶
Calculate the invariant mass (M) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
px
|
float
|
x-component of the particle's momentum |
required |
py
|
float
|
y-component of the particle's momentum |
required |
pz
|
float
|
z-component of the particle's momentum |
required |
pe
|
float
|
energy of the particle |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
invariant mass of the particle |
Source code in src/analysis_helpers/kinematics.py
momentum(px, py, pz)
¶
Calculate the momentum (P) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
px
|
float
|
x-component of the particle's momentum |
required |
py
|
float
|
y-component of the particle's momentum |
required |
pz
|
float
|
z-component of the particle's momentum |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
momentum of the particle |
Source code in src/analysis_helpers/kinematics.py
pt(px, py)
¶
Calculate the transverse momentum (PT) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
px
|
float
|
x-component of the particle's momentum |
required |
py
|
float
|
y-component of the particle's momentum |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
transverse momentum of the particle |
Source code in src/analysis_helpers/kinematics.py
slope(pa, pz)
¶
Calculate the slope of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pa
|
float
|
transverse momentum of the particle |
required |
pz
|
float
|
longitudinal momentum of the particle |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
slope of the particle |
Source code in src/analysis_helpers/kinematics.py
pseudorapidity(px, py, pz)
¶
Calculate the pseudorapidity (ETA) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
px
|
float
|
x-component of the particle's momentum |
required |
py
|
float
|
y-component of the particle's momentum |
required |
pz
|
float
|
z-component of the particle's momentum |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the pseudorapidity (ETA) of the particle |
Source code in src/analysis_helpers/kinematics.py
phi(px, py, pz)
¶
Calculate the azimuthal angle (PHI) of a particle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
px
|
float
|
x-component of the particle's momentum |
required |
py
|
float
|
y-component of the particle's momentum |
required |
pz
|
float
|
z-component of the particle's momentum |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the azimuthal angle (PHI) of the particle |
Source code in src/analysis_helpers/kinematics.py
estar2(m12, masses)
¶
Calculate the energy of one of the daughter particles in the rest frame (E*) of a specific two-body subsystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m12
|
float
|
invariant mass of the first two particles |
required |
masses
|
list
|
list of masses of the four particles |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the E* of the two-body system |
Source code in src/analysis_helpers/kinematics.py
estar3(m12, masses)
¶
Calculate the energy of one of the daughter particles in the rest frame (E*) of a specific three-body system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m12
|
float
|
invariant mass of the first two particles |
required |
masses
|
list
|
list of masses of the four particles |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
the E* of the three-body system |