Python package for automatic, cell-based inference of clash-free simplified detector geometry.
Project description
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
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
pygeosimplify-0.0.19.tar.gz
(22.8 kB
view details)
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 pygeosimplify-0.0.19.tar.gz.
File metadata
- Download URL: pygeosimplify-0.0.19.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.13 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fde02fa3683b73cfc89421ae97a2a07e19d99537f2045a38dcde07699855f4
|
|
| MD5 |
9a72b16e911c4b433a1f1353d59f70c7
|
|
| BLAKE2b-256 |
99d00b80273b4aaad7c42f7acc76b14af9cc22304047124882f0166088622562
|
File details
Details for the file pygeosimplify-0.0.19-py3-none-any.whl.
File metadata
- Download URL: pygeosimplify-0.0.19-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.13 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f5aa2c04fd60011d10453c7b63c1a0cabb16748c698185563a97a1d4acf2912
|
|
| MD5 |
6772d230e34d7f3ba4416d2cb7c2cc73
|
|
| BLAKE2b-256 |
3ac597719786aa82a109cd830ae2330641f916d62c72efaf00246a7bc53c7d6a
|