Rapid event extraction and tensorial event adaption: Libraries for efficient access and generic reweighting of parton-level events and their implementation in the MadtRex module
Stefan Roiser, Robert Schöfbeck, Zenny Wettersten
TL;DR
The paper tackles the computational bottleneck of managing and reweighting parton-level events across large parameter spaces. It introduces Rex and teaRex as C++17 libraries that enable efficient LHE I/O, data-parallel event representations, and completely generic reweighting workflows, forming the foundation for the MadtRex module. The work demonstrates substantial throughput gains, with reweighting on SIMD CPUs and SIMT GPUs achieving more than two orders of magnitude speedups over the standard MG5aMC approach, and shows scalable performance even without explicit parallelism. By bridging object-oriented LHE formats with structure-of-arrays data layouts, Rex/teaRex support flexible, model-agnostic reweighting (e.g., parameter, pdf, SMEFT) while maintaining physics-driven data access and extensible interfaces, enabling practical, large-scale phenomenology studies.
Abstract
We present Rex and teaRex, C++17 libraries for efficient management of parton-level hard scattering event information and completely generic reweighting of such events, respectively. Rex is primarily an interfacing and I/O library for Les Houches Event format files and provides an internal event format designed with data parallelism in mind, and teaRex extends this format to provide full parton-level reweighting functionality with minimal code needing to be written by the end user. These libraries serve as the foundation for the MadtRex reweighting module for MadGraph5_aMC@NLO, extending the functionality of the CUDACPP plugin to allow for data-parallel model-generic leading order parameter reweighting on SIMD-enabled CPUs and SIMT GPUs, speeding up reweighting by more than two orders of magnitude compared to MadGraph5_aMC@NLO running on the exact same hardware while providing trivial scalability to larger and distributed systems.
