An array-oriented Python interface for FastJet

An array-oriented Python interface for FastJet
复制标题

FastJet 的面向数组的 Python 接口

DOI:
10.1088/1742-6596/2438/1/012011
复制
发表时间:
2023
期刊:
Journal of Physics: Conference Series
影响因子:
--
通讯作者:
Freer, Chad Wells
Freer, Chad Wells
中科院分区:
--
文献类型:
--
作者:
Roy, Aryan;Pivarski, Jim;Freer, Chad Wells

文献摘要

参考文献

相似文献

对HEP数据的分析是一个迭代过程,在这个过程中,一个步骤的结果往往会通知下一个步骤。在探索性分析中,通常对一组事件执行一次计算,然后查看结果(通常带有直方图)以决定下一步尝试什么。Baukous Array是一个Scikit-Hep Python包,它支持使用一次数组操作进行数据分析,以将切割实现为切片,将组合函数实现为可组合函数等。然而,大多数C++Hep库,如FastJet,具有强制的、一次一个粒子的接口,这在Python中效率低下,并且与科学Python的一次数组逻辑背道而驰。因此,我们开发了FastJet,这是一个可通过pip安装的Python包,它提供了FastJet C++二进制文件、经典的(一次粒子的)Python接口,以及新的面向数组的接口,以便与Chaubous Array一起使用。新的界面简化了与HEP以外的科学Python软件的互操作性,例如机器学习。在一个案例中,将该文库与其他面向数组的工具一起使用,将HEP分析代码加速了20倍。它的设计可以很容易地与Scikit-HEP生态系统中的库集成,包括Uroot(文件I/O)、HIST(组织图)、矢量(洛伦兹矢量)和Coffea(高级胶)。我们讨论了FastJet Python库的设计,将经典接口与面向数组的接口集成在一起,并与用于洛伦兹向量运算的向量库进行集成。新界面是以开放源码的形式开发的。
Analysis on HEP data is an iterative process in which the results of one step often inform the next. In an exploratory analysis, it is common to perform one computation on a collection of events, then view the results (often with histograms) to decide what to try next. Awkward Array is a Scikit-HEP Python package that enables data analysis with array-at-a-time operations to implement cuts as slices, combinatorics as composable functions, etc. However, most C++ HEP libraries, such as FastJet, have an imperative, one-particle-at-a-time interface, which would be inefficient in Python and goes against the grain of the array-at-a-time logic of scientific Python. Therefore, we developed fastjet, a pip-installable Python package that provides FastJet C++ binaries, the classic (particle-at-a-time) Python interface, and the new array-oriented interface for use with Awkward Array. The new interface streamlines interoperability with scientific Python software beyond HEP, such as machine learning. In one case, adopting this library along with other array-oriented tools accelerated HEP analysis code by a factor of 20. It was designed to be easily integrated with libraries in the Scikit-HEP ecosystem, including Uproot (file I/O), hist (histogramming), Vector (Lorentz vectors), and Coffea (high-level glue). We discuss the design of the fastjet Python library, integrating the classic interface with the array oriented interface and with the Vector library for Lorentz vector operations. The new interface was developed as open source.
DOI: 10.1051/epjconf/201921406021
发表时间: 2019
影响因子: --
作者:
A. Rizzi;G. Petrucciani;M. Peruzzi
通讯作者: A. Rizzi;G. Petrucciani;M. Peruzzi