3–5 Jul 2006
CERN, Geneva
Europe/Zurich timezone

Python binding for Geant4 toolkit using Reflex/PyROOT

4 Jul 2006, 12:10
30m
40-SS-D01 (CERN, Geneva)

40-SS-D01

CERN, Geneva

Python in Science Python in Science

Speaker

Dr Witold Pokorski (CERN)

Description

Geant4 is one of the principal toolkits used for the simulation of the passage of particles through matter. It is implemented in C++ and it exposes to the users a set of methods (of different classes) needed to construct a functional application. In other words, users need to interact with Geant4 objects via a C++ API and therefore users' Geant4 based applications are normally written in C++. In this paper we discuss how to use the Reflex/PyROOT tools to create a Python binding for the Geant4 classes. Such a binding gives the users the possibility of implementing their applications in Python as well as to interact and configure them from the Python prompt. Moreover, using the already existing Python binding for the ROOT data analysis framework, the Python binding for Geant4 allows to run interactively and simultaneously the two applications from the Python prompt. This proves to be very interesting, especially in the case of development and debugging of simulation applications. The advantanges of using the Reflex/PyROOT tools for creating a Python binding for C++ classes will be presented in this paper.

Primary author

Dr Witold Pokorski (CERN)

Presentation materials