Skip to main content

Utilities needed for analysis productions in LHCb

Project description

ap_utilities

This project holds code needed to transform the AP used by the RD group into something that makes ntuples with MVA HLT triggers. For documentation specific to MVA lines of the RD group, check this

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 :
  - '12425000'
  - '12425011'
  - '12123445'
  - '11124037'
  - '12153420'

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:

  1. Access to DIRAC.
  2. 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

validata_ap_tuples -p PIPELINE -f ntuple_scheme.yaml

where PIPELINE is the pipeline number, needed to find the ROOT files in EOS. -f passes the file with the description of what is expected to be found, for example:

# -----------------------------------------
# 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

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

ap_utilities-0.0.7.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

ap_utilities-0.0.7-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file ap_utilities-0.0.7.tar.gz.

File metadata

  • Download URL: ap_utilities-0.0.7.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ap_utilities-0.0.7.tar.gz
Algorithm Hash digest
SHA256 2bed629cf56ac3a46f276d59b1f66bbe45e74265c82b81017544cb114051902b
MD5 3623922721431682a26ff1372e87274f
BLAKE2b-256 84f010ff14e9e03e4a16c2f1df93dc357c8b6c93009a4592a7024bec2afc040f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ap_utilities-0.0.7.tar.gz:

Publisher: publish.yaml on acampove/ap_utilities

Attestations:

File details

Details for the file ap_utilities-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: ap_utilities-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ap_utilities-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cd0dbb1c99a7c1f4b29445a616d2eaf4a2f72a4ed723ed8c1c669d5760e675b0
MD5 f0db0b46e80cda0145030e1d6de9cfce
BLAKE2b-256 6891c7f5af05c16f14494afca71261affe9a535bcbc1db43e959a6858a7f514d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ap_utilities-0.0.7-py3-none-any.whl:

Publisher: publish.yaml on acampove/ap_utilities

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page