Utilities needed for analysis productions in LHCb
Project description
ap_utilities
For documentation specific to MVA lines of the RD group, check this
Decay nicknames
Table with nicknames and event types
The following lines:
export DECPATH=/home/acampove/Packages/DecFiles
update_decinfo
will:
- Set the path to the DecFiles
root directory such that
update_decinfocan use it. - Read the event types and nicknames and save them to a YAML file
Accessing table
These nicknames can be accessed from python scripts with:
import ap_utilities.physics.utilities as aput
# To get exactly what was saved
literal = aput.read_decay_name(event_type=event_type, style='literal')
# To get representation with special symbols like "," or "-" replaced
safe_1 = aput.read_decay_name(event_type=event_type, style= 'safe_1')
Check for samples existence
Given a set of MC samples specified in a YAML file like:
settings:
year : 2024
mc_path : 2024.W31.34
polarity : MagUp
nu_path : Nu6.3
sim_vers : Sim10d
generator : Pythia8
ctags : sim10-2024.Q3.4-v1.3-mu100
dtags : dddb-20240427
event_type :
- '12113002'
- '12113004'
event_type_split_sim:
# These event types are associated with two samples and should be saved twice in the text file
- '11102202'
- '11102211'
run:
check_samples -i samples.yaml -n 6
to check if the samples exist using 6 threads (default is 1) and store them in samples_found.yaml
To run this one has to be in an environment with:
- Access to DIRAC.
- A valid grid token.
Validate outputs of pipelines
In order to do this:
Mount EOS in laptop
# install SSHF
...
# Check that it's installed
which sshfs
# Make directory to mount EOS
APDIR=/eos/lhcb/wg/dpa/wp2/ci/
sudo mkdir -p $APDIR
sudo chown $USER:$USER $APDIR
# Mount EOS
sshfs -o idmap=user USERNAME@lxplus.cern.ch:$MNT_DIR $MNT_DIR
Run Validation
# This project is in pip
pip install ap_utilities
validate_ap_tuples -p PIPELINE -f ntuple_scheme.yaml -t 5
where:
-l: Logging level, by default 20 (info), but it can be 10 (debug) or 30 (warning)
-t: Is the number of threads to use, if not passed, it will use one.
-p: Is the pipeline number, needed to find the ROOT files in EOS
-f: passes the file with the configuration
# -----------------------------------------
# Needed to find where files are in EOS
# -----------------------------------------
paths:
pipeline_dir : /eos/lhcb/wg/dpa/wp2/ci
analysis_dir : rd_ap_2024
# -----------------------------------------
# Each key corresponds to a MC sample, the value is a list of lines that must be found
# as a tree in the file. If any, then the sample is not signal for any of the HLT2 lines
# therefore no tree (equivalent to a line) is required to be made
# -----------------------------------------
samples:
# These is a sample without a dedicated trigger
Bu_K1ee_eq_DPC:
- any
# This is a sample with two triggers targetting it
Bd_Kpiee_eq_DPC:
- Hlt2RD_B0ToKpPimEE
- Hlt2RD_B0ToKpPimEE_MVA
a few examples of config files can be found here
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 ap_utilities-0.1.4.tar.gz.
File metadata
- Download URL: ap_utilities-0.1.4.tar.gz
- Upload date:
- Size: 88.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ad7045b93815315a220f03668559ef2cb739dc8610d7c9a8423e050f419a81
|
|
| MD5 |
5647e5b0622d4bf0f9d88b46e8b770ad
|
|
| BLAKE2b-256 |
572c2c24a6e818c21c58ff53ff0aec213e8a25ed721d4412400a3a06f52e5c18
|
Provenance
The following attestation bundles were made for ap_utilities-0.1.4.tar.gz:
Publisher:
publish.yaml on acampove/ap_utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ap_utilities-0.1.4.tar.gz -
Subject digest:
21ad7045b93815315a220f03668559ef2cb739dc8610d7c9a8423e050f419a81 - Sigstore transparency entry: 152161932
- Sigstore integration time:
-
Permalink:
acampove/ap_utilities@1951f26cda60c2f49d323e64be587517b80b9fdc -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/acampove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@1951f26cda60c2f49d323e64be587517b80b9fdc -
Trigger Event:
push
-
Statement type:
File details
Details for the file ap_utilities-0.1.4-py3-none-any.whl.
File metadata
- Download URL: ap_utilities-0.1.4-py3-none-any.whl
- Upload date:
- Size: 90.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192e083aa63b6b026a6b55d3e1169640336bb59fb30d257d475414120ef35f09
|
|
| MD5 |
cace2048d490d6bae29fa9e685b8c88d
|
|
| BLAKE2b-256 |
454d52895fb402cf3746a89eb8ed922d15a496216e2ca39df2ca13fe53552f3e
|
Provenance
The following attestation bundles were made for ap_utilities-0.1.4-py3-none-any.whl:
Publisher:
publish.yaml on acampove/ap_utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ap_utilities-0.1.4-py3-none-any.whl -
Subject digest:
192e083aa63b6b026a6b55d3e1169640336bb59fb30d257d475414120ef35f09 - Sigstore transparency entry: 152161934
- Sigstore integration time:
-
Permalink:
acampove/ap_utilities@1951f26cda60c2f49d323e64be587517b80b9fdc -
Branch / Tag:
refs/tags/0.1.4 - Owner: https://github.com/acampove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@1951f26cda60c2f49d323e64be587517b80b9fdc -
Trigger Event:
push
-
Statement type: