Skip to main content

$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.

Usage

For local tests one can use apply_selection as in:

apply_selection -d /home/acampove/Data/rx_samples/v1/post_ap -s data_24_magdown_24c2 -r q2 bdt -q central -t Hlt2RD_B0ToKpPimMuMu -p RK -i 0 -n 900

where:

usage: apply_selection [-h] -i IPART -n NPART -d IPATH -s SAMPLE -p PROJECT -q Q2BIN -t HLT2 [-c CUTVER] [-r REMOVE [REMOVE ...]]

Script used to apply selection and produce samples for Run 3

options:
  -h, --help            show this help message and exit
  -i IPART, --ipart IPART
                        Part to process
  -n NPART, --npart NPART
                        Total number of parts
  -d IPATH, --ipath IPATH
                        Path to directory with subdirectories with samples
  -s SAMPLE, --sample SAMPLE
                        Name of sample to process, e.g. data_24_magdown_24c2
  -p PROJECT, --project PROJECT
                        Name of project, e.g RK, RKstr
  -q Q2BIN, --q2bin Q2BIN
                        q2 bin, e.g. central
  -t HLT2, --hlt2 HLT2  Name of HLT2 trigger, e.g. Hlt2RD_B0ToKpPimMuMu
  -c CUTVER, --cutver CUTVER
                        Version of selection, by default, latest
  -r REMOVE [REMOVE ...], --remove REMOVE [REMOVE ...]
                        List of cuts to remove from the full selection

In the cluster, one will need a dedicated directory for the log files, this is specified by exporting the variable $JOBDIR, i.e.:

export JOBDIR=/path/to/place/here/log/files/are

Different institutes will have different mechanisms to submit jobs (i.e. HTCondor, Slurm, Torque...). Thus, different submission scripts are needed and each institute will have to write the corresponding script.

To support more sites, one should:

  • Write a job_sel_xxx script.
  • Add it to pyproject.toml
  • Document its usage.
  • Open a merge request.

For IHEP, in China, this script is job_sel_ihep and it's documented below.

For IHEP

Run:

job_sel_ihep -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_JpsiK_mm_eq_DPC -q central -t Hlt2RD_BuToKpMuMu_MVA -p RK -n 1000 -r q2-bdt

which will apply the selection by:

  • Picking up the data found in /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap
  • Applying the selection on the sample Bu_JpsiK_mm_eq_DPC
  • For the HLT2 trigger Hlt2RD_BuToKpMuMu_MVA
  • For the project RK
  • Using 1000 jobs
  • Skipping the q2 and bdt cuts.

The options are:

Script used to setup mamba environment and run apply_selection script

-d: Path to directory containing directory samples
-s: Name of the sample (subdirectory) to run over
-r: String with dash separated cuts to remove, e.g. q2-bdt, optional
-q: q2 bin, e.g. central
-t: HLT2 trigger, e.g Hlt2RD_B0ToKpPimEE
-p: Project, e.g. RK
-n: Number of parts into which selection is split, e.g. 100
-T: Will run a test with the first job (default) or will submit all the jobs
-Q: Queue, e.g. test (5m), short (30m), mid (10h), by default short

by default, it will run a test job.

Job list

Given the large number of samples to process a utility was created to provide the list of commands, i.e. a list like:

job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kee_eq_btosllball05_DPC   -q central -t Hlt2RD_BuToKpEE_MVA   -p RK -n 10 -r q2-bdt
job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kee_eq_btosllball05_DPC   -q central -t SpruceRD_BuToHpEE     -p RK -n 10 -r q2-bdt
job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kee_eq_btosllball_DPC     -q central -t Hlt2RD_BuToKpEE_MVA   -p RK -n 10 -r q2-bdt
job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kee_eq_btosllball_DPC     -q central -t SpruceRD_BuToHpEE     -p RK -n 10 -r q2-bdt
job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kmumu_eq_btosllball05_DPC -q central -t Hlt2RD_BuToKpMuMu_MVA -p RK -n 10 -r q2-bdt
job_sel_ihep -T 0 -d /publicfs/ucas/user/campoverde/Data/RX_run3/v1/post_ap -s Bu_Kmumu_eq_btosllball05_DPC -q central -t SpruceRD_BuToHpMuMu   -p RK -n 20 -r q2-bdt

Run the following:

make_jobs_list -v v1

which for the version v1 of the post_ap ntuples, will automatically:

  • Find which samples exist and for which triggers
  • Assign a number of jobs for each of these samples, based on the number of entries

Some samples, with too few entries, will be skipped altogether. This is expected to take time, given that, in order to calculate the number of events, each file needs to be opened.

Metadata

Release files for rx-selection 0.1.8

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.8
File Size Uploaded Provenance Actions
rx_selection-0.1.8.tar.gz 36.2 kB With provenance Details for rx_selection-0.1.8.tar.gz

Built distribution (wheel)

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

Total release size: 77.7 kB

Release files / rx_selection-0.1.8.tar.gz

Download URL rx_selection-0.1.8.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3ef1cbfcabaa84d5dffcf876762c82ebe88ea2bcaf1a1dd229f91b41d21b1ca4
BLAKE2b-256 checksum
How to use checksums
110f56ae2cd4af530285d3815fef885e5e1d2c9d38b04759f602f6324f6e3048
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Jan 30, 2025.

Transparency log

Release files / rx_selection-0.1.8-py3-none-any.whl

Download URL rx_selection-0.1.8-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d99b0b9ff567b7ac1dc624015c41209cbf5c67851fae8af9c3fa1c8896c6762a
BLAKE2b-256 checksum
How to use checksums
5c726d49ff93bbb3f2fe30b0988dc621808b7a2c62170163efb2afdb32920ee6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Jan 30, 2025.

Transparency log

Security for rx-selection 0.1.8

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.8.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 Jan 30, 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