Skip to main content
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:

$ pip install caloutils

Usage

First, the used calorimeter geometry needs to be selected:

import caloutils
caloutils.init_calorimeter("cc_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.voxel_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())

Release files for caloutils 0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caloutils 0.0.18
File Size Uploaded
caloutils-0.0.18.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caloutils 0.0.18
File Interpreter ABI Platform
caloutils-0.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 61.3 kB

Release files / caloutils-0.0.18.tar.gz

Download URL caloutils-0.0.18.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
25dd084dfec19a98fde80791837b46fe9e0eaa3b21abf8d9ba75c7d9ff5a4f1d
BLAKE2b-256 checksum
How to use checksums
160e63932ab66934f389f5b140eb434ec7789ce980d7d472f8c07d7bebd6930a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / caloutils-0.0.18-py3-none-any.whl

Download URL caloutils-0.0.18-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e3f0d1d61b6ddaf291fcf7a59713628b26eceff52f64472e9c43b2204d8c1b6
BLAKE2b-256 checksum
How to use checksums
c3f33b98d7e9fe5fa12e5969441593d589f7e4a53c3541982aa8a8ebb0068cd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.0.18 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page