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.2.tar.gz (12.0 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.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file onetrack-0.0.2.tar.gz.

File metadata

  • Download URL: onetrack-0.0.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for onetrack-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3a25567bbdbefa4694cca548a1dedf310b1caf36c7aa0f91fb865b839f3e1d80
MD5 124c0e7aeb8806de22ed5e92dfbb3b1c
BLAKE2b-256 e61e8ceec0a6ad8d729f90aabec66612139558dea5f138a96d46e9e9704ccd7c

See more details on using hashes here.

File details

Details for the file onetrack-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: onetrack-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for onetrack-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8823449a966f269010263674c3a95be39b4b0037d32ecaf024e6471abb4bb380
MD5 4ed8eb860088407758488b3acf98ac7e
BLAKE2b-256 663c43fa2769360902b8eec9a8666cb2f885c5cebde87786894faeb3352867a6

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