REST-for-Physics Training School

Seminario Fisica Atomica, Nuclear y Molecular Facultad de Ciencias. C/ Pedro Cerbuna, 12

The REST-for-Physics (Rare Event Searches Toolkit) Framework is a collaborative software effort that provides common tools for acquisition, simulation, and data analysis of gaseous Time Projection Chambers (TPCs). REST-for-Physics was conceived at the University of Zaragoza and it is intensively used in academia by undergraduate, master and PhDs students for thesis preparation. It is also used for generic R&D, and it has been adopted by experiments like IAXO, TREX-DM or PandaX-III to assist on the data processing and storage of official experimental data.

This school will provide a general overview of the different capabilities of the framework through interactive sessions. During the course we will go through basic examples that will allow us to reproduce some of the common tasks performed during data processing, storage and analysis.

In order to be able to follow the course the participants are required to have a basic knowledge of programming languages, such as python or c, certain programming experience (having written your own pieces of code) is also highly recommended. REST-for-Physics is written in C++, and therefore having previous knowledge of the basic concepts of C++ is mandatory.

If you have previous coding experience in C or python, it will suffice to study the main C++ concepts at the following NIST C++ course for scientists.

REST-for-Physics uses ROOT and Geant4 packages. Previous knowledge of those packages is an advantage to take maximum profit from this course.

School exercises are available at :

  • Alfonso Yubero Navarro
  • Ana Quintana
  • Andrea Rubio
  • Angelica Bravo Bohorquez
  • asmaa aboulhorma
  • Carlos Pobes
  • Carmen Labiano
  • Cloé Girard-Carillo
  • Daniel Heuchel
  • Dhiraj Gupta
  • Dhruv Chouhan
  • Eduardo Martinez
  • Elisa Ruiz Chóliz
  • Francisco Rodríguez Candón
  • Itxaso Antolin
  • Iván Coarasa Casas
  • Jaime Apilluelo Allué
  • Jaime Ruz
  • Julia Vogel
  • María Jiménez
  • María Luisa Sarsa
  • Maykoll Reyes
  • Naroa Cubillas Murguia
  • Niranjan Jadhav
  • Susana Cebrian Guajardo
  • Susanna Wakely
  • Tamara Pardo
  • Theopisti Dafni
  • Tsering Dolma Gurung
  • Yikun Gu
  • Álvaro Ezquerro Sastre
    • 9:00 AM 1:30 PM
      Framework download and installation interactive session
      • 9:00 AM
        Installing Windows Subsystem for Linux 1h

        We will guide through the integration of a Linux system inside a Windows operative system in each participants laptop.

        If the students are using MacOs or Linux this step is not necessary.

        Speaker: Juan Antonio Garcia Pascual (Universidad de Zaragoza)
      • 10:00 AM
        ROOT compilation preparation 1h

        We will start the compilation of ROOT on each participant system.

        We will describe cmake compilation system and start the compilation of ROOT on our systems.

        We might have parallel sessions. Linux + Windows + MacOs.

        Speakers: Javier Galan (Universidad de Zaragoza), Juan Antonio Garcia Pascual (Universidad de Zaragoza), Luis Antonio Obis Aparicio (University of Zaragoza)
      • 11:00 AM
        Time to have a REST 30m
      • 11:30 AM
        REST-for-Physics compilation and installation 45m

        Once we succeed with ROOT installation we will proceed with REST compilation and first tests.

        Introduction to sub-modules, official release, and latest.

        Speakers: Javier Galan (Universidad de Zaragoza), Juan Antonio Garcia Pascual (Universidad de Zaragoza), Luis Antonio Obis Aparicio (University of Zaragoza)
      • 12:15 PM
        Basic Linux commands 45m
        Speaker: Juan Antonio Garcia Pascual (Universidad de Zaragoza)
      • 1:00 PM
        Surfing on code using VIM 30m
        Speaker: Javier Galan (Universidad de Zaragoza)
    • 9:00 AM 1:30 PM
      Introduction to ROOT
      • 9:00 AM
        A Basic ROOT introduction 1h 30m

        During this session we will learn about the ROOT C++ interpreter, using macros and python scripts that import ROOT libraries.

        During this session fundamental ROOT concepts such as trees and histograms will be introduced. We will learn how to filter data using Draw and RDataFrame ROOT techniques. How to draw data using TGraph and TH1 objects, and how to fit them using a TF1 object.

        Speaker: Konrad Altenmüller (CAPA, Universidad de Zaragoza)
      • 10:30 AM
        Implementing TRestCoffee metadata class 30m
      • 11:00 AM
        ROOT I/O and custom class integration 1h 30m

        In this session we provide a quick overview of fundamental C++ concepts required to understand the potential on the use of ROOT libraries.

        We will learn how to read, create ROOT files and write objects to a ROOT file. We will provide details on the structure of a ROOT file, introducing concepts such as directories and keys.

        We will introduce the construction of custom C++ classes that can be integrated into the existing I/O scheme of ROOT.

        Speaker: Javier Galan (Universidad de Zaragoza)
      • 12:30 PM
        REST-for-Physics in education 1h

        A brief but complete overview of the different academic and research projects that have been performed using REST-for-Physics software.

        Speaker: Gloria Luzón Marco (CAPA, Universidad de Zaragoza (ES))
    • 9:00 AM 1:30 PM
      Introduction to REST-for-Physics
      • 9:00 AM
        Introduction to REST-for-Physics 1h 30m

        A general overview of all the REST-for-Physics ecosystem, including:

        • Motivation
        • Basic introduction
        • Event data types, metadata classes and REST processes
        • RML Configuration file features.
        • Core classes: TRestAnalysisTree
        • Helper classes: TRestPhysics, TRestTools, TRestStringHelper, ...
        • Using units inside REST (TRestSystemOfUnits)
        • Output levels (TRestStringOutput)
        • Finding help and information. API, user guide, publications.
        Speaker: Javier Galan (CAPA, Universidad de Zaragoza)
      • 10:30 AM
        Someone should implement a TRestBreak now 30m
      • 11:00 AM
        Geant4 simulations using restG4 1h 15m

        In this session we will learn about restG4 and the REST-for-Physics geant4lib that can be used to process the results obtained with a restG4 simulation.

        The main components of a restG4 simulation will be described, such as particle generator, physics lists, GDML geometry, and geant4 metadata describing the simulation conditions.

        - Visualise and modify a GDML geometry.
        - Launch a simulation on that geometry and visualise the events.

        Speaker: Luis Antonio Obis Aparicio (University of Zaragoza)
      • 12:15 PM
        Accessing data using REST-for-Physics 1h 15m

        We will learn how to access REST-for-Physics generated data by different means, accessing metadata classes, reading analysis tree, or looping on events are some of the common tasks performed with REST.

        Different ways to access the data will be introduced in different environments, using C-macros, python scripts, using restRoot interactive ROOT-shell, or exploring a file using a ROOT browser.

        Speaker: Ni Kaixiang (SJTU)
    • 3:00 PM 7:30 PM
      Event data processing inside REST-for-Physics
      • 3:00 PM
        Rawsignal processing in REST-for-Physics 2h

        The rawlib library will be introduced in further detail, reviewing a TRestRawSignalEvent structure.

        We will see how to process signals to perform different signal conditioning operations, such as smoothing, fitting, shaping and/or analysing waveform properties.

        Speakers: David Díez Ibáñez (Universidad de Zaragoza), Konrad Altenmüller (CAPA, Universidad de Zaragoza)
      • 5:00 PM
        To REST or not to REST 30m
      • 5:30 PM
        Event reconstruction and detector response in REST-for-Physics 2h

        During this session we will provide details about detector readout construction, how to use gas properties and how to process data that allow us to introduce different detector physics phenomenology in our MonteCarlo or experimental data.

        Speaker: Cristina Margalejo Blasco (Universidad de Zaragoza)
    • 9:00 AM 1:30 PM
      Contributing to REST-for-Physics
      • 10:00 AM
        Creating your own REST classes 1h
        • Create a new metadata class
        • Create a new process
        • Modify an existing process
        • Build your own data processing flow using existing and your newly created process.
        • Compile your own REST-for-Physics library.
        Speakers: Javier Galan (CAPA, Universidad de Zaragoza), Ni Kaixiang (SJTU)
      • 11:00 AM
        if( fLoveRest) break; else ReStartCourse(); 30m
      • 11:30 AM
        Working on GitHub 1h 15m

        We will learn in this session basic concepts about code development in teams, such as:

        • GitHub Pull-Requests
        • Validation pipelines (What it is/How to build one)
        • Documenting using Doxygen
        • Creating issues and providing feedback!
        • Naming conventions
        • Good practices while contributing to common codes
        Speakers: Juan Antonio Garcia Pascual (Universidad de Zaragoza), Luis Antonio Obis Aparicio (University of Zaragoza)
      • 12:45 PM
        Description of final exercise. Challenge! 30m

        And later on survey!

        • feedback
        • discussions
        • questions
        • suggestions
        • comments
        Speakers: Javier Galan (Universidad de Zaragoza), Ni Kaixiang (SJTU)