No project description provided
Project description
atlas-mc-scanner
Table of Contents
Usage
Prerequisites:
- Install the package manager
uvon your machine. - Get a
servicex.yamlfile in your home directory.- As of this writing the UChicago instructions are slightly out of date. After clicking the
sign-inlink at the top of the UChicagoservicexpage, look for theATLASbutton. Click that and use your usual CERN sign-on.
- As of this writing the UChicago instructions are slightly out of date. After clicking the
The package manager uv enables a fast download and isolated install of simple utilities - and it means you don't have to pay attention to dependencies or anything else.
Running:
Here is the help you get back:
PS C:\Users\gordo> uvx atlas-mc-scanner --help
Installed 82 packages in 1.25s
Usage: atlas-mc-scanner [OPTIONS] COMMAND [ARGS]...
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ particles Dump particles in the dataset. │
│ decays print out decay frequency for a particular particle │
│ find-containers List containers that likely contain TruthParticles. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Here is an example of a list of particle decays in the default container TruthBSMWithDecayParticles:
PS C:\Users\gordo> uvx atlas-mc-scanner particles mc23_13p6TeV:mc23_13p6TeV.561231.MGPy8EG_A14N23LO_HAHM_ggHZdZd_mumu_600_0p005.deriv.DAOD_LLP1.e8577_e8528_a934_s4370_r16083_r15970_p6619_tid42970882_00
╒══════════╤══════════════╤═════════╤═══════════════════╤═══════════════════╤═══════════════════╕
│ PDG ID │ Name │ Count │ Avg Count/Event │ Max Count/Event │ Min Count/Event │
╞══════════╪══════════════╪═════════╪═══════════════════╪═══════════════════╪═══════════════════╡
│ 13 │ mu- │ 45622 │ 4.5622 │ 6 │ 2 │
├──────────┼──────────────┼─────────┼───────────────────┼───────────────────┼───────────────────┤
│ 32 │ Unknown (32) │ 20000 │ 2 │ 2 │ 2 │
├──────────┼──────────────┼─────────┼───────────────────┼───────────────────┼───────────────────┤
│ 22 │ gamma │ 2825 │ 0.2825 │ 7 │ 0 │
├──────────┼──────────────┼─────────┼───────────────────┼───────────────────┼───────────────────┤
│ 11 │ e- │ 25 │ 0.0025 │ 4 │ 0 │
╘══════════╧══════════════╧═════════╧═══════════════════╧═══════════════════╧═══════════════════╛
And looking at the decay products:
$ atlas-mc-scanner decays mc23_13p6TeV:mc23_13p6TeV.561231.MGPy8EG_A14N23LO_HAHM_ggHZdZd_mumu_600_0p005.deriv.DAOD_LLP1.e8577_e8528_a934_s4370_r16083_r15970_p6619_tid42970882_00 13
╒═══════════════════════════╤═══════════════╤═════════════╤════════════╕
│ Decay Products (PDGIDs) │ Decay Names │ Frequency │ Fraction │
╞═══════════════════════════╪═══════════════╪═════════════╪════════════╡
│ [13, 22] │ mu- + gamma │ 1438 │ 40.66% │
├───────────────────────────┼───────────────┼─────────────┼────────────┤
│ [13] │ mu- │ 1373 │ 38.82% │
├───────────────────────────┼───────────────┼─────────────┼────────────┤
│ No Decay Products │ │ 726 │ 20.53% │
╘═══════════════════════════╧═══════════════╧═════════════╧════════════╛
The ATLAS decay model is complex:
- If the Decay Products column contains
No Decay Products, that means a decay vertex was found in theTruthParticle, but it had decay products. - If the Decay Products column contains
Stable, that means no decay vertex was found.
Notes on uv:
uvxwon't updateatlas-mc-scannerunless explicitly told. If you think there is a new version released, please douvx atlas-mc-scanner @latest --helpto make sure you have the most recently released.- If you want
atlas-mc-scannerto be available directly from your command line, then you can douv tool install atlas-mc-scanner. After that, you should be able to just typeatlas-mc-scannerdirectly withoutuvx. To upgrade it to the latest version douv tool upgrade atlas-mc-scanner.
Commands
- Use the
particlessub-command to list a container of truth particles - Use the
decayssub-command to list the decays of a particular particle - Use the
find-containerssub-command to list all containers in the file that containsTruthParticles. Note this uses heuristics, so it might not be 100% correct.
All datasets are assumed to be rucio, though you can specify a https://xxx for a file if you like. Obviously, they must be a file in the xAOD format! This code uses the EventLoop C++ framework, run on ServiceX to extract the information.
Errors
Some common errors you might see.
Missing servicex.yaml file
The error message when you run is fairly straight forward. The servicex.yaml file (or .servicex) must exist in your home directory or in the current working directory.
Your dataset does not exist
This is a known bug. There are two hints. First, the Transform status update will be red rather than green. Second, you'll have a stack dump that ends with the message IndexError: list index out of range.
Bad container name
You will get the same stack-dump as with the data set not existing (the list index out of range), and scroll up and look at the top of the crash and look for Transform "atlas-mc-scanner" completed with failures: 1/1. Below that will be a huge URL which points to the monitoring (it is the seocond URL in the dump). From there look for an ERROR and click on the second column to expand that error entry. There, under logBody you can see the complete output from the EventLoop job. Near the bottom you'll finally find the familiar errors:
xAOD::TEvent::connectB... WARNING No metadata available for branch: forkitover
xAOD::TEvent::connectB... WARNING Branch "forkitover" not available on input
xAOD::TEvent::retrieve WARNING Couldn't (const) retrieve "DataVector<xAOD::TruthParticle_v1>/forkitover"
AnalysisAlg ERROR /home/atlas/rel/source/analysis/Root/query.cxx:73 (virtual StatusCode query::execute()): Failed to call "evtStore()->retrieve(result, "forkitover")"
Installation
pip install atlas-mc-scanner
License
atlas-mc-scanner is distributed under the terms of the MIT license.
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 atlas_mc_scanner-1.0.1.tar.gz.
File metadata
- Download URL: atlas_mc_scanner-1.0.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42e19a8b5d45e20ce8cbc5719e9141e2ec3bce9f785bfab89501286714476225
|
|
| MD5 |
f76b15cefe57bf86ad01ecc98fe28d62
|
|
| BLAKE2b-256 |
60a73c4a83c82716f34d72c17a9f9f92ee580cfcb975fcb003f74b4f9ea44ae9
|
Provenance
The following attestation bundles were made for atlas_mc_scanner-1.0.1.tar.gz:
Publisher:
publish-to-pypi.yaml on gordonwatts/atlas-mc-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_mc_scanner-1.0.1.tar.gz -
Subject digest:
42e19a8b5d45e20ce8cbc5719e9141e2ec3bce9f785bfab89501286714476225 - Sigstore transparency entry: 264665540
- Sigstore integration time:
-
Permalink:
gordonwatts/atlas-mc-scanner@aeaae315c53607edc9e66dfbdb3612e97b80dae0 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/gordonwatts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@aeaae315c53607edc9e66dfbdb3612e97b80dae0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_mc_scanner-1.0.1-py3-none-any.whl.
File metadata
- Download URL: atlas_mc_scanner-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
956f8bb306a05f34e604e46ce199ec6d71ffacb104c9e66fe9624acfdb44e32d
|
|
| MD5 |
52c67890b75b668f01afb74b056ca325
|
|
| BLAKE2b-256 |
40ca310ee5a41e60a869d0ff93106c6ddc83baf8b2c0c00225a5698d5734125c
|
Provenance
The following attestation bundles were made for atlas_mc_scanner-1.0.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on gordonwatts/atlas-mc-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_mc_scanner-1.0.1-py3-none-any.whl -
Subject digest:
956f8bb306a05f34e604e46ce199ec6d71ffacb104c9e66fe9624acfdb44e32d - Sigstore transparency entry: 264665543
- Sigstore integration time:
-
Permalink:
gordonwatts/atlas-mc-scanner@aeaae315c53607edc9e66dfbdb3612e97b80dae0 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/gordonwatts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@aeaae315c53607edc9e66dfbdb3612e97b80dae0 -
Trigger Event:
push
-
Statement type: