Torch Extension Modules (pyc) Python Interfaces

Transformation

An extension module which aims to simplify the transformation between Polar and Cartesian coordinates within the ATLAS detector. In the context of Neural Networks, this is particularly useful, since all functions within the module are written in both native C++ and CUDA, resulting in faster training and inference performance. Some of the module member functions have also been ported to natively support Python types such as floats and integers.

Transformation for Combined Tensors

The term Combined refers to input tensors, where the entire four-vector of the particle is specified, or just enough information for the module to infer the values. For instance, rather than using the individual particle four-vector components as input arguments, one could pass the entire vector as a single tensor, thus reducing code cluttering.

pyc.Transform.Px(torch.tensor pmu) torch.tensor
pyc.Transform.Py(torch.tensor pmu) torch.tensor
pyc.Transform.Pz(torch.tensor pmu) torch.tensor
pyc.Transform.PxPyPz(torch.tensor pmu) torch.tensor
pyc.Transform.PxPyPzE(torch.tensor pmu) torch.tensor
pyc.Transform.Pt(torch.tensor pmc) torch.tensor
pyc.Transform.Eta(torch.tensor pmc) torch.tensor
pyc.Transform.Phi(torch.tensor pmc) torch.tensor
pyc.Transform.PtEtaPhi(torch.tensor pmc) torch.tensor
pyc.Transform.PtEtaPhiE(torch.tensor pmc) torch.tensor

Transformation for Separated Tensors

The term Separated refers to input tensors representing the individual particle’s four momenta compents.

pyc.Transform.Px(torch.tensor pt, torch.tensor phi) torch.tensor
pyc.Transform.Py(torch.tensor pt, torch.tensor phi) torch.tensor
pyc.Transform.Pz(torch.tensor pt, torch.tensor eta) torch.tensor
pyc.Transform.PxPyPz(torch.tensor pt, torch.tensor eta, torch.tensor phi) torch.tensor
pyc.Transform.PxPyPzE(torch.tensor pt, torch.tensor eta, torch.tensor phi, torch.tensor e) torch.tensor
pyc.Transform.Pt(torch.tensor px, torch.tensor py) torch.tensor
pyc.Transform.Eta(torch.tensor px, torch.tensor py, torch.tensor pz) torch.tensor
pyc.Transform.Phi(torch.tensor px, torch.tensor py) torch.tensor
pyc.Transform.PtEtaPhi(torch.tensor px, torch.tensor py, torch.tensor pz) torch.tensor
pyc.Transform.PtEtaPhiE(torch.tensor px, torch.tensor py, torch.tensor pz, torch.tensor e) torch.tensor

Transformation for Combined Floats

pyc.Transform.Px(list[list[pt, eta, phi, e]]) list[float]
pyc.Transform.Py(list[list[pt, eta, phi, e]]) list[float]
pyc.Transform.Pz(list[list[pt, eta, phi, e]]) list[float]
pyc.Transform.PxPyPz(list[list[pt, eta, phi, e]]) list[list[float]]
pyc.Transform.PxPyPzE(list[list[pt, eta, phi, e]]) list[list[float]]
pyc.Transform.Pt(list[list[px, py, pz, e]]) list[float]
pyc.Transform.Eta(tlist[list[px, py, pz, e]] -> list[float]
pyc.Transform.Phi(list[list[px, py, pz, e]]) list[float]
pyc.Transform.PtEtaPhi(list[list[px, py, pz, e]]) list[list[float]]
pyc.Transform.PtEtaPhiE(list[list[px, py, pz, e]]) list[list[float]]

Transformation for Separated Floats

pyc.Transform.Px(float pt, float phi) float
pyc.Transform.Py(float pt, float phi) float
pyc.Transform.Pz(float pt, float eta) float
pyc.Transform.PxPyPz(float pt, float eta, float phi) list[float]
pyc.Transform.PxPyPzE(float pt, float eta, float phi, float e) list[float]
pyc.Transform.Pt(float px, float py) float
pyc.Transform.Eta(float px, float py, float pz) float
pyc.Transform.Phi(float px, float py) float
pyc.Transform.PtEtaPhi(float px, float py, float pz) list[float]
pyc.Transform.PtEtaPhiE(float px, float py, float pz, float e) list[float]

Graph

An extension module which aims to reduce the need for writing redundant torch.scatter node and edge aggregation. Each of the functions highlighted below have the same output type and structure. These are outlined below:

  • clusters:

    The aggregated sum of the 4-vectors

  • unique_sum:

    A tensor holding the unique cluster masses for the predicted topology. This can be interpreted as the number of particles reconstructed in the particular graph. For instance, if the event contains n-particles, with n-signature masses, then in an ideal situation n-particles would be contained within this tensor, rather than m-constituent particles (children).

  • reverse_sum:

    A reverse mapping of unique_sum back to each graph node.

  • node_sum:

    A tensor holding the aggregated node’s 4-vector.

pyc.Graph.Base.unique_aggregation(clusters, node_features) torch.tensor

An aggregation function used to sum node features without double summing any particular node pairs. Given the complexity of the operation in nominal PyTorch, this function is exclusive to CUDA tensors.

Parameters:
  • clusters (torch.tensor) – Cluster indices used to perform the summation over.

  • node_features (torch.tensor) – The feature vector of the node to sum.

pyc.Graph.Cartesian.edge(edge_index, prediction, px, py, pz, e, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The edge classification prediction of the neural network.

  • px (torch.tensor) – The node’s cartesian momentum component in the x-direction.

  • py (torch.tensor) – The node’s cartesian momentum component in the y-direction.

  • pz (torch.tensor) – The node’s cartesian momentum component in the z-direction.

  • e (torch.tensor) – The node’s energy.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Cartesian.edge(edge_index, prediction, pmc, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The edge classification prediction of the neural network.

  • pmc (torch.tensor) – A compact version of the particle’s 4-vector.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Cartesian.node(edge_index, prediction, px, py, pz, e, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The node classification prediction of the neural network.

  • px (torch.tensor) – The node’s cartesian momentum component in the x-direction.

  • py (torch.tensor) – The node’s cartesian momentum component in the y-direction.

  • pz (torch.tensor) – The node’s cartesian momentum component in the z-direction.

  • e (torch.tensor) – The node’s energy.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Cartesian.node(edge_index, prediction, pmc, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The node classification prediction of the neural network.

  • pmc (torch.tensor) – A compact version of the particle’s 4-vector.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Polar.edge(edge_index, prediction, pt, eta, phi, e, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The edge classification prediction of the neural network.

  • pt (torch.tensor) – The particle’s transverse momentum

  • eta (torch.tensor) – The rapidity of the particle

  • phi (torch.tensor) – The azimuthal compnent of the particle node

  • e (torch.tensor) – The node’s energy.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Polar.edge(edge_index, prediction, pmu, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The edge classification prediction of the neural network.

  • pmu (torch.tensor) – A compact version of the particle’s 4-vector.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Polar.node(edge_index, prediction, pt, eta, phi, e, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The node classification prediction of the neural network.

  • pt (torch.tensor) – The particle’s transverse momentum

  • eta (torch.tensor) – The rapidity of the particle

  • phi (torch.tensor) – The azimuthal compnent of the particle node

  • e (torch.tensor) – The node’s energy.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

pyc.Graph.Polar.node(edge_index, prediction, pmu, include_zero) dict
Parameters:
  • edge_index (torch.tensor) – The graph topology (this is usually known as the edge_index)

  • prediction (torch.tensor) – The node classification prediction of the neural network.

  • pmu (torch.tensor) – A compact version of the particle’s 4-vector.

  • include_zero (bool) – Whether to include predictions where the MLP predicts 0.

Return dict[torch.tensor]:

{ clusters : torch.tensor, unique_sum : torch.tensor, reverse_sum : torch.tensor, node_sum : torch.tensor}

Physics

An extension module which optimizes common physics operators. The input tensors can be either polar or cartesian, however one needs to specify the source coordinate type explicitly using the Cartesian or Polar submodules. Similar to what was previously discussed, the inputs can be either combined or separate, depending on preference.

Physics for Combined Tensors (Cartesian)

pyc.Physics.Cartesian.P2(torch.tensor pmc) torch.tensor

Computes the scalar square of the 3-momentum vector of a cartesian tensor.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.P(torch.tensor pmc) torch.tensor

Computes the scalar of the 3-momentum vector of a cartesian tensor.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.Beta2(torch.tensor pmc) torch.tensor

Computes the \beta^2 for the Lorentz Factor from the 3-momentum vector of a cartesian tensor.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.Beta(torch.tensor pmc) torch.tensor

Computes the \beta for the Lorentz Factor from the 3-momentum vector of a cartesian tensor.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.M2(torch.tensor pmc) torch.tensor

Computes the square of the invariant mass from a cartesian 4-vector.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.M(torch.tensor pmc) torch.tensor

Computes the invariant mass from a cartesian 4-vector.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.Mt2(torch.tensor pmc) torch.tensor

Computes the square of the transverse invariant mass from a cartesian 4-vector.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.Mt(torch.tensor pmc) torch.tensor

Computes the transverse invariant mass from a cartesian 4-vector.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.Theta(torch.tensor pmc) torch.tensor

Computes the particle’s \theta from a cartesian 4-vector.

Parameters:

pmc (torch.tensor) – A tensor with the four vector being in cartesian form.

pyc.Physics.Cartesian.DeltaR(torch.tensor pmc1, torch.tensor pmc2) torch.tensor

Computes the \Delta R between two particle 4-vectors.

Parameters:
  • pmc1 (torch.tensor) – The cartesian 4-vector of particle-1.

  • pmc2 (torch.tensor) – The cartesian 4-vector of particle-2.

Physics for Separated Tensors (Cartesian)

pyc.Physics.Cartesian.P2(torch.tensor px, torch.tensor py, torch.tensor pz) torch.tensor
pyc.Physics.Cartesian.P(torch.tensor px, torch.tensor py, torch.tensor pz) torch.tensor
pyc.Physics.Cartesian.Beta2(torch.tensor px, torch.tensor py, torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.Beta(torch.tensor px, torch.tensor py, torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.M2(torch.tensor px, torch.tensor py, torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.M(torch.tensor px, torch.tensor py, torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.Mt2(torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.Mt(torch.tensor pz, torch.tensor e) torch.tensor
pyc.Physics.Cartesian.Theta(torch.tensor px, torch.tensor py, torch.tensor pz) torch.tensor
pyc.Physics.Cartesian.DeltaR(torch.tensor px1, torch.tensor px2, torch.tensor py1, torch.tensor py2, torch.tensor pz1, torch.tensor pz2) torch.tensor

Physics for Combined Tensors (Polar)

pyc.Physics.Polar.P2(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.P(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.Beta2(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.Beta(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.M2(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.M(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.Mt2(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.Mt(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.Theta(torch.tensor pmu) torch.tensor
pyc.Physics.Polar.DeltaR(torch.tensor pmu1, torch.tensor pmu2) torch.tensor

Physics for Separated Tensors (Polar)

pyc.Physics.Polar.P2(torch.tensor pt, torch.tensor eta, torch.tensor phi) torch.tensor
pyc.Physics.Polar.P(torch.tensor pt, torch.tensor eta, torch.tensor phi) torch.tensor
pyc.Physics.Polar.Beta2(torch.tensor pt, torch.tensor eta, torch.tensor phi, torch.tensor e) torch.tensor
pyc.Physics.Polar.Beta(torch.tensor pt, torch.tensor eta, torch.tensor phi, torch.tensor e) torch.tensor
pyc.Physics.Polar.M2(torch.tensor pt, torch.tensor eta, torch.tensor phi, torch.tensor e) torch.tensor
pyc.Physics.Polar.M(torch.tensor pt, torch.tensor eta, torch.tensor phi, torch.tensor e) torch.tensor
pyc.Physics.Polar.Mt2(torch.tensor pt, torch.tensor eta, torch.tensor e) torch.tensor
pyc.Physics.Polar.Mt(torch.tensor pt, torch.tensor eta, torch.tensor e) torch.tensor
pyc.Physics.Polar.Theta(torch.tensor pt, torch.tensor eta, torch.tensor phi) torch.tensor
pyc.Physics.Polar.DeltaR(torch.tensor eta1, torch.tensor eta2, torch.tensor phi1, torch.tensor phi2) torch.tensor

Operators

This module of the extension package is reserved for operators that are commonly associated with matrix manipulation. Most of the discussed functions were designed with CUDA in mind however, for completeness C++ wrappers are also written in native torch. The native torch implementations allow the user to leverage these operators in a non-CUDA environment.

pyc.Operators.Dot(vec1, vec2) -> torch.tensor (Entries x 1)

Takes the Dot product of two tensors and sums the entries along the last dimension. The output of this operator will yield a tensor with dimensionality (n - entries, 1)

Params torch.tensor vec1:

Expects a tensor with dimensionality N x Features.

Params torch.tensor vec2:

Expects a tensor with dimensionality N x (Features <= vec1).

pyc.Operators.Mul(vec1, vec2) torch.tensor

Takes the dot product of the row vector from vec1 and column from vec2. The output tensor will be of dimensionality (n - entries, nodes, features of vec2)

Params torch.tensor vec1:

Expects a tensor with dimensionality n x nodes x features.

Params torch.tensor vec2:

Expects a tensor with dimensionality n x nodes x (features <= vec1).

Single/Double Neutrino Reconstruction

This module is related to the analytical neutrino reconstruction algorithm published under 1305.1878v2. The paper discuses an analytical approach to reconstructing single and double neutrino momenta in the context of top-quark decay modes. Based on the event’s missing transverse energy, leptons and b-quarks, possible neutrinos are modeled using ellipses. In the single neutrino case, possible neutrino solutions are constrained by selecting the lowest \chi^2, given the W-boson, top-quark and neutrino masses. As for the double neutrino case, pairs of b-quarks and leptons are used to model two ellipses, where the intersection of these indicates possible neutrino candidates.

The module is a complete reimplementation of the pre-existant source code provided by the authors in native C++ and CUDA, thus enhacing the computational speeds of the algorithm, making it viable for machine learning purposes. Similar to other modules of this package, input arguments are split into combined and separate particle tensors, without incurring performance penalities.

Single Neutrino Reconstruction

pyc.NuSol.Polar.Nu(pmu_b, pmu_mu, met_phi, masses, sigma, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino solution 3-vector.

  • list[1]: The resulting chi2 value of the respective neutrino candidate.

Parameters:
  • pmu_b (torch.tensor) – The four vector of the b-quark/b-jet (pt, eta, phi, e)

  • pmu_mu (torch.tensor) – The four vector of the lepton matched to the b-quark/b-jet (pt, eta, phi, e)

  • met_phi (torch.tensor) – The scalar value of missing transverse energy and the azimuthal angle.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • sigma (torch.tensor) – An uncertainty matrix of the missing transverse energy resolution of the event (example: [[100, 0, 0, 100]])

  • null (float) – An adjustable parameter indicating the cut-off chi2 values.

Return list[torch.tensor]:

List of solutions and associated chi2 values.

pyc.NuSol.Polar.Nu(pt_b, eta_b, phi_b, e_b, pt_mu, eta_mu, phi_mu, e_mu, met, phi, masses, sigma, float null = 10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino solution 3-vector.

  • list[1]: The resulting chi2 value of the respective neutrino candidate.

Parameters:
  • pt_b (torch.tensor) – The transverse momenta of the b-quark/jet.

  • eta_b (torch.tensor) – The pseudo-rapidity of the b-quark/jet.

  • phi_b (torch.tensor) – The Azimuthal angle of the b-quark/jet.

  • e_b (torch.tensor) – The energy of the b-quark/jet.

  • pt_mu (torch.tensor) – The transverse momenta of the matched lepton.

  • eta_mu (torch.tensor) – The pseudo-rapidity of the matched lepton.

  • phi_mu (torch.tensor) – The Azimuthal angle of the matched lepton.

  • e_mu (torch.tensor) – The energy of the matched lepton.

  • met (torch.tensor) – The scalar value of the missing transverse energy.

  • phi (torch.tensor) – The azimuthal angle of the missing transverse energy.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • sigma (torch.tensor) – An uncertainty matrix of the missing transverse energy resolution of the event (example: [[100, 0, 0, 100]])

  • null (float) – An adjustable parameter indicating the cut-off chi2 values.

Return list[torch.tensor]:

List of solutions and associated chi2 values.

pyc.NuSol.Cartesian.Nu(pmc_b, pmc_mu, met_xy, masses, sigma, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino solution 3-vector.

  • list[1]: The resulting chi2 value of the respective neutrino candidate.

Parameters:
  • pmc_b (torch.tensor) – The four vector of the b-quark/b-jet (px, py, pz, e)

  • pmc_mu (torch.tensor) – The four vector of the lepton matched to the b-quark/b-jet (px, py, pz, e)

  • met_xy (torch.tensor) – The scalar value of missing transverse energy in the x and y direction of the detector.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • sigma (torch.tensor) – An uncertainty matrix of the missing transverse energy resolution of the event (example: [[100, 0, 0, 100]])

  • null (float) – An adjustable parameter indicating the cut-off chi2 values.

Return list[torch.tensor]:

List of solutions and associated chi2 values.

pyc.NuSol.Cartesian.Nu(px_b, py_b, pz_b, e_b, px_mu, py_mu, pz_mu, e_mu, met_x, met_y, masses, sigma, float null = 10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino solution 3-vector.

  • list[1]: The resulting chi2 value of the respective neutrino candidate.

Parameters:
  • px_b (torch.tensor) – The momenta of the b-quark/jet in the x direction.

  • py_b (torch.tensor) – The momenta of the b-quark/jet in the y direction.

  • pz_b (torch.tensor) – The momenta of the b-quark/jet in the z direction.

  • e_b (torch.tensor) – The energy of the b-quark/jet.

  • px_mu (torch.tensor) – The momenta of the matched lepton in the x direction.

  • py_mu (torch.tensor) – The momenta of the matched lepton in the y direction.

  • pz_mu (torch.tensor) – The momenta of the matched lepton in the z direction.

  • e_mu (torch.tensor) – The energy of the matched lepton.

  • met_x (torch.tensor) – The missing transverse energy in the x direction.

  • met_y (torch.tensor) – The missing transverse energy in the y direction.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • sigma (torch.tensor) – An uncertainty matrix of the missing transverse energy resolution of the event (example: [[100, 0, 0, 100]])

  • null (float) – An adjustable parameter indicating the cut-off chi2 values.

Return list[torch.tensor]:

List of solutions and associated chi2 values.

Double Neutrino Reconstruction

pyc.NuSol.Polar.NuNu(pmu_b1, pmu_b2, pmu_mu1, pmu_mu2, met_phi, masses, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton pairs. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino 3-vector solutions for the first b-quark/jet and lepton pair.

  • list[1]: Candidate neutrino 3-vector solutions for the second b-quark/jet and lepton pair.

  • list[2]: Diagonal distance values for the respective solution pairs.

  • list[3]: The normal vector used to derive the neutrino 3-vectors (n_perp).

  • list[4]: The perpendicular neutrino 3-vector solution set for the first b-quark/jet and lepton pair (H_perp1).

  • list[5]: The perpendicular neutrino 3-vector solution set for the second b-quark/jet and lepton pair (H_perp2).

  • list[6]: A boolean mask indicating no solutions were found given the specified null limit.

Parameters:
  • pmu_b1 (torch.tensor) – The four vector of the first b-quark/b-jet (pt, eta, phi, e)

  • pmu_b2 (torch.tensor) – The four vector of the second b-quark/b-jet (pt, eta, phi, e)

  • pmu_mu1 (torch.tensor) – The four vector of the first lepton matched to the b-quark/b-jet (pt, eta, phi, e)

  • pmu_mu2 (torch.tensor) – The four vector of the second lepton matched to the b-quark/b-jet (pt, eta, phi, e)

  • met_phi (torch.tensor) – The scalar value of missing transverse energy and the azimuthal angle.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • null (float) – An adjustable parameter indicating the cut-off distance value.

Return list[torch.tensor]:

List of neutrino solutions.

pyc.NuSol.Polar.NuNu(pt_b1, eta_b1, phi_b1, e_b1, pt_b2, eta_b2, phi_b2, e_b2, pt_mu1, eta_mu1, phi_mu1, e_mu1, pt_mu2, eta_mu2, phi_mu2, e_mu2, met, phi, masses, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton pairs. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino 3-vector solutions for the first b-quark/jet and lepton pair.

  • list[1]: Candidate neutrino 3-vector solutions for the second b-quark/jet and lepton pair.

  • list[2]: Diagonal distance values for the respective solution pairs.

  • list[3]: The normal vector used to derive the neutrino 3-vectors (n_perp).

  • list[4]: The perpendicular neutrino 3-vector solution set for the first b-quark/jet and lepton pair (H_perp1).

  • list[5]: The perpendicular neutrino 3-vector solution set for the second b-quark/jet and lepton pair (H_perp2).

  • list[6]: A boolean mask indicating no solutions were found given the specified null limit.

Parameters:
  • pt_b1 (torch.tensor) – The transverse momenta of the b-quark/jet.

  • eta_b1 (torch.tensor) – The pseudo-rapidity of the b-quark/jet.

  • phi_b1 (torch.tensor) – The Azimuthal angle of the b-quark/jet.

  • e_b1 (torch.tensor) – The energy of the b-quark/jet.

  • pt_b2 (torch.tensor) – The transverse momenta of the b-quark/jet.

  • eta_b2 (torch.tensor) – The pseudo-rapidity of the b-quark/jet.

  • phi_b2 (torch.tensor) – The Azimuthal angle of the b-quark/jet.

  • e_b2 (torch.tensor) – The energy of the b-quark/jet.

  • pt_mu1 (torch.tensor) – The transverse momenta of the matched lepton.

  • eta_mu1 (torch.tensor) – The pseudo-rapidity of the matched lepton.

  • phi_mu1 (torch.tensor) – The Azimuthal angle of the matched lepton.

  • e_mu1 (torch.tensor) – The energy of the matched lepton.

  • pt_mu2 (torch.tensor) – The transverse momenta of the matched lepton.

  • eta_mu2 (torch.tensor) – The pseudo-rapidity of the matched lepton.

  • phi_mu2 (torch.tensor) – The Azimuthal angle of the matched lepton.

  • e_mu2 (torch.tensor) – The energy of the matched lepton.

  • met (torch.tensor) – The scalar value of the missing transverse energy.

  • phi (torch.tensor) – The azimuthal angle of the missing transverse energy.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • null (float) – An adjustable parameter indicating the cut-off distance value.

Return list[torch.tensor]:

List of neutrino solutions.

pyc.NuSol.Cartesian.NuNu(pmc_b1, pmc_b2, pmc_mu1, pmc_mu2, met_xy, masses, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton pairs. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino 3-vector solutions for the first b-quark/jet and lepton pair.

  • list[1]: Candidate neutrino 3-vector solutions for the second b-quark/jet and lepton pair.

  • list[2]: Diagonal distance values for the respective solution pairs.

  • list[3]: The normal vector used to derive the neutrino 3-vectors (n_perp).

  • list[4]: The perpendicular neutrino 3-vector solution set for the first b-quark/jet and lepton pair (H_perp1).

  • list[5]: The perpendicular neutrino 3-vector solution set for the second b-quark/jet and lepton pair (H_perp2).

  • list[6]: A boolean mask indicating no solutions were found given the specified null limit.

Parameters:
  • pmc_b1 (torch.tensor) – The four vector of the first b-quark/b-jet (px, py, pz, e)

  • pmc_b2 (torch.tensor) – The four vector of the second b-quark/b-jet (px, py, pz, e)

  • pmc_mu1 (torch.tensor) – The four vector of the first lepton matched to the b-quark/b-jet (px, py, pz, e)

  • pmc_mu2 (torch.tensor) – The four vector of the second lepton matched to the b-quark/b-jet (px, py, pz, e)

  • met_xy (torch.tensor) – The scalar value of missing transverse energy in the x and y direction of the detector.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • null (float) – An adjustable parameter indicating the cut-off distance value.

Return list[torch.tensor]:

List of neutrino solutions.

pyc.NuSol.Cartesian.NuNu(px_b1, py_b1, pz_b1, e_b1, px_b2, py_b2, pz_b2, e_b2, px_mu1, py_mu1, pz_mu1, e_mu1, px_mu2, py_mu2, pz_mu2, e_mu2, met_x, met_y, masses, null=10e-10) list[torch.tensor]

Computes candidate neutrino 3-vector solutions of a given b-quark/jet and matched lepton pairs. The return type is a list of tensors, with the following index values:

  • list[0]: Candidate neutrino 3-vector solutions for the first b-quark/jet and lepton pair.

  • list[1]: Candidate neutrino 3-vector solutions for the second b-quark/jet and lepton pair.

  • list[2]: Diagonal distance values for the respective solution pairs.

  • list[3]: The normal vector used to derive the neutrino 3-vectors (n_perp).

  • list[4]: The perpendicular neutrino 3-vector solution set for the first b-quark/jet and lepton pair (H_perp1).

  • list[5]: The perpendicular neutrino 3-vector solution set for the second b-quark/jet and lepton pair (H_perp2).

  • list[6]: A boolean mask indicating no solutions were found given the specified null limit.

Parameters:
  • px_b1 (torch.tensor) – The momenta of the b-quark/jet in the x direction.

  • py_b11 (torch.tensor) – The momenta of the b-quark/jet in the y direction.

  • pz_b1 (torch.tensor) – The momenta of the b-quark/jet in the z direction.

  • e_b1 (torch.tensor) – The energy of the b-quark/jet.

  • px_b2 (torch.tensor) – The momenta of the matched lepton in the x direction.

  • py_b2 (torch.tensor) – The momenta of the matched lepton in the y direction.

  • pz_b2 (torch.tensor) – The momenta of the matched lepton in the z direction.

  • e_b2 (torch.tensor) – The energy of the matched lepton.

  • px_mu1 (torch.tensor) – The momenta of the b-quark/jet in the x direction.

  • py_mu1 (torch.tensor) – The momenta of the b-quark/jet in the y direction.

  • pz_mu1 (torch.tensor) – The momenta of the b-quark/jet in the z direction.

  • e_mu1 (torch.tensor) – The energy of the b-quark/jet.

  • px_mu2 (torch.tensor) – The momenta of the matched lepton in the x direction.

  • py_mu2 (torch.tensor) – The momenta of the matched lepton in the y direction.

  • pz_mu2 (torch.tensor) – The momenta of the matched lepton in the z direction.

  • e_mu2 (torch.tensor) – The energy of the matched lepton.

  • met_x (torch.tensor) – The missing transverse energy in the x direction.

  • met_y (torch.tensor) – The missing transverse energy in the y direction.

  • masses (torch.tensor) – The masses of the W-boson (80.385 GeV), top-quark (172.62 GeV), neutrino (0 GeV).

  • null (float) – An adjustable parameter indicating the cut-off distance value.

Return list[torch.tensor]:

List of neutrino solutions.