Skip to main content

Interface ServiceX into TRExFitter to provide an alternative method of reading input ntuples

Project description

ServiceX for TRExFitter

Overview

ServiceX, a component of the IRIS-HEP DOMA group's iDDS, is an experiment-agnostic service to enable on-demand data delivery from data lakes in different data formats, including Apache Arrow and ROOT ntuple.

TRExFitter is a popular framework to perform profile likelihood fits in ATLAS experiment. It takes ROOT histograms or ntuples as input. Long turnaround time of ntuple reading for large and/or remote data would slow down the whole analysis.

servicex-for-trexfitter is a python library to interface ServiceX into TRExFitter framework. It provides an alternative method to produce histograms out of ROOT ntuples.

Expected improvements:

  • Faster turnaround: this library analyzes your TRExFitter configuration and performs on-the-fly transformation to apply preselection (or filtering) on the ntuples and delivers only necessary branches.
  • Disk space: ServiceX reads files on grid, thus no need to have a direct access to ROOT ntuples.
  • Scalability: ServiceX is running on a K8s cluster which can easily scale the job.

Possible bottlenecks:

  • Bad network speed between the grid site and the K8s cluster where ServiceX deployed.
  • Parquet to ROOT ntuple conversion is currently being done on your PC or laptop.

Prerequisites

  • Python 3.6, 3.7, or 3.8
  • Access to an Uproot ServiceX endpoint. More information about ServiceX can be found at ServiceX documentation
  • PyROOT

Usage

Installation

The library is published at PyPI: servicex-for-trexfitter

Prepare TRExFitter configuration

The following items of TRExFitter configuration need to be modified to be compatible with the library:

  • In Job block
    • NtuplePath as <Output Path>/Data
    • Set UseServiceX as TRUE
  • In Sample block: specify NEW option GridDID for each Sample, where GridDID is a Rucio data indentifier which includes scope and name.
  • In Sample block: NtupleFile has to be the same as Sample name

An example TRExFitter configuration can be found here.

N.B. Tenary operation is not supported yet

Delivery of slimmed/skimmed ROOT ntuples

The library can be loaded by the following command

from servicex_for_trexfitter import ServiceXTRExFitter

and then an instance can be created with an argument of TRExFitter configuration file.

sx_trex = ServiceXTRExFitter('<TRExFitter configuration file>')

Now you are ready to make a delivery request.

sx_trex.get_ntuples()

It will initiate ServiceX transformation(s) based on your TRExFitter configuration, and deliver ROOT ntuples that are effectively slimmed and skimmed.

Prepare histograms from delivered ROOT ntuples

  • You need to checkout the branch feat/servicex-integration of TRExFitter framework to be compatible with the servicex-for-trexfitter.
  • Now you can run TRExFitter action n to generate histograms from the ServiceX delivered ROOT ntuples.

Acknowledgements

Support for this work was provided by the the U.S. Department of Energy, Office of High Energy Physics under Grant No. DE-SC0007890

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

servicex_for_trexfitter-0.8.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servicex_for_trexfitter-0.8.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file servicex_for_trexfitter-0.8.1.tar.gz.

File metadata

  • Download URL: servicex_for_trexfitter-0.8.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.4

File hashes

Hashes for servicex_for_trexfitter-0.8.1.tar.gz
Algorithm Hash digest
SHA256 256f8243d7ba9d92a8185b64ca78380bf85a497bb9b6dc09587f30f2d1773ab8
MD5 687dd772c988126849ea40ccb61f76e2
BLAKE2b-256 af42710a1cf418027b8f3929a771e55f70b8f7281d2367f730ee2c2fb2365009

See more details on using hashes here.

File details

Details for the file servicex_for_trexfitter-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: servicex_for_trexfitter-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.4

File hashes

Hashes for servicex_for_trexfitter-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b022490bf215dd6c5feb0573fd3d0bae19bec023ec87dc92d066cc5540772d35
MD5 e4e8a2acfdae88d253e244f66a63d897
BLAKE2b-256 bb2628546417d944446bc52ebc4c9d5cbf9ef5d8b61772ba8e2a9d1ac427762f

See more details on using hashes here.

Supported by

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