Skip to main content

ATLAS Flavour Tagging Tools

Project description

Code style: black PyPI version codecov

ATLAS FTAG Python Tools

This is a collection of Python tools for working with files produced with the FTAG ntuple dumper. The code is intended to be used a library for other projects. Please see the example notebook for usage.

Quickstart

Installation

If you want to use this package without modification, you can install from pypi using pip.

pip install atlas-ftag-tools

To additionally install the development dependencies (for formatting and linting) rn

pip install atlas-ftag-tools[dev]

Development

If you plan on making changes to teh code, instead clone the repository and install the package from source in editable mode with

python -m pip install -e .

Include development dependencies with

python -m pip install -e ".[dev]"

You can set up pre-commit hooks with

pre-commit install

To run the tests you can use the pytest or coverage command, for example

coverage run --source ftag -m pytest --show-capture=stdout

Running coverage report will display the test coverage.

Usage

Create virtual file

This package contains a script to easily merge a set of H5 files. A virtual file is a fast and lightweight way to wrap a set of files. See the h5py documentation for more information on virtual datasets.

The script is vds.py and can be run after installing this package with

vds <pattern> <output path>

The <pattern> argument should be a quotes enclosed glob pattern, for example "dsid/path/*.h5"

See vds --help for more options and information.

Calculate WPs

This package contains a script to calculate tagger working points (WPs). The script is working_points.py and can be run after installing this package with

wps \
    --ttbar "path/to/ttbar/*.h5" \
    --tagger GN120220509 \
    --fx 0.1

Both the --tagger and --fx options accept a list if you want to get the WPs for multiple taggers.

If you want to use the ttbar WPs get the efficiencies and rejections for the zprime sample, you can add --zprime "path/to/zprime/*.h5" to the command. Note that a default selection of $p_T > 250 ~GeV$ to jets in the zprime sample.

If instead of defining the working points for a series of signal efficiencies, you wish to calculate a WP corresponding to a specific background rejection, the --rejection option can be given along with the desired background.

By default the working points are printed to the terminal, but you can save the results to a YAML file with the --outfile option.

See wps --help for more options and information.

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

atlas-ftag-tools-0.1.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

atlas_ftag_tools-0.1.3-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file atlas-ftag-tools-0.1.3.tar.gz.

File metadata

  • Download URL: atlas-ftag-tools-0.1.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for atlas-ftag-tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1b3eae965932b520fb50bbeb69423b0d64f6ae3b2612ed181cf43d9fc6a4cddd
MD5 84181aaaba383f2bf2c5c30b8d6cdb33
BLAKE2b-256 4636876af2fddfc45e0c2d6f6355d039ea680fce78e2cc7b875302577e3ea80e

See more details on using hashes here.

File details

Details for the file atlas_ftag_tools-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for atlas_ftag_tools-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea5d4683834329599bcdd11412ab8545ed513e198551e7a90a87a9678dc7617a
MD5 3bc0552aca0318f1985f20088caf3539
BLAKE2b-256 6933a9f86892da6b606e0d65de9b5deec93b72c1fa55e8ced1de853bdf0c11f1

See more details on using hashes here.

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