A simple evaluation tool for particle tracking
Project description
OneTrack
A simple library for evaluation of particle track reconstruction.
Alpha Version!
This library is in a very early stage of development. It is only for testing with a narrow set of Pytorch Geometric data types. It is not recommended for production use.
Install
conda create --name onetrack python=3.9
pip install onetrack
Example Usage
from onetrack import TrackingData
from onetrack.file_utils import list_files
- Load in files
file_list = list_files(os.path.join(config["graph_input_dir"], "train"))[:100]
- Create a TrackingData object
tracking_data = TrackingData(file_list)
Currently, the only supported file configuration is as follows:
a) file_list contains a list of pickled Pytorch Geometric Data objects
b) Each Data object contains:
- a list of edges in
edge_index, - a list of edge
scores, - a list of hit IDs
hidthat can be used to map the nodes used inedge_indexback to the original hits in the event - a string
event_filethat can be used to load the original event files - at least a truth tensor called
y, and possibly more truth tensors with the formaty_{truth definition}
c) The event files are assumed to be of the format:
{event_file}-particles.csvand{event_file}-truth.csv- The
-particlesfile should contain at leastparticle_idandptcolumns - The
-truthfile should contain at leastparticle_idandhit_idcolumns
Better compatibility is coming ASAP!
- Run a sanity check by building track candidates with the truth
tracking_data.build_candidates(building_method="CC", sanity_check=True)
- Evaluate this sanity check
tracking_data.evaluate_candidates(evaluation_method="matching")
tracking_data.plot_evaluation()
If all has worked, we should get very good efficiency and fake rates. We can then play around with candidate building (with sanity_check=False), and evaluating with different matching configurations:
matching_config = {
"min_hits_truth": 9,
"min_hits_reco": 5,
"frac_reco_matched": 0.5,
"frac_truth_matched": 0.5,
}
tracking_data.evaluate_candidates(evaluation_method="matching", **matching_config)
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 onetrack-0.0.1.tar.gz.
File metadata
- Download URL: onetrack-0.0.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee21f60277ee0cd4a4c16783f37cc0acd44af2c833723d6bb65b8c40e392a013
|
|
| MD5 |
7e73e4708c36cce91f1e433bb20f0955
|
|
| BLAKE2b-256 |
f473d4d3689c46eb9ca546429af60fda1dbe16cf7dbcef47c6f25b7bcb44acc7
|
File details
Details for the file onetrack-0.0.1-py3-none-any.whl.
File metadata
- Download URL: onetrack-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
359b75a87c5a6fc2acdfccbf9a1de4d8bae257b74804cd3b13d6715d9208753c
|
|
| MD5 |
a32fd3142df1b9d0be4604ba95260ac7
|
|
| BLAKE2b-256 |
fe10329a36df454485de29413802cb91ff857a5a9d61827db5eb1aca1661271f
|