src.kinematics module#
Event kinematics for pi^- p -> X n with X-> gamma gamma.
Calculation steps:
Build initial-state 4-vectors in the LAB frame.
Sample cos(theta*) in the CM frame using t-distribution.
Build outgoing meson 4-vector in CM frame.
Boost meson 4-vector to LAB frame.
Isotropic two-body decay of meson to two photons in LAB frame.
Compute kinematic variables and plot distributions.
- src.kinematics.build_initial_state()[source]#
Build initial-state 4-vectors in the LAB frame for beam + target.
- Returns:
p_beam (ROOT.TLorentzVector) – Beam 4-vector in LAB (along +z).
p_target (ROOT.TLorentzVector) – Target 4-vector in LAB (at rest).
p_tot (ROOT.TLorentzVector) – Total initial 4-vector in LAB.
s (float) – Mandelstam s in (GeV)^2.
beta_cm (ROOT.TVector3) – Boost vector that takes CM -> LAB (i.e. +beta_cm).
- src.kinematics.two_body_momentum_cm(s, m_c, m_d)[source]#
Compute the CM momentum magnitude p* for a -> c+d at fixed s.
- Parameters:
s (float) – Mandelstam s in (GeV)^2.
m_c (float) – Final-state masses in GeV.
m_d (float) – Final-state masses in GeV.
- Returns:
p_star (float) – CM momentum magnitude in GeV.
- src.kinematics.meson_fourvec_cm(s, m_meson, cos_th, rng)[source]#
Build the outgoing meson 4-vector in the CM frame using sampled t.
- Parameters:
s (float) – Mandelstam s in (GeV)^2.
m_meson (float) – Outgoing meson mass (pi0 or eta) in GeV.
cos_th (float) – cos(theta*) used for the direction.
rng (np.random.Generator) – Random number generator.
- Returns:
p_meson_cm (ROOT.TLorentzVector) – Meson 4-vector in CM.
cos_th (float) – cos(theta*) used for the direction.
phi (float) – Azimuth in radians.
- src.kinematics.boost_cm_to_lab(p4_cm, beta_cm)[source]#
Boost a 4-vector from CM to LAB.
- Parameters:
p4_cm (ROOT.TLorentzVector) – 4-vector in the CM frame.
beta_cm (ROOT.TVector3) – Boost vector that takes CM -> LAB.
- Returns:
p4_lab (ROOT.TLorentzVector) – Boosted 4-vector in the LAB frame.
- src.kinematics.decay_to_two_photons_isotropic(p_mother_lab, rng)[source]#
Isotropic two-body decay mother -> gamma gamma.
- Parameters:
p_mother_lab (ROOT.TLorentzVector) – Mother 4-vector in the LAB frame.
rng (np.random.Generator) – Random number generator.
- Returns:
g1_lab, g2_lab (ROOT.TLorentzVector) – Photon 4-vectors in the LAB frame.
- src.kinematics.generate_event_from_t(rng, n_samples, channel='pi0')[source]#
Generate a single event given a sampled Mandelstam t.
- Parameters:
rng (np.random.Generator) – Random number generator.
n_samples (int) – Number of samples to generate.
channel (str) – Either “pi0” or “eta”.
- Returns:
event_list (list[dict]) – List of dictionaries with ROOT TLorentzVectors and useful scalars: - cos_theta_star - p_meson_cm, p_meson_lab - g1_lab, g2_lab - m_gg (reconstructed invariant mass from LAB photons) - opening_angle (radians) between LAB photons
- src.kinematics.plot_kinematics(n_samples, rng)[source]#
Plot kinematic distributions for generated events.
Plots:
Meson pseudorapidity in LAB.
Photon pseudorapidity in LAB from meson decay.
DeltaR between the two photons from meson decay.
Photon energy in LAB from meson decay.
Meson energy in LAB.
- Parameters:
n_samples (int) – Number of samples to generate.
rng (np.random.Generator) – Random number generator.