Skip to main content

Project used to apply selection to ntuples used for RX measurements filtered and skimmed by post_ap project

Project description

[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()

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

rx_selection-0.1.9.dev158.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

rx_selection-0.1.9.dev158-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file rx_selection-0.1.9.dev158.tar.gz.

File metadata

  • Download URL: rx_selection-0.1.9.dev158.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rx_selection-0.1.9.dev158.tar.gz
Algorithm Hash digest
SHA256 30622ad1e481137dd8379ef27c4168ce73dc2804dc698a5fa128c59dc42ca7a0
MD5 a55f092e96b35a29646bae94294b365c
BLAKE2b-256 3572c23b2a4febd5a0c12608e35f65ce7e25c2bbb55f0525f5761ea2eb5e4fae

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_selection-0.1.9.dev158.tar.gz:

Publisher: publish.yaml on RX-Run3/rx_selection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rx_selection-0.1.9.dev158-py3-none-any.whl.

File metadata

File hashes

Hashes for rx_selection-0.1.9.dev158-py3-none-any.whl
Algorithm Hash digest
SHA256 e797348121e28c6c83aab7ec7d8b88d959ba73d21178bc45d3bf065bdd222cec
MD5 d0d050b5baf7a2fc288a84cec39d2051
BLAKE2b-256 59f212caa29abe2bc0362118222e0d0884dc0b2eb244a9f2c1ba9b6169478e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_selection-0.1.9.dev158-py3-none-any.whl:

Publisher: publish.yaml on RX-Run3/rx_selection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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