skillfed

fastjet

fastjet v3.5.1.4 372.5K downloads/30d#7,161 on PyPI
Permissive license BSD-3-Clause Active released

What it is and what it does

FastJet is a Python interface to the FastJet C++ library, a standard tool in particle physics for grouping detected particles into jets. It wraps the complete FastJet functionality and integrates tightly with Awkward Array and Vector, allowing you to work with columnar particle data efficiently. The package supports three execution modes: vectorized, out-of-core vectorized using Dask for large datasets, and non-vectorized clustering.

You supply particle data in any coordinate system and specify a clustering algorithm; FastJet groups particles according to that algorithm's rules. The Awkward Array integration means you can pass and receive nested, ragged arrays of particles directly, making it natural to cluster multiple events in a single call. It's designed for high-energy physics workflows where particle clustering is a standard preprocessing step.

Use it for:

  • Cluster detected particles from collider experiments into jets for analysis pipelines.
  • Process large batches of simulated or real collision events using vectorized clustering.
  • Handle datasets too large for memory by clustering with Dask-backed out-of-core processing.
  • Work with particles in arbitrary coordinate systems without manual conversion.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

FastJet provides Python bindings to the FastJet C++ library for clustering particles in high-energy physics, supporting vectorized, out-of-core, and non-vectorized interfaces with Awkward Array integration.

Yes, if you work in high-energy physics and need to cluster particles. The package is actively maintained, has no known vulnerabilities, and offers pre-built wheels for common platforms. Medium install friction applies only to source builds; binary wheels sidestep most C++ dependencies. The BSD-3-Clause license is permissive. Install from PyPI wheels for fastest setup.

Install

fastjet on PyPI

pip

pip install fastjet

uv

uv add fastjet

poetry

poetry add fastjet

Installing fastjet

Before you install

Medium install friction due to compiled C++ components and external build dependencies (libboost, libmpfr, libgmp, swig, autoconf, libtool on Linux). Pre-built wheels available across macOS, Linux, and Windows. Active maintenance with recent release.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install fastjet
import fastjet
# Cluster particles using FastJet algorithms
clusterer = fastjet.ClusterSequence(particles, fastjet.antikt_algorithm, R=0.4)

Requires Python >=3.10. On Linux, build from source requires libboost-dev, libmpfr-dev, libgmp-dev, swig, autoconf, and libtool installed system-wide.

Verify before relying

  • Whether the package provides ready-made clustering algorithms or requires algorithm specification from FastJet C++ library.
  • Performance characteristics and typical clustering speed for datasets of various sizes.
  • Whether Dask integration is automatic or requires explicit opt-in configuration.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 3 — awkward, numpy, vector
Maintenance actively maintained — 17 days since the last release
First released
Downloads 372,459/month — #7,161 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fastjet-3.5.1.4-cp310-cp310-macosx_11_0_universal2.whl; fastjet-3.5.1.4-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; fastjet-3.5.1.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastjet-3.5.1.4-cp310-cp310-musllinux_1_2_aarch64.whl; fastjet-3.5.1.4-cp310-cp310-musllinux_1_2_x86_64.whl; fastjet-3.5.1.4-cp310-cp310-win_amd64.whl; fastjet-3.5.1.4-cp311-cp311-macosx_11_0_universal2.whl; fastjet-3.5.1.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; fastjet-3.5.1.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastjet-3.5.1.4-cp311-cp311-musllinux_1_2_aarch64.whl; fastjet-3.5.1.4-cp311-cp311-musllinux_1_2_x86_64.whl; fastjet-3.5.1.4-cp311-cp311-win_amd64.whl; fastjet-3.5.1.4-cp311-cp311-win_arm64.whl; fastjet-3.5.1.4-cp312-cp312-macosx_11_0_universal2.whl; fastjet-3.5.1.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; fastjet-3.5.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastjet-3.5.1.4-cp312-cp312-musllinux_1_2_aarch64.whl; fastjet-3.5.1.4-cp312-cp312-musllinux_1_2_x86_64.whl; fastjet-3.5.1.4-cp312-cp312-win_amd64.whl; fastjet-3.5.1.4-cp312-cp312-win_arm64.whl

Development Status :: 1 - PlanningIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Scientific/Engineering

Tags

particle clustering high energy physicsfastjet python bindingsjet clustering algorithmawkward array particle datavectorized particle physicsout-of-core clustering
particle-physicshigh-energy-physicscolumnar-data

More Scientific/Engineering packages