New software library of geometrical primitives for modeling of solids used in Monte Carlo detector simulations

We present our effort for the creation of a new software library of geometrical primitives, which are used for solid modeling in Monte Carlo detector simulations. We plan to replace and unify the current implementations for geometrical primitive classes in the software projects Geant4 and ROOT with this library. Each solid is implemented as a C++ class providing methods to compute distances of rays to the surface of a solid or to find whether a position is located inside, outside or on the surface of the solid. A numerical tolerance is used for determining whether a position is on the surface. The class methods also contain basic support for visualization. We use dedicated test suites for the validation of the code; these also include performance and consistency tests used for the analysis of candidate implementations of class methods for the new library. We have implemented simple adapter classes to allow the use of the new optimized solids with Geant4 and ROOT geometries.