Geant4 Tutorial

Europe/Stockholm
Lyra (Department of Astronomy and Theoretical Physics)

Lyra

Department of Astronomy and Theoretical Physics

Sölvegatan 27, 223 62 Lund
Dennis Wright, Luis Sarmiento Pico (Lunds universitet) , Makoto Asai, Mihaly Novak
Description

Geant4 logo

GEANT4 (http://geant4.web.cern.ch/) is a toolkit for simulating the passage of particles through matter. It is the reference simulation engine in many areas. GEANT4 covers all relevant physics processes, electromagnetic, hadronic, decay, optical, for long and short lived particles, for energy range spanning from tens of eV to TeV scale. The transport of low energy neutrons down to thermal energies is also be handled. The software can also simulate remnants of hadronic interactions, including atomic de-excitation and provides extension to low energies down to the DNA scale for biological modelling. The software is based on a sound object-oriented design which favours a variety of application development by the community, like for example the propagation of acoustic phonons in cryogenic crystals, the Geant4 Application for Tomographic Emission (GATE), the beam line simulation (G4BEAMLINE) and others

Register for the course following the link below but please also fill out the COMPUTE course registration form, which can be downloaded from the following website http://cbbp.thep.lu.se/compute/index.php.

COMPUTE registration form
Information
Project
Syllabus
Participants
  • Adrian Nassirpour
  • Ander Gray
  • Caterina Marcon
  • Eleni Skorda
  • Emil Rofors
  • Eva Hansen
  • Gustavo Kertzscher
  • Jonatan Adolfsson
  • Katja Mankinen
  • Nicholai Mauritzson
  • Nikolai Starinski
    • 09:00 10:30
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 09:00
        Welcome 10m
      • 09:10
        Tutorial introduction 10m
        - Network, logistics - Tutorial structure - Lecturer introduction
        Speaker: Luis Sarmiento Pico (Lunds universitet)
      • 09:20
        Introduction to detector simulation 20m
        - Basic concepts of Monte Carlo and detector simulation
        Speaker: Dennis Wright
        Slides
      • 09:40
        Kernel I 50m
        - General introduction of Geant4 - Use-case studies in HENP, space, medicine and other user domains - Global structure of Geant4 - Run, event, track, step, trajectory, etc. - User classes
        Speaker: Makoto Asai
        Slides
    • 10:30 10:50
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 10:50 12:20
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 10:50
        User documents and examples 30m
        - Installation Guide - Application developer’s manual - Toolkit developer’s manual - Physics reference manual - Novice examples in Geant4 distribution - Extended and advanced examples in Geant4 distribution - LXR source code browser - HyperNews
        Speaker: Dennis Wright
        Slides
      • 11:20
        User interface I 30m
        - Syntax of UI command - Interactive mode / batch mode - G4UIExective class
        Speaker: Makoto Asai
        Slides
      • 11:50
        Visualization I 30m
        - Introduction to Visualization - Quick Looks at Seven Visualization Drivers - Basic Visualization Commands
        Speaker: Mihaly Novak
        Slides
    • 12:20 13:30
      lunch break 1h 10m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 13:30 15:00
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 13:30
        Scoring I 40m
        - Introduction to sensitivity - Command-based scoring - Add a new scorer/filter
        Speaker: Makoto Asai
        Slides
      • 14:10
        Physics I 50m
        - Introduction - G4VUserPhysicsList class - Modular physics list - Packaged physics lists - Choosing appropriate Physics List
        Speaker: Mihaly Novak
        Slides
    • 15:00 15:20
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 15:20 17:20
      Hands-on Lundmarksalen

      Lundmarksalen

      Department of Astronomy and Theoretical Physics

      • 15:20
        Hands-on I 2h
        - Complete Geant4 installation and execute a few examples to confirm the installation --> Hands-on instruction --> Hands-on instruction - Additional links --> Installation guide --> Troubleshooting: Installation and Configuration thread of Hypernews

        # this bit of code should be included in your ~/.bashrc.

        # If not running interactively, don't do anything
        [[ $- != *i* ]] && return

        #########################################################################
        #########################################################################
        ##                                                                     ##
        ##                    LCG and LCG-inspired configuration               ##
        ##                                                                     ##
        ##                        (http://lcginfo.cern.ch/)                    ##
        ##                                                                     ##
        #########################################################################
        #########################################################################

        export LCG_REPO=/cvmfs/sft.cern.ch/lcg/views

        ### for latest Geant4 this is the one you need
        export LCG_RELEASE=94rc1
        export LCG_PLATFORM=x86_64-slc6-gcc62-opt

        ## for production this is the current tested one
        #export LCG_RELEASE=93
        #export LCG_PLATFORM=x86_64-slc6-gcc62-opt

        ##
        source                $LCG_REPO/LCG_$LCG_RELEASE/$LCG_PLATFORM/setup.sh
        export QT_QPA_FONTDIR=$LCG_REPO/LCG_$LCG_RELEASE/$LCG_PLATFORM/fonts

        cat <<EOF

        #########################################################################
        #########################################################################

        Current Software setup  is

                LCG version : $LCG_RELEASE
                platform    : $LCG_PLATFORM

                G4examples  : $LCG_REPO/LCG_$LCG_RELEASE/$LCG_PLATFORM/share/Geant4-*/examples

        #########################################################################
        #########################################################################
        EOF

        return

    • 09:00 10:30
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 09:00
        Material definition 30m
        - Defining Materials - NIST Material database
        Speaker: Dennis Wright
        Slides
      • 09:30
        Geometry I 1h
        - Introduction - G4VUserDetectorConstruction class - Solid - Logical volume - Region - Physical volume - Placement
        Speaker: Makoto Asai
        Slides
    • 10:30 10:50
      Break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 10:50 12:20
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 10:50
        Primary particle 30m
        - G4VUserPrimaryGeneratorAction class - Primary vertex and primary particle - Built-in primary particle generators - More on Particle Gun
        Speaker: Makoto Asai
        Slides
      • 11:20
        Physics II 1h
        - Physics components - General process interface - Secondary production threshold
        Speaker: Mihaly Novak
        Slides
    • 12:20 13:30
      lunch break 1h 10m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 13:30 15:10
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 13:40
        Physics III 30m
        - Decay - Optical - Phonon, electron/hole - Channeling
        Speaker: Mihaly Novak
        Slides
      • 14:10
        Geometry II 1h
        - Parametrized volume - Replicated volume - Divided volume - Nested-parameterization - Assembly volume - Reflected volume - Touchable
        Speaker: Makoto Asai
        Slides
    • 15:00 15:20
      Break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 15:20 17:20
      Hands-on Lundmarksalen

      Lundmarksalen

      Department of Astronomy and Theoretical Physics

      • 15:20
        Hands-on II 2h
        - Material and a simple geometry - Visualization of geometry - Command-based scoring --> Hands-on instruction --> Hands-on instruction

        when working on the HandsOn2 you will see that the notes for the tutorial are hosted at SLAC with rather "generic" instructions. I have translated them into 'iridium-able' commands ;-)

        ======================================================================================
        BLOCK 1  getting the exercise code
        ======================================================================================

        $ mkdir ~/HandsOn2          # make new working directory
        $ cd ~/HandsOn2             # change to your new working directory
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn2/HandsOn2.tar.gz
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn2/HandsOn2-solution.tar.gz
        $ tar xzf HandsOn2.tar.gz   # extract source code
        # optionally extract in a similar way the solution. But please give the exercise a try first ;-)
        $ cd HandsOn2               # change to newly extracted code
        $ ls                        # have a look at the files
        $ cd ..                     # let's go back to '~/HandsOn2' working directory

        ===================================================================================

        and

        ===================================================================================
        BLOCK 2  OPTION: SEPARATE build and source directory
        ===================================================================================

        $ mkdir build-HandsOn2
        $ cd build-HandsOn2
        $ cmake ../HandsOn2
        $ make
        $ ./SLACtut

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================
        # ... modify files located under '~/HandsOn2/HandsOn2'
        # compile the code at ~/HandsOn2/build-HandsOn2
        $ make
        # when you issued 'cmake ../HandsOn2' those two folders got linked. It would just work

        ===================================================================================

        OR

        ===================================================================================
        BLOCK 2  OPTION: SAME build and source directory
        ===================================================================================

        $ cd HandsOn2
        $ cmake .
        $ make -f Makefile
        $ ./SLACtut

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================
        # ... modify files located under '~/HandsOn2/HandsOn2'
        # compile the code directly at ~/HandsOn2/HandsOn2
        $ make -f Makefile

        ===================================================================================

        Happy coding ;-)

         

    • 09:00 10:30
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 09:00
        EM physics I 45m
        - EM standard overview
        Speaker: Mihaly Novak
        Slides
      • 09:45
        Scoring II 45m
        - Define scorers in the tracking geometry - Reduction of user data - Sensitive detector - Hits
        Speaker: Makoto Asai
        Slides
    • 10:30 10:50
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 10:50 12:20
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 10:50
        EM physics II 45m
        - Low-E EM overview - DNA physics
        Speaker: Mihaly Novak
        Slides
      • 11:35
        Geometry III 45m
        - Magnetic field - Field integration and other types of field - GDML interface - CAD interface - Geometry checking tools - Geometry optimization
        Speaker: Makoto Asai
        Slides
    • 12:20 13:30
      lunch break 1h 10m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 13:30 15:00
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 13:30
        EM physics III 50m
        -specific topics of standard EM physics modelling: - energy-loss processes - multiple scattering - their role in Geant4 stepping
        Speaker: Mihaly Novak
        Slides
      • 14:20
        User interface II 40m
        - Define user commands
        Speaker: Makoto Asai
        Slides
    • 15:00 15:20
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 15:20 17:20
      Hands-on Lundmarksalen

      Lundmarksalen

      Department of Astronomy and Theoretical Physics

      • 15:20
        Hands-on III 2h
        - Complete geometry - Define scorers - User Actions I: printing information on the screen --> Hands-on instruction --> Hands-on instruction

        when working on the HandsOn3 you will see that the notes for the tutorial are hosted at SLAC with rather "generic" instructions. I have translated them into 'iridium-able' commands ;-)

        ===================================================================================
        BLOCK 1  OPTION: SEPARATE build and source directory - getting the exercise code and compile
        ===================================================================================

        $ mkdir ~/HandsOn3          # make new working directory
        $ cd    ~/HandsOn3          # change to your new working directory
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn3/HandsOn3.tar.gz
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn3/HandsOn3-solution.tar.gz
        $ tar xzf HandsOn3.tar.gz   # extract source code
        # optionally extract in a similar way the solution. But please give the exercise a try first ;-)
        $ mkdir build-HandsOn3
        $ cd build-HandsOn3
        $ cmake ../HandsOn3
        $ make
        $ ./SLACtut

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressing 'C-c' (Control key + c key)

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================

        # ... modify files located under '~/HandsOn3/HandsOn3'
        # compile the code at ~/HandsOn3/build-HandsOn3
        $ make
        # when you issued 'cmake ../HandsOn3' those two folders got linked. It would just work

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressing 'C-c' (Control key + c key)

        ===================================================================================

        OR

        ===================================================================================
        BLOCK 1  OPTION: SAME build and source directory - getting the exercise code and compile
        ===================================================================================

        $ mkdir ~/HandsOn3          # make new working directory
        $ cd    ~/HandsOn3          # change to your new working directory
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn3/HandsOn3.tar.gz
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn3/HandsOn3-solution.tar.gz
        $ tar xzf HandsOn3.tar.gz   # extract source code
        # optionally extract in a similar way the solution. But please give the exercise a try first ;-)
        $ cd HandsOn3
        $ cmake .
        $ make -f Makefile
        $ ./SLACtut

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressung 'C-c' (Control key + c key)

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================

        # ... modify files located under '~/HandsOn3/HandsOn3'
        # compile the code directly at ~/HandsOn3/HandsOn3
        $ make -f Makefile

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressung 'C-c' (Control key + c key)

        ==================================================================================

    • 09:00 10:30
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 09:00
        Hadronic physics I 45m
        - Hadronic physics overview - Pre-compound/de-excitation models - Cascade models
        Speaker: Dennis Wright
        Slides
      • 09:45
        Scoring II 45m
        - Define scorers in the tracking geometry - Reduction of user data - Sensitive detector - Hits
        Speaker: Makoto Asai
        Slides
    • 10:30 10:50
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 10:50 12:20
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 10:50
        Hadronic physics II 40m
        - Elastic process - Neutron physics - Ion physics - Capture, stopping and fission models
        Speaker: Dennis Wright
        Slides
      • 11:30
        Multithreading I 20m
        - Introduction to multithreading - UI commands for multithreading
        Speaker: Makoto Asai
        Slides
      • 11:50
        Analysis 30m
        - G4Tools : built-in analysis tool
        Speaker: Mihaly Novak
        Slides
    • 12:20 13:30
      lunch break 1h 10m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 13:30 15:00
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 13:30
        Hadronic physics III 45m
        - String models - Gamma- and Electro-nuclear models - Radioactive decay
        Speaker: Dennis Wright
        Slides
      • 14:15
        Visualization II 20m
        - Visualization commands
        Speaker: Mihaly Novak
        Slides
      • 14:35
        Geometry IV 25m
        - Parallel geometry - Layered mass geometry - Moving objects
        Speaker: Makoto Asai
        Slides
    • 15:00 15:20
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 15:20 17:20
      Hands-on Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 15:20
        Hands-on IV 2h
        - User Actions II: Accumulating information from a run - Use g4tools to create histograms and output ntuple files --> Hands-on instruction --> Hands-on instruction

        when working on the HandsOn4 you will see that the notes for the tutorial are hosted at SLAC with rather "generic" instructions. I have translated them into 'iridium-able' commands ;-)

        ===================================================================================
        BLOCK 1  OPTION: SEPARATE build and source directory - getting the exercise code and compile
        ===================================================================================

        $ mkdir ~/HandsOn4          # make new working directory
        $ cd    ~/HandsOn4          # change to your new working directory
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn4/HandsOn4.tar.gz
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn4/HandsOn4-solution.tar.gz
        $ tar xzf HandsOn4.tar.gz   # extract source code
        # optionally extract in a similar way the solution. But please give the exercise a try first ;-)
        $ mkdir build-HandsOn4
        $ cd build-HandsOn4
        $ cmake ../HandsOn4
        $ make
        $ ./SLACtut

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressing 'C-c' (Control key + c key)

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================

        # ... modify files located under '~/HandsOn4/HandsOn4'
        # compile the code at ~/HandsOn4/build-HandsOn4
        $ make
        # when you issued 'cmake ../HandsOn4' those two folders got linked. It would just work

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressing 'C-c' (Control key + c key)

        ===================================================================================

        OR

        ===================================================================================
        BLOCK 1  OPTION: SAME build and source directory - getting the exercise code and compile
        ===================================================================================

        $ mkdir ~/HandsOn4          # make new working directory
        $ cd    ~/HandsOn4          # change to your new working directory
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn4/HandsOn4.tar.gz
        $ wget http://geant4.slac.stanford.edu/SLACG4TutorialHandsOn/HandsOn4/HandsOn4-solution.tar.gz
        $ tar xzf HandsOn4.tar.gz   # extract source code
        # optionally extract in a similar way the solution. But please give the exercise a try first ;-)
        $ cd HandsOn4
        $ cmake .
        $ make -f Makefile
        $ ./SLACtut

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressung 'C-c' (Control key + c key)

        ===================================================================================
        RINSE AND REPEAT
        ===================================================================================

        # ... modify files located under '~/HandsOn4/HandsOn4'
        # compile the code directly at ~/HandsOn4/HandsOn4
        $ make -f Makefile

        # If at the time of quitting the execution you do not return to the prompt, you can try
        # to 'kill' the process by pressung 'C-c' (Control key + c key)

        ==================================================================================

    • 09:00 10:30
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 09:00
        Event biasing 45m
        - Overview - Geometrical biasing - Physics biasing - Bremsstrahlung splitting
        Speaker: Dennis Wright
        Slides
      • 09:45
        Multithreading II 45m
        - Thread safety - MPI - File I/O in multithreaded mode
        Speaker: Makoto Asai
        Slides
    • 10:30 10:50
      break 20m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 10:50 12:20
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 10:50
        Physics list 30m
        - Choice of physics list - Validation of physics lists
        Speaker: Mihaly Novak
        Slides
      • 11:20
        Kernel II 1h
        - User limits - User information classes - Fast simulation (a.k.a. shower parameterization) - Stack management
        Speaker: Makoto Asai
        Slides
    • 12:20 13:30
      lunch break 1h 10m Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 13:30 14:50
      Tutorial Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
      • 13:30
        Q/A 40m
      • 14:10
        How to Update Your Geant4 Installation 20m
        - Major versus minor releases - What to look for in the release notes
        Speaker: Dennis Wright
        Slides
      • 14:30
        Closing remarks 20m
        Speaker: Makoto Asai
        Slides
    • 14:50 14:55
      Adjourn Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund
    • 15:25 17:30
      Submission: Project submission Lyra

      Lyra

      Department of Astronomy and Theoretical Physics

      Sölvegatan 27, 223 62 Lund

      This is the place to upload the reports

      • 16:00
        Caterina Marcon 10m
        Slides
      • 16:10
        Eleni Skorda 10m
        Slides
      • 16:20
        Emil Rofors 10m
        Slides
      • 16:30
        Eva Hansen 10m
        Slides
      • 16:40
        Jonatan Adolfsson 10m
        Slides
      • 16:50
        Katja Mankinen 10m
        Slides
      • 17:00
        Nicholai Mauritzson 10m
        Slides
      • 17:10
        Ander Gray 10m