Git Product home page Git Product logo

generative-dnn-for-physics-simulations-cern's Introduction

Generative DNN for Physics Simulations CERN

Table of contents

  1. Setting Developing Environment
  2. Producing data for tests
    1. Original files
    2. Data filtering

Setting Developing Environment

In order to run all experiments and analysis jupyter notebooks, it is necessary to install the following tools:
Download version for your operating system.

  1. Python 3.9.16 download
  2. Install CUDA:
    Note, for your system to actually use the GPU, it nust have a Compute Capibility >= to 3.0
    Install CUDA 11.7 for your OS
    1. CUDA Toolkit 11.7 Downloads
    • Windows:
      double-click the executable and follow setup instructions
    • Linux:
      follow the instructions here
    1. Download cuDNN v8.9.6 (November 1st, 2023), for CUDA 11.x
  3. Install python pip modules from requirements.txt using command: pip install -r requirements.txt

After the above setup it should be possible to run the scripts.

Producing data for tests

In order to run all experiments, it is necessary to build datasets from original files.

Necessary data to run the experiments are the following:

  • dataset with 9 conditional variables describing the: Mass, Energy, Charge, 3 vectors for momenta and 3 vectors for coordinates
  • dataset with images originating from Proton ZDC device
  • dataset with images originating from Neutron ZDC device

Original files

Original files were generated by the GEANT4. Instructions on how to generate data are available in here.
The below files explain the order of steps that need to be performed to run the experiments.

Data filtering

The notebook data_filtering.ipynb contains the initial preprocessing and filtering needed for training. It allows you to:

  • calculates the photon sum values for images from Proton and Neutron ZDC devices.
  • filter the data according to the photon sum values using function filter_photon_sum().
    This allows you to create datasets to replicate the results in the thesis.
  • preprocess the data for the joint model, referred to as padded dataset.
    This step adds padding to both images from Proton and Neutron ZDC and concatenates them create image with 2 channels.
  • plot the distribution of photon values
  • calculate quartile values of photon sum distribution

After the following steps you should have the following files:

  • data_cond_photonsum_proton_X_2312.pkl
  • data_photonsum_proton_X_2312.pkl
  • data_proton_neutron_photonsum_proton_18_1970_neutron_18_3249_padding.pkl
  • data_cond_photonsum_p_18_n_18.pkl

Where X denotes the minimal value for the photon sum value.

Calculating diversity among the samples from SDI-GAN implementation

The notebook calculating_diversity_for_data.ipynb contains the preprocessing of dataset to calculate diversity of samples explained in Section 8. of the thesis.
You need to use files generated by above script. This is appropriate for both images coming from Proton ZDC device and Padded version of dataset.
After completing the steps you should have the following files:

  • data_cond_stddev_photonsum_p_X.pkl. Where X denotes the minimal value for the photon sum value in proton data
  • data_cond_stddev_photonsum_p_X_n_X.pkl. Where X denotes the minimal value for the photon sum value in both proton and neutron data.

Calculating data for auxiliary regressor

The notebook calculate_max_coordinates.ipynb contains calclation of min max coordinates in images for both Proton and padded dataset.

After completing the steps you should have the following files:

  • data_coord_proton_photonsum_proton_1_2312.pkl. Where X denotes the minimal value for the photon sum value in proton data
  • data_coord_proton_neutron_photonsum_X.pkl. Where X denotes the minimal value for the photon sum value in both proton and neutron data.

generative-dnn-for-physics-simulations-cern's People

Contributors

patrick-bedkowski avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.