Skip to content

Latest commit

 

History

History

README.md

GaudiTutorials for DRD6

This repository hosts tutorials for using the Gaudi software as part of the larger key4hep ecosystem.

It contains hands-on exercises to get familiar with Gaudi steering files and algorithms. To experiment with the tutorial, you can follow this presentation at the 4th DRD-Calo Collaboration Meeting, which covers the EventStats, RandomNoiseDigitizer, and MoliereRadius exercises.

This README contains a short description for each of the hosted exercises. The exercises run on data that has been created with with the simplecalo calorimeter from the DD4hepTutorials exercises. An example data file will be downloaded automatically when compiling the repository.

Compilation

This directory is a standalone CMake project, so only the Gaudi tutorials can be built. On an AlmaLinux 9 machine with /cvmfs mounted, run the following from this directory (or from the root of a standalone GaudiTutorial checkout):

source /cvmfs/sw.hsf.org/key4hep/setup.sh
k4_local_repo
mkdir build install
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install
make install -j6

Run k4_local_repo again from this directory in every new shell.

EventStats

The goal of this exercise is to become familiar with the Gaudi steering file. For this purpose, an EventStats algorithm is provided, which saves the energy barycentre and total energy for each event using the podio::UserDataCollection.

You should adapt the steering file runEventStats.py in the `EventStats/options' folder such that this algorithm is executed on the data. A solution file is provided.

RandomNoiseDigitizer

The goal of this exercise is to complete a simple digitising algorithm from a skeleton file.

MoliereRadius

The goal of this exercise is to complete a Gaudi algorithm to compute a physics value from the data, and to revise adding algorithms to the steering file. Solution files are provided.

MLShowerID

A Gaudi processor for implementing a Tiny PointNet ONNX inference on SimpleCalo showers.

The model is trainned on top 1024 hits ordered by decreasing energy. Those hits are treated as point cloud, with dim-4 features (x, y, z, energy). After this classification model, two scores are returned: EM score and hadronic score.

The trained ONNX model is loaded once during algorithm initialization. Based on the training setup, its expected interface is:

points: float32 [batch, 1024, 4]
mask:   bool    [batch, 1024]
scores: float32 [batch, 2]

The processing flow is:

SimCalorimeterHitCollection
  -> raw (x, y, z, energy) point tensor and validity mask
  -> ONNX model with embedded training normalization
  -> ONNX softmax scores [EM, Hadronic]
  -> one output Cluster containing all converted CalorimeterHits

Two scores are stored in the shape parameters: ShapeParameters[0] as EM score, ShapeParameters[1] as hadronic score.