Skip to main content

Description of my package

Project description

ToyTrack

ToyTrack is a Python library for generating toy tracking events for particle physics.

The goal: To produce a "good-enough" event simulation, in as few lines as possible (currently 3 lines), as quickly as possible (currently 0.15 seconds for a 10,000-particle event).

Installation

Use the package manager pip to install ToyTrack.

pip install toytrack

Usage

from toytrack import ParticleGun, Detector, EventGenerator

# Initialize a particle gun which samples uniformly from pt between 10 and 20 GeV, 
# initial direction phi between -pi and pi, and creation vertex vx and vy between -0.1 and 0.1 cm
particle_gun = ParticleGun(dimension=2, pt=(10, 20), pphi=(-np.pi, np.pi), vx=(-0.1, 0.1), vy=(-0.1, 0.1))

# Initialize a detector
detector = Detector(dimension=2).add_from_template('barrel', min_radius=10, max_radius=100, number_of_layers=10)

# Initialize an event generator, which generates an event with a number of particles given by a normal
# distribution, with mean 10 and standard deviation 5
event = EventGenerator(particle_gun, detector, num_particles=(10, 5, 'normal')).generate_event()

# Access the particles and hits as needed
particles = event.particles
hits = event.hits

Example Event

Performance

ToyTrack is designed to be fast. The following benchmarks were performed on a 64-core AMD EPYC 7763 (Milan) CPU.

Scaling Study

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

toytrack-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

toytrack-0.1.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file toytrack-0.1.3.tar.gz.

File metadata

  • Download URL: toytrack-0.1.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for toytrack-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1d5ae79dd4497ea4da9678458473e13501e85d46c11fc8034a1aa6f83e559817
MD5 4b89e9810654128682ac00fd6c3258af
BLAKE2b-256 b3282c842cf1da0b8af4b1eb223b2c108c001367283440f37a52a40cb5ad63dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: toytrack-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for toytrack-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a079f7579d90fddf29ff0ed7c8b4093e75a372e111e24bb8e4445649cc834e71
MD5 09d0f9532cc0d5bf988ab66e90b693f9
BLAKE2b-256 261ce8a55683775d972c0cca118e4be8649d70c819988b15a93bb3ab6483e389

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