arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2202.03911hep-excs.PLphysics.comp-phphysics.data-an
收藏

面向数组的FastJet Python接口

An array-oriented Python interface for FastJet

Aryan Roy, Jim Pivarski, Chad Wells Freer

摘要:

对HEP数据的分析是一个迭代过程,其中一个步骤的结果通常为下一个步骤提供信息。在探索性分析中,通常对一组事件执行一次计算,然后查看结果(通常使用直方图)以决定下一步尝试什么。Awkward Array是一个Scikit-HEP Python包,它支持数据分析,每次数组操作将cut实现为切片,将组合学实现为可组合函数等。然而,大多数C++ HEP库,如FastJet,都有一个命令式的,每次一个粒子的接口,这在Python中效率低下,并且违背了科学Python的每次数组逻辑。因此,我们开发了fastjet,这是一个pip安装的Python包,它提供了FastJet C++二进制文件、经典的(一次一个粒子)Python接口和新的面向数组的接口,用于Awkward Array。新界面简化了与HEP之外的科学Python软件的互操作性,例如机器学习。在一种情况下,采用这个库和其他面向阵列的工具将HEP分析代码加速了20倍。它被设计为可以轻松地与Scikit-HEP生态系统中的库集成,包括Uproot(文件I/O),hist(直方图),Vector(洛伦兹向量)和Coffea(高级胶水)。我们讨论了fastjet Python库的设计,将经典接口与面向数组的接口以及用于Lorentz向量操作的Vector库集成在一起。新界面是作为开源开发的。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑