English

GDCP: A custom package for flexible detector setups in Geant4

Instrumentation and Detectors 2023-08-16 v2 High Energy Physics - Experiment

Abstract

Geant4 Detector Construction Pattern (GDCP) is a C++ package containing a set of utility classes for developers to utilize during the detector construction phase of a Geant4 application. The main objective of this study is to provide an interface that helps users develop a highly flexible, understandable, and maintainable detector construction code. The package also contains a couple of helper classes facilitating the implementation of optical components in scintillation detectors. Finally, an advanced Geant application has been provided to demonstrate the package's utility. Program summary Program title: GDCP CPC Library link to program files: Licensing provisions: GNU General Public License 3 Programming language: C++ External routines/libraries: Geant4 Nature of problem: Geant4 provides an abstract class, G4VUserDetectorConstruction, that is used for the whole detector construction. This is sufficient for a simple detector setup but implementing a single class for building a complex detector leads to complexity in the code. To solve this issue it is recommended to split the implementation into more methods or classes; however, there is no standard solution published yet and it is entirely left to the users' ability. Solution method: To address this issue, I propose to apply the "Builder design pattern" in the detector construction phase. For this, the elements of the Builder design pattern have been introduced and made available for developers. Keywords: G4VUserDetectorConstruction, Builder design pattern, Detector construction, Component builder, Optical photon, Scintillator

Cite

@article{arxiv.2209.14232,
  title  = {GDCP: A custom package for flexible detector setups in Geant4},
  author = {Mustafa Kandemir},
  journal= {arXiv preprint arXiv:2209.14232},
  year   = {2023}
}

Comments

The research results reported are too premature for publication

R2 v1 2026-06-28T02:18:22.397Z