@article{1742-6596-396-5-052035, author={Marek Gayer and John Apostolakis and Gabriele Cosmo and Andrei Gheata and Jean-Marie Guyader and Tatiana Nikitina}, title={New software library of geometrical primitives for modeling of solids used in Monte Carlo detector simulations}, journal={Journal of Physics: Conference Series}, volume={396}, number={5}, pages={052035}, url={http://stacks.iop.org/1742-6596/396/i=5/a=052035}, year={2012}, abstract={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.} }