Skip to main content

Metrics and tools for evaluation generative models for calorimeter shower based on pytorch_geometric.

Project description

https://img.shields.io/pypi/v/caloutils.svg Documentation Status

Metrics and tools for evaluation of generative models for calorimeter showers based on pytorch_geometric.

Summary

caloutils is a Python package built to simplify and streamline the handling, processing, and analysis of 4D point cloud data derived from calorimeter showers in high-energy physics experiments. The package includes a set of sophisticated tools to perform voxelization, energy response calculations, geometric feature extraction, and more. caloutils aims to simplify the complex analysis pipeline for calorimeter shower data, enabling researchers to efficiently extract meaningful insights. As this tool is based on Point Clouds, the provided metrics should apply to any calorimeter.

Description

4D Point Clouds

The 4D point cloud data handled by caloutils consists of three spatial coordinates and a fourth dimension representing the energy deposited at each point in the calorimeter. This multidimensional dataset captures a comprehensive view of particle showers, serving as a valuable resource in experimental physics.

Key Features

caloutils offers a comprehensive suite of functions and methods to analyze these 4D point clouds:

  • Voxelization: The package provides functionalities to convert raw, continuous point clouds into a to a voxel representation. This regular structure can simplifie subsequent analysis or machine learning tasks.

  • Energy Response Calculation: Calculate the detector response for a calorimeter shower by summing the hit energies and normalizing by the incoming energy of the particle.

  • Geometric Feature Extraction: The package offers tools to calculate geometric features such as the first principal component, spherical ratios, and more.

  • Data Transformation: caloutils can transform data from cylindrical to Cartesian coordinates, calculate pseudorapidity and azimuthal angle, and efficiently handle batch data operations.

Installation

You can easily install caloutils via pip: .. code-block:: console

$ pip install caloutils

Usage

First, the used calorimeter geometry needs to be selected: .. code-block:: python

from caloutils.calorimeter import Calorimeter Calorimeter.set_layout_calochallange_ds2()

For now only dataset 2 and 3 of the Calochallenge<https://github.com/CaloChallenge/homepage> are implemented

1. Convert Voxelized Data to Point Cloud

import caloutils
# Convert the point cloud data into a voxel representation.
batch = caloutils.processing.convert_to_pc(shower, energies)

batch is an instance of a PyTorch Geometric Batch object, storing the point cloud data

2. Data Transformation

Transform the cylindrical coordinates to Cartesian coordinates and add pseudorapidity and azimuthal angle:

batch_transformed = caloutils.batch_to_Exyz(batch)

These examples are meant to be illustrative and provide a quick understanding of the package usage. For a more comprehensive understanding of each function’s intricacies, users are recommended to refer to the full function documentation in the package.

3. Calculate High Level Variables

# Calculate the energy response of a batch of showers.
energy_response = caloutils.variables.energy_response(batch)
# Calculate the principal component of a batch of showers.
first_principal_component = caloutils.variables.fpc_from_batch(batch)
# Or, all at once, stored as attributes of the batch:
batch=caloutils.variables.calc_vars(batch)
print(batch.cyratio.mean())

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

caloutils-0.0.10.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

caloutils-0.0.10-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file caloutils-0.0.10.tar.gz.

File metadata

  • Download URL: caloutils-0.0.10.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for caloutils-0.0.10.tar.gz
Algorithm Hash digest
SHA256 24913ae8ff692a2f2ee280bf7644fe0332960621126ecd3d646277e50b539ef7
MD5 fedf02c9771f545801da99755a9adf8b
BLAKE2b-256 d1d3dd3ed1f598a2e9789381541058827da11cfb7fa9020055c50dafcda554ca

See more details on using hashes here.

File details

Details for the file caloutils-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: caloutils-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for caloutils-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e61ed829eebb3e352a7b19d0fe55889d50c2e56df6f9c4eecba4611d0421cb0d
MD5 7d3658473b73b2bb0afb253ca184a47c
BLAKE2b-256 84525fef85d3a41725482f6abbe22366b225160a6d9281f2d9eb7eff2d3634b5

See more details on using hashes here.

Supported by

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