Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

[TOC]

$R_X$ selection

This project is meant to apply an offline selection to ntuples produced by post_ap and downloaded with rx_data. the selection is done with jobs sent to an HTCondor cluster.

How to pick up selection and apply it to data and MC

For this do:

from rx_selection import selection as sel

# trigger : HLT2 trigger, e.g. Hlt2RD_BuToKpEE_MVA 
# q2bin   : low, central, jpsi, psi2, high
# smeared : If true (default), the selection will use cuts on smeared masses. Only makes sense for electron MC samples
# process : 
#     One of the keys in https://gitlab.cern.ch/rx_run3/rx_data/-/blob/master/src/rx_data_lfns/rx/v7/rk_samples.yaml
#     DATA will do all the data combined

d_sel = sel.selection(trigger='Hlt2RD_BuToKpEE_MVA', q2bin='jpsi', process='DATA', smeared=True)

# You can override the selection here
for cut_name, cut_value in d_sel.items():
    rdf = rdf.Filter(cut_value, cut_name)

rep = rdf.Report()
# Here you cross check that the cuts were applied and see the statistics
rep.Print()

Overriding selection

The selection stored in the config files can be overriden with:

from rx_selection import selection as sel

with sel.custom_selection(d_sel = {'bdt' : 'mva_cmb > 0.1'}):
    run_function_that_uses_selection()

This will make sure that the bdt field:

  • Is added with a mva_cmb > 0.1 cut, if it does not exist
  • Is updated, if it exists

For run_function_that_uses_selection and outside that with section, the nominal the selection picked is the nominal.

Resetting overriding selection

In order to do tests of parts of the code with different selections, one would have to override the selection multiple times. This is not allowed, unless the selection is reset with:

from rx_selection import selection as sel

sel.reset_custom_selection()

Metadata

Release files for rx-selection 0.1.9.dev158

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rx-selection 0.1.9.dev158
File Size Uploaded Provenance Actions
rx_selection-0.1.9.dev158.tar.gz 14.6 kB With provenance Details for rx_selection-0.1.9.dev158.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rx-selection 0.1.9.dev158
File Interpreter ABI Platform Actions
rx_selection-0.1.9.dev158-py3-none-any.whl Python 3 none any Details for rx_selection-0.1.9.dev158-py3-none-any.whl

Total release size: 33.1 kB

Release files / rx_selection-0.1.9.dev158.tar.gz

Download URL rx_selection-0.1.9.dev158.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
30622ad1e481137dd8379ef27c4168ce73dc2804dc698a5fa128c59dc42ca7a0
BLAKE2b-256 checksum
How to use checksums
3572c23b2a4febd5a0c12608e35f65ce7e25c2bbb55f0525f5761ea2eb5e4fae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2025.

Transparency log

Release files / rx_selection-0.1.9.dev158-py3-none-any.whl

Download URL rx_selection-0.1.9.dev158-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e797348121e28c6c83aab7ec7d8b88d959ba73d21178bc45d3bf065bdd222cec
BLAKE2b-256 checksum
How to use checksums
59f212caa29abe2bc0362118222e0d0884dc0b2eb244a9f2c1ba9b6169478e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2025.

Transparency log

Security for rx-selection 0.1.9.dev158

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rx_selection-0.1.9.dev158.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page