Ejemplo n.º 1
0
def get_t_prime(collection: vectors.ParticlePool) -> npy.ndarray:
    # Get initial values
    proton = collection.get_particles_by_name("Proton")[0]
    s_value = get_s(collection)
    sqrt_s = npy.sqrt(s_value)
    mx2 = get_event_mass(collection)**2

    # Calculate for Px and Ex
    ex = (s_value * mx2 * _PROTON_GEV**2) / 2 * sqrt_s
    px = npy.sqrt((ex**2) - mx2)

    # Calculate t0
    t0_left = (mx2 / (2 * sqrt_s))**2
    t0_right = (((proton.e * _PROTON_GEV) / sqrt_s) - px)**2
    t0 = t0_left - t0_right

    return get_t(collection) - t0
Ejemplo n.º 2
0
def get_s(collection: vectors.ParticlePool) -> npy.ndarray:
    proton = collection.get_particles_by_name("Proton")[0]
    momenta = proton.x**2 + proton.y**2 + proton.z**2
    energy = (proton.e + _PROTON_GEV)**2
    return energy - momenta