Skip to main content

FastJet Contrib for computing the Energy Mover's Distance and related geometric quantities

Project description

EventGeometry

build-wheels PyPI version python versions

EventGeometry is a Python package as well as FastJet contrib written primarily in C++. It incorporates the Wasserstein package for computing Wasserstein distances (known in particle physics as the Energy Mover's Distance) into the FastJet ecosystem.

Documentation

The Wasserstein package has good Python and C++ documentation. The main additions of the EventGeometry package are a FastJetEvent class that enables events composed either of a PseudoJet with constituents, or a vector of PseudoJets that can represent any particles.

Particle Weights

The EMD requires a notion of "weight" to use for each particle. EventGeometry is quite flexible in this regard, and allows for the following options:

For use primarily with hadronic/pp events:

Hadronic particle weights

For use primarily with e+e- events:

EE particle weights

For more details, see the source code.

Pairwise Distances

The EMD also requires a notion of distance between particles. EventGeometry supports several options:

For use primarily with hadronic/pp events:

Hadronic pairwise distance measures

For use primarily with e+e- events:

EE pairwise distance measures

Preprocessors

The EMD and PairwiseEMD classes can preprocess events before computing the Energy Mover's Distance. Available preprocessors include:

  • CenterEScheme: Computes the E-scheme axis (by adding Cartesian four-momenta) and centers the particles such that the axis is at the origin.
  • CenterPtCentroid: Computes the pT-weighted centroid of the particles in the rapidity-azimuth plane and centers the particles such that the axis is at the origin.
  • CenterWeightedCentroid: Computes the weighted centroid axis (according to whatever particle weight is being used) and centers the particles that the axis is at the origin.
  • MaskCircle(Rmax): Removes particles from the event that are farther than Rmax away from the axis of the event. Note that this generally only makes sense after using one of the previous Preprocessors to center the event so that the axis is defined.

C++ Usage

The EventGeometry library can be used in header-only mode by including the file EventGeometry.hh (note that the path to the wasserstein folder should be known to the compiler). If compiling an EventGeometry library is desired, one can run make shared (this should work on Linux and MacOS) in order to compile a shared library with appropriate multi-threading capabilities (fully thread-safe even though FastJet may not be). In this case, one should include the line #define DECLARE_EVENTGEOMETRY_TEMPLATES prior to including EventGeometry.hh and one should also link appropriately with the EventGeometry library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EventGeometry-1.0.1.tar.gz (203.7 kB view hashes)

Uploaded Source

Built Distributions

EventGeometry-1.0.1-cp39-cp39-win_amd64.whl (520.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

EventGeometry-1.0.1-cp39-cp39-win32.whl (425.1 kB view hashes)

Uploaded CPython 3.9 Windows x86

EventGeometry-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

EventGeometry-1.0.1-cp39-cp39-musllinux_1_1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

EventGeometry-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (751.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

EventGeometry-1.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (749.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

EventGeometry-1.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (675.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

EventGeometry-1.0.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (661.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

EventGeometry-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (920.1 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

EventGeometry-1.0.1-cp38-cp38-win_amd64.whl (521.2 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

EventGeometry-1.0.1-cp38-cp38-win32.whl (424.1 kB view hashes)

Uploaded CPython 3.8 Windows x86

EventGeometry-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

EventGeometry-1.0.1-cp38-cp38-musllinux_1_1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

EventGeometry-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (752.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

EventGeometry-1.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (748.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

EventGeometry-1.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (676.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

EventGeometry-1.0.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (661.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

EventGeometry-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl (920.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

EventGeometry-1.0.1-cp37-cp37m-win_amd64.whl (521.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

EventGeometry-1.0.1-cp37-cp37m-win32.whl (423.8 kB view hashes)

Uploaded CPython 3.7m Windows x86

EventGeometry-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

EventGeometry-1.0.1-cp37-cp37m-musllinux_1_1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

EventGeometry-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (752.1 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

EventGeometry-1.0.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (749.2 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

EventGeometry-1.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (675.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

EventGeometry-1.0.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (660.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

EventGeometry-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (919.9 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

EventGeometry-1.0.1-cp36-cp36m-win_amd64.whl (521.0 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

EventGeometry-1.0.1-cp36-cp36m-win32.whl (423.8 kB view hashes)

Uploaded CPython 3.6m Windows x86

EventGeometry-1.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

EventGeometry-1.0.1-cp36-cp36m-musllinux_1_1_i686.whl (1.3 MB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

EventGeometry-1.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (752.1 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

EventGeometry-1.0.1-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl (749.2 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ i686

EventGeometry-1.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (675.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

EventGeometry-1.0.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl (660.3 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

EventGeometry-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl (919.9 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page