A collection of tools for experimental high energy physics analysis.
Conda (recommend Mamba for performance)
Create an environment
mamba env create -f https://raw.githubusercontent.com/chuyuanliu/heptools/master/environment.yml
conda activate heptools-dev
Install without dependencies
pip install --no-dependencies git+https://github.com/chuyuanliu/heptools.git@master
Install all denpendencies with pip
pip install git+https://github.com/chuyuanliu/heptools.git@master
A docker image will be automatically built and pushed to docker hub when a new commit is pushed to master branch.
Run an ineractive shell with Singularity(Apptainer)
singularity exec -B .:/srv -B /cvmfs --pwd /srv ${HEPTOOLS_DOCKER_IMAGE} bash --init-file /entrypoint.sh
use image from docker hub
export HEPTOOLS_DOCKER_IMAGE="docker://chuyuanliu/heptools:latest"
use image from unpacked.cern.ch (recommended)
export HEPTOOLS_DOCKER_IMAGE="/cvmfs/unpacked.cern.ch/registry.hub.docker.com/chuyuanliu/heptools:latest"
Submit jobs to batch system with HTCondor
Create X.509 proxy. (stored in ${X509_USER_PROXY}
)
voms-proxy-init --rfc --voms cms -valid 192:00
Setup condor configuration. (stored in ${CONDOR_CONFIG}$
)
source <(curl -s https://raw.githubusercontent.com/chuyuanliu/heptools/master/tools/condor_config_lpc.sh) [<schedd_name>]
If <schedd_name>
is provided, the default SCHEDD_HOST will be replaced. (check schedd status condor_status -schedd
)
Start a container
singularity exec -B .:/srv -B /cvmfs -B /uscmst1b_scratch/lpc1 -B $(readlink ${HOME}/nobackup) --env "CONDOR_CONFIG=${CONDOR_CONFIG}" --pwd /srv ${HEPTOOLS_DOCKER_IMAGE} bash --init-file /entrypoint.sh
- To change singularity (apptainer) cache and temp dir
export APPTAINER_CACHEDIR="new/path/to/cache/"
export APPTAINER_TMPDIR="new/path/to/tmp/"
- To run ml container in wsl:
singularity exec -B .:/srv -B /run/shm --nvccli --pwd /srv ${HEPTOOLS_DOCKER_IMAGE} bash --init-file /entrypoint.sh
- check: use TYPE_CHECKING to avoid circular import, unused import
- add:hist utils
- rewrite: XSection
- doc
- comment
- unit test