Added functionality to the Geant4 extension for the Geant4.G4JLDetector() function, which creates a Geant4 detector object (Geant4.G4JLDetectorGDML) from SSD simulation object by translating the given CSG geometry to GDML.
There are two methods for the function Geant4.G4JLDetector(), which makes it possible to specify the SolidStateDetectors.Simulation object explicitly or through a corresponding YAML configuration file:
function Geant4.G4JLDetector(sim::SolidStateDetectors.Simulation, output_filename::String = "tmp.gdml"; verbose::Bool = true)
function Geant4.G4JLDetector(input_filename::String, output_filename::String = "tmp.gdml"; verbose::Bool = true)
The following CSG geometry types are covered in the SSD to GDML translation:
Primitives: Box, Cone, Sphere
Boolean operators: Difference, Intersection, Union
Displacements in the $x, y, z$-axes work fine, but rotations are currently not parsed correctly and are thus still considered an experimental feature.
Calling the function on a SolidStateDetectors.Simulation object, the following volumes are created:
World (where the simulation takes place, is specified in SSD by the grid)
Semiconductor
Contacts
Passives
Geometrical objects that have zero volume are omitted in the GDML file, since the simulation algorithm of Geant4 requires all objects to have nonzero volume.
The predefined list of materials (with their physical characteristics) saved in the file materials.xml is internally referenced by the names given in the SSD simulation object and gives each physical volume its properties needed for the Geant4 simulation. Currently, the list only includes:
High Purity Germanium
Aluminium
Vacuum
Example usage
Creates a Geant4 detector object from the InvertedCoax example file.
using SolidStateDetectors
using Geant4
g4_detector = Geant4.G4JLDetector(SSD_examples[:InvertedCoax], output_filename = "inverted_coax.gdml", verbose = false)
typeof(g4_detector) # G4JLDetectorGDML
Added functionality to the Geant4 extension for the
Geant4.G4JLDetector()
function, which creates a Geant4 detector object (Geant4.G4JLDetectorGDML
) from SSD simulation object by translating the given CSG geometry to GDML.There are two methods for the function
Geant4.G4JLDetector()
, which makes it possible to specify theSolidStateDetectors.Simulation
object explicitly or through a corresponding YAML configuration file:The following CSG geometry types are covered in the SSD to GDML translation:
Displacements in the $x, y, z$-axes work fine, but rotations are currently not parsed correctly and are thus still considered an experimental feature.
Calling the function on a
SolidStateDetectors.Simulation
object, the following volumes are created:Geometrical objects that have zero volume are omitted in the GDML file, since the simulation algorithm of Geant4 requires all objects to have nonzero volume.
The predefined list of materials (with their physical characteristics) saved in the file
materials.xml
is internally referenced by the names given in the SSD simulation object and gives each physical volume its properties needed for the Geant4 simulation. Currently, the list only includes:Example usage
Creates a Geant4 detector object from the InvertedCoax example file.
Needs to be implemented
materials.xml