root_mcp.extended.analysis.kinematics module

Kinematics calculations for particle physics analysis.

class root_mcp.extended.analysis.kinematics.KinematicsOperations(config, file_manager)[source]

Bases: object

Particle physics kinematics calculations.

Provides: - Invariant mass calculations - Transverse momentum (pT) - Pseudorapidity (eta) - Azimuthal angle (phi) - Delta R separation - Lorentz transformations - Dalitz variables

Parameters:
__init__(config, file_manager)[source]

Initialize kinematics operations.

Parameters:
  • config (Config) – Server configuration

  • file_manager (FileManager) – File manager instance

compute_boost_to_cm(path, tree_name, pt_branches, eta_branches, phi_branches, mass_branches, selection=None)[source]

Boost particles to center-of-mass frame.

Parameters:
  • path (str) – File path

  • tree_name (str) – Tree name

  • pt_branches (list[str]) – List of pT branches

  • eta_branches (list[str]) – List of eta branches

  • phi_branches (list[str]) – List of phi branches

  • mass_branches (list[str]) – List of mass branches

  • selection (str | None) – Optional cut expression

Returns:

Dictionary with boosted 4-vectors

Return type:

dict[str, Any]

compute_dalitz_variables(path, tree_name, pt_branches, eta_branches, phi_branches, mass_branches, selection=None)[source]

Compute Dalitz plot variables for 3-body decay.

Parameters:
  • path (str) – File path

  • tree_name (str) – Tree name

  • pt_branches (list[str]) – List of 3 pT branches

  • eta_branches (list[str]) – List of 3 eta branches

  • phi_branches (list[str]) – List of 3 phi branches

  • mass_branches (list[str]) – List of 3 mass branches

  • selection (str | None) – Optional cut expression

Returns:

Dictionary with m12_squared and m23_squared arrays

Return type:

dict[str, Any]

compute_delta_r(path, tree_name, eta1, phi1, eta2, phi2, selection=None)[source]

Compute Delta R separation between two objects.

Parameters:
  • path (str) – File path

  • tree_name (str) – Tree name

  • eta1 (str) – First object eta branch

  • phi1 (str) – First object phi branch

  • eta2 (str) – Second object eta branch

  • phi2 (str) – Second object phi branch

  • selection (str | None) – Optional cut expression

Returns:

Dictionary with Delta R array

Return type:

dict[str, Any]

compute_invariant_mass(path, tree_name, pt_branches, eta_branches, phi_branches, mass_branches=None, selection=None)[source]

Compute invariant mass from 4-vectors.

Parameters:
  • path (str) – File path

  • tree_name (str) – Tree name

  • pt_branches (list[str]) – List of pT branches

  • eta_branches (list[str]) – List of eta branches

  • phi_branches (list[str]) – List of phi branches

  • mass_branches (list[str] | None) – List of mass branches (optional, assumes massless if None)

  • selection (str | None) – Optional cut expression

Returns:

Dictionary with invariant mass array

Return type:

dict[str, Any]

compute_transverse_mass(path, tree_name, pt1, phi1, pt2, phi2, selection=None)[source]

Compute transverse mass (useful for W->lν analyses).

Parameters:
  • path (str) – File path

  • tree_name (str) – Tree name

  • pt1 (str) – First particle pT branch

  • phi1 (str) – First particle phi branch

  • pt2 (str) – Second particle pT branch (e.g., MET)

  • phi2 (str) – Second particle phi branch

  • selection (str | None) – Optional cut expression

Returns:

Dictionary with transverse mass array

Return type:

dict[str, Any]