Skip to main content

Python package for automatic, cell-based inference of clash-free simplified detector geometry.

Project description

Logo

Release Build status codecov Commit activity License DOI

Welcome to pyGeoSimplify!

Download pyGeoSimplify

pip install pygeosimplify

Quick Start

import pygeosimplify as pgs
from pygeosimplify.simplify.layer import GeoLayer
from pygeosimplify.simplify.detector import SimplifiedDetector

# Set names of branches that specify coordinate system of cells
pgs.set_coordinate_branch("XYZ", "isXYZ")
pgs.set_coordinate_branch("EtaPhiR", "isEtaPhiR")
pgs.set_coordinate_branch("EtaPhiZ", "isEtaPhiZ")
pgs.set_coordinate_branch("RPhiZ", "isRPhiZ")

# Load geometry
geo = pgs.load_geometry("DetectorCells.root", tree_name='treeName')

# Create simplified detector
detector = SimplifiedDetector()

# Add dector layers to detector
n_layer = max(geo.layer) + 1
for i_layer in range(0, n_layer):
	layer = GeoLayer(geo, layer_idx = i_layer, thinned_layer_width = 1)
	detector.add_layer(layer)

# Process detector
detector.process()

# Save simplified detector to gdml file
detector.save_to_gdml(cyl_type='processed', output_path='processed.gdml')

LICENSE

pyGeoSimplify is free of use and open-source. All versions are published under the MIT License.

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

pygeosimplify-0.0.18.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

pygeosimplify-0.0.18-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file pygeosimplify-0.0.18.tar.gz.

File metadata

  • Download URL: pygeosimplify-0.0.18.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for pygeosimplify-0.0.18.tar.gz
Algorithm Hash digest
SHA256 04483252d58c41ce8d365dccb6d3b5c63b44e971c08ab77cae2fa1086ae36060
MD5 a08ef908623e0868e768e5a767431368
BLAKE2b-256 3792ee1f03351bfd6605dbecd9c832e86a008c8826a503d84c5b98f1368f8b0c

See more details on using hashes here.

File details

Details for the file pygeosimplify-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: pygeosimplify-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for pygeosimplify-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 53ac2979defda84688084575ec30a86d92a27a16e85971dbcac3ec24bf409a6d
MD5 59cb63b60fcd462fad381fd45d26b509
BLAKE2b-256 fcf5ee5d4d96d6887c84c1d68a0d03934f504178e1a1defcfb261f9f1349a9de

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