Skip to content

araujoarthur/geant4-learning-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geant4 Learning Resources

Geant4 C++ Python Shell Script Linux Ubuntu

General Description

This is a repository with stuff I made while learning Geant4 Application Development and the C++ Programming Language. Further information not detailed as comments inside the source files can be found in:

compile.sh

Introduction

Using this ShellScript one should be able to compile every basic and avanced example in Geant4's examples folder. In order to do that, place it inside the same folder where the source code for examples are found and run . compile.sh.

How does it work

The script will prompt for installation path to init ENVIRONMENT VARIABLES required by Geant4 to compile and run examples. It will also ask for the name of the source code file containing the int main{} function (Usually it is exampleB1, exampleB2a, exampleB2b, etc) but may differ in advanced examples. It will automatically create and go to directory ./build, then it will automatically generate build tools and compile the example.

Disclaimer

  • This ShellScript was NOT tested against extended examples, but should work just fine with advanced and basic ones.
  • This ShellScript was created to work on LINUX environments and was tested in Ubuntu 22.04 LTS using a standard installation of Geant4 v11.0.2 based on Geant4 Installation Guide doc Rev6.0 using -DGEANT4_USE_QT=ON, -DGEANT4_BUILD_MULTITHREADED=ON, -DGEANT4_INSTALL_DATA=ON flags. Although it could work in previous and future versions (if folder structure don't change), there's no warranty that it will work.
  • This ShellScript is meant to make it easy to compile your first examples and should be treated as a training-wheel you want to get rid of and not get used to. You are strongly encouraged to read the Geant4 Documentation, CMake Documentation and Make Documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published