Skip to main content

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
  1. Load in files
file_list = list_files(os.path.join(config["graph_input_dir"], "train"))[:100]
  1. 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 hid that can be used to map the nodes used in edge_index back to the original hits in the event
  • a string event_file that can be used to load the original event files
  • at least a truth tensor called y, and possibly more truth tensors with the format y_{truth definition}

c) The event files are assumed to be of the format:

  • {event_file}-particles.csv and {event_file}-truth.csv
  • The -particles file should contain at least particle_id and pt columns
  • The -truth file should contain at least particle_id and hit_id columns

Better compatibility is coming ASAP!

  1. Run a sanity check by building track candidates with the truth
tracking_data.build_candidates(building_method="CC", sanity_check=True)
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onetrack-0.0.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onetrack-0.0.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

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

Hashes for onetrack-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ee21f60277ee0cd4a4c16783f37cc0acd44af2c833723d6bb65b8c40e392a013
MD5 7e73e4708c36cce91f1e433bb20f0955
BLAKE2b-256 f473d4d3689c46eb9ca546429af60fda1dbe16cf7dbcef47c6f25b7bcb44acc7

See more details on using hashes here.

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

Hashes for onetrack-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 359b75a87c5a6fc2acdfccbf9a1de4d8bae257b74804cd3b13d6715d9208753c
MD5 a32fd3142df1b9d0be4604ba95260ac7
BLAKE2b-256 fe10329a36df454485de29413802cb91ff857a5a9d61827db5eb1aca1661271f

See more details on using hashes here.

Supported by

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