Skip to content

Draft: Fixed GAN Calo Example

Michal Mazurek requested to merge mimazure-fixed-gan-calo-example into master

@gcorti @kreps @adavis

This MR adds the first implementation of GANs used in fast simulation and is mostly dedicated to benchmarking the infrastructure. We create here a very simple GAN with PyTorch where we fix all the elements in the tensor in the output in order to have deterministic output from the neural network when testing fast simulations.

Example of the output from neural network as seen by Gaussino:

ToolSvc.FastCal...SUCCESS [ Worker #0 ] Elements of the GAN grid: 
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |

An example & tutorial can be accessed here https://gitlab.cern.ch/mimazure/gausstrainingsample/-/blob/fixed-GAN-CALO-example-in-Gaussino/fixed_gan_model_description.ipynb

Examples

In the following events output from the notebook given above is given. The neural network generates a grid of 8 x 8 fast hits, centered at the point where the particle passes through the calorimeter.

fixed_gan_calo_examples

fixed_gan_calo_examples_2

Edited by Michal Mazurek

Merge request reports