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.1cut, 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rx_selection-0.1.9.dev172.tar.gz.
File metadata
- Download URL: rx_selection-0.1.9.dev172.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
696ae33271448b1f885a2d8e9783cca3defd10cbe95e54d62bf90e4145fcbf69
|
|
| MD5 |
234fb0dec3f4270cee7264e503c58008
|
|
| BLAKE2b-256 |
47f018fc4a7d18417b1813728d84bfde20017e04c00ea181319444517b621271
|
Provenance
The following attestation bundles were made for rx_selection-0.1.9.dev172.tar.gz:
Publisher:
publish.yaml on RX-Run3/rx_selection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rx_selection-0.1.9.dev172.tar.gz -
Subject digest:
696ae33271448b1f885a2d8e9783cca3defd10cbe95e54d62bf90e4145fcbf69 - Sigstore transparency entry: 345004426
- Sigstore integration time:
-
Permalink:
RX-Run3/rx_selection@c294e7f07cc39cdb336a1fbb2e640a50c0a5f170 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/RX-Run3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c294e7f07cc39cdb336a1fbb2e640a50c0a5f170 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rx_selection-0.1.9.dev172-py3-none-any.whl.
File metadata
- Download URL: rx_selection-0.1.9.dev172-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0b3317e2b8336998c476f183822fe69c0ef5c380f4705ca03f8d81ec811c541
|
|
| MD5 |
a1e1379b430d20ef7e9ed7e8609f05a2
|
|
| BLAKE2b-256 |
84d5032a38f785823c8d372797eebb40ec1c9929e7e2249a60ed081c077f8598
|
Provenance
The following attestation bundles were made for rx_selection-0.1.9.dev172-py3-none-any.whl:
Publisher:
publish.yaml on RX-Run3/rx_selection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rx_selection-0.1.9.dev172-py3-none-any.whl -
Subject digest:
f0b3317e2b8336998c476f183822fe69c0ef5c380f4705ca03f8d81ec811c541 - Sigstore transparency entry: 345004438
- Sigstore integration time:
-
Permalink:
RX-Run3/rx_selection@c294e7f07cc39cdb336a1fbb2e640a50c0a5f170 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/RX-Run3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c294e7f07cc39cdb336a1fbb2e640a50c0a5f170 -
Trigger Event:
push
-
Statement type: