The virtual geometry model

Similar documents
A Geometrical Modeller for HEP

ATLAS software configuration and build tool optimisation

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

GraXML. Modular Geometric Modeler History Architecture. Data Sources Applications. Generic Model Geometric Model Core

Geant4 application in a Web browser

ATLAS Tracking Detector Upgrade studies using the Fast Simulation Engine

ATLAS Nightly Build System Upgrade

Using Fluxes and Geometries

TGeoCad: an Interface between ROOT and CAD Systems

GUIMesh: a tool to import STEP geometries into Geant4 via GDML

Geant4 Computing Performance Benchmarking and Monitoring

CMS - HLT Configuration Management System

Monitoring the software quality in FairRoot. Gesellschaft für Schwerionenforschung, Plankstrasse 1, Darmstadt, Germany

The ATLAS EventIndex: an event catalogue for experiments collecting large amounts of data

Geometry 5. I.Hrivnacova¹, J.Apostolakis² ¹IPN, Orsay; ²CERN. Cours Paris June 2007

Experience with PROOF-Lite in ATLAS data analysis

The software library of the Belle II experiment

A System for Managing the CLEO III Detector Geometry

Lesson 2 Constructive Solid Geometry Concept. Parametric Modeling with I-DEAS 2-1

Autodesk Inventor 2019 and Engineering Graphics

Update of the BESIII Event Display System

arxiv: v1 [physics.ins-det] 19 Oct 2017

Geometry 3. I.Hrivnacova IPN, Orsay. Most slides thanks to M. Asai, SLAC. Cours Paris June 2007

Engineering Drawing II

Introduction to Geant4

DD4hep Based Event Reconstruction

DIAL: Distributed Interactive Analysis of Large Datasets

Phronesis, a diagnosis and recovery tool for system administrators

Geometric Templates for Improved Tracking Performance in Monte Carlo Codes

SolidWorks 2013 and Engineering Graphics

A data handling system for modern and future Fermilab experiments

The evolving role of Tier2s in ATLAS with the new Computing and Data Distribution model

Geant4 v8.1p01. Geometry I. Makoto Asai (SLAC) Geant4 Tutorial Course

Geant4 simulation in a distributed computing environment

DIANA. Finite Element Analysis. Civil Engineering Geotechnical Engineering Petroleum Engineering

An SQL-based approach to physics analysis

SNiPER: an offline software framework for non-collider physics experiments

Performance quality monitoring system for the Daya Bay reactor neutrino experiment

SOLIDWORKS 2016 and Engineering Graphics

Geant4 v9.4. Geometry I. Presented by Sébastien Incerti (CNRS/IN2P3) Based on slides kindly prepared by Makoto Asai (SLAC)

Large scale commissioning and operational experience with tier-2 to tier-2 data transfer links in CMS

Lesson 5 Solid Modeling - Constructive Solid Geometry

Large Scale Software Building with CMake in ATLAS

Version 4.1 Demo. RecurDynTM 2002 RecurDyn User Conference

REPORT SERIES HU - SEFT RD U3. The CADIN T Interface in GEANT. N. Hsbimyr, J. Vuoskoski. CERN. Geneva. Switzerland ISSN

A DAQ system for CAMAC controller CC/NET using DAQ-Middleware

OBJECT ORIENTED DESIGN OF ANTHROPOMORPHIC PHANTOMS AND GEANT4-BASED IMPLEMENTATIONS ABSTRACT

DD4hep Based Event Reconstruction

Modification to the Monte Carlo N-Particle (MCNP) Visual Editor (MCNPVised) to Read in Computer Aided Design (CAD) Files

ATLAS strategy for primary vertex reconstruction during Run-2 of the LHC

Evolution of Database Replication Technologies for WLCG

Geant4 v8.3. Geometry I. Makoto Asai (SLAC) Geant4 Tutorial Course

Introduction to Solid Modeling Parametric Modeling. Mechanical Engineering Dept.

CMS event display and data quality monitoring at LHC start-up

TAG Based Skimming In ATLAS

Model data extraction. Mass property data. Mass property data. Mass property data. Integral Processes. Units and volume

ComPWA: A common amplitude analysis framework for PANDA

1 Introduction. V. Fine, Y. l%yak,?? Perevoztchikov, T.Wenaus

Data transfer over the wide area network with a large round trip time

Modular and scalable RESTful API to sustain STAR collaboration's record keeping

Development of a Radiation Shielding Monte Carlo Code: RShieldMC

Visual GDML, an open-source software for building and visualizing Geant4 geometry based on the GDML markup language

Solid Modeling. Ron Goldman Department of Computer Science Rice University

ACTS: from ATLAS software towards a common track reconstruction software

Reducing CPU Consumption of Geant4 Simulation in ATLAS

GlueX Computing GlueX Collaboration Meeting JLab. Edward Brash University of Regina December 11 th -13th, 2003

3/3/2014. Sharif University of Technology. Session # 5. Instructor. Class time. Course evaluation. Department of Industrial Engineering

WLCG Transfers Dashboard: a Unified Monitoring Tool for Heterogeneous Data Transfers.

The full detector simulation for the ATLAS experiment: status and outlook

Geometric Templates for Improved Tracking Performance in Monte Carlo Codes

A Tool for Conditions Tag Management in ATLAS

Faster Navigation in Voxel Geometries (DICOM) Joseph Perl (SLAC/SCCS) G4NAMU AAPM Houston 27 July 2008

A KBE tool for solving the mechanisms kinematics

An Analysis of Storage Interface Usages at a Large, MultiExperiment Tier 1

The Database Driven ATLAS Trigger Configuration System

CAD/CAM COURSE TOPIC OF DISCUSSION GEOMETRIC MODELING DAWOOD COLLEGE OF ENGINEERING & TECHNOLOGY- KARACHI- ENGR. ASSAD ANIS 4/16/2011 1

Visualization in GEANT4. 1 Introduction. 2 User Requirements. University of Manchester, UK. John Allison

Chapter 9 3D Modeling

HEP data analysis using ROOT

Reliability Engineering Analysis of ATLAS Data Reprocessing Campaigns

3D Design with 123D Design

Computing in High Energy and Nuclear Physics, March 2003, La Jolla, California

Servicing HEP experiments with a complete set of ready integreated and configured common software components

Detector Descrip+on: Advanced. h#p://cern.ch/geant4

Autodesk Conceptual Design Curriculum 2011 Student Workbook Unit 2: Parametric Exploration Lesson 1: Parametric Modeling

Andrea Sciabà CERN, Switzerland

Chapter 13 XML: Extensible Markup Language

Solid Bodies and Disjointed Bodies

The High-Level Dataset-based Data Transfer System in BESDIRAC

The Athena data dictionary and description language

Multiple variables data sets visualization in ROOT

Simulation Techniques Using Geant4

Monte Carlo Production on the Grid by the H1 Collaboration

DIRAC File Replica and Metadata Catalog

AGIS: The ATLAS Grid Information System

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

Design and performance evaluations of generic programming techniques in a R&D prototype of Geant4 physics

NX electrical and mechanical routing

The CMS data quality monitoring software: experience and future prospects

OKLAHOMA SCHOOL TESTING PROGRAM TEST BLUEPRINT MATHEMATICS GRADE 3

Transcription:

Journal of Physics: Conference Series The virtual geometry model To cite this article: I Hivnáová and B Viren 2008 J. Phys.: Conf. Ser. 119 042016 View the article online for updates and enhancements. Related content - The ALICE Geant4 Simulation I Hivnáová, O Datskova, A Gheata et al. - A Virtual Geant4 Environment Go Iwai - An interface for GEANT4 simulation using ROOT geometry navigation A Gheata and M Gheata Recent citations - Geant4 VMC 3.0 I Hivnáová and A Gheata - An Apparatus for Studying Spallation Neutrons in the Aberdeen Tunnel Laboratory S.C. Blyth et al - The Geant4 Virtual Monte Carlo I Hivnáová This content was downloaded from IP address 148.251.232.83 on 20/06/2018 at 03:38

The Virtual Geometry Model Ivana Hřivnáčová Institut de Physique Nucléaire, 91406 Orsay Cedex, France E-mail: ivana@ipno.in2p3.fr Brett Viren Brookhaven National Lab, P.O. Box 5000, Upton, NY 11973-5000, USA E-mail: bv@bnl.gov Abstract. The Virtual Geometry Model (VGM) was introduced at CHEP in 2004 [1], where its concept, based on the abstract interfaces to geometry objects, has been presented. Since then, it has undergone a design evolution to pure abstract interfaces, it has been consolidated and completed with more advanced features. Currently it is used in Geant4 VMC for the support of TGeo geometry definition with Geant4 native geometry navigation and recently it has been used in the validation of the G4Root tool. The implementation of the VGM for a concrete geometry model represents a small layer between the VGM and the particular native geometry. In addition to the implementations for Geant4 and Root TGeo geometry models, there is now added the third one for AGDD, which together with the existing XML exporter makes the VGM the most advanced tool for exchanging geometry formats providing 9 ways of conversions between Geant4, TGeo, AGDD and GDML models. In this presentation we will give the overview and the present status of the tool, we will review the supported features and point to possible limits in converting geometry models. 1. Introduction At present, there are several geometry modelers of interest for the physicists in HEP community: The geometry modeller [2] in Geant4 [3] - naturally utilized by many Geant4 users. The geometry modeller TGeo [4] in Root [5] - coming later, disconnected from any simulation tools. Used in the context of Virtual Monte Carlo [6]. GDML (the geometry description markup language) [7] - an application-independent geometry description based on XML. Used mainly for providing persistence for Geant4 geometry model. AGDD (the Atlas geometry detector description) [8] - another geometry description based on XML. It was developed by the Atlas collaboration, however it was abandoned. It has been adopted and further developed in the STAR collaboration and recently adopted in the Daya Bay collaboration, in both for primary geometry implementation. Both GDML and AGDD formats are supported in the GraXML tool [9]. c 2008 IOP Publishing Ltd 1

Each geometry model provides a set of tools for geometry verification and visualization. The VGM development aims to provide the user the possibility to use all the available tools regardless their primary geometry format. 2. Architecture 2.1. The VGM concept The Virtual Geometry Model (VGM) has been developed as a generalization of the existing converters roottog4, g4toxml provided within Geant4 VMC [10], when new directions: g4toroot, roottoxml were asked for by users. Instead of adding other one-way converters and multiplying the implementations, the abstract layer to geometry has been defined and the geometry models have been mapped to this generalized scheme. Once this is done, the geometry objects in these integrated models can be handled in the same way. This new concept is demonstrated in Fig. 1 Figure 1. The VGM concept 2.2. Packages All VGM packages are shown in Fig. 2 together with their dependencies on the external software. Since the VGM first release, decribed already in detail at [1], the VGM design has been reviewed and the packages have been cleaned up from unnecessary dependencies. The VGM package now includes only the abstract interfaces and does not depend on any external package. 2

Figure 2. The VGM packages All common implementation has been moved from the VGM package in BaseVGM and the CLHEP dependent code in the utility package ClhepVGM. The implementation of the VGM for a concrete geometry model represents a layer between the VGM and the particular native geometry. At present, the complete implementation is provided for the Geant4 [2], and the Root TGeo [4] geometry models, and there is now being added the third implementation for AGDD [8]. The dependence on the particular geometry models is hence restricted only to its VGM geometry specific package. Besides the geometry model specific packages, the VGM provides also the XML exporter, which is included in its own package, XmlVGM and does not bring dependency on any external software. With applying the new design the class name prefixes were replaced with namespaces. A unique namespace was introduced for each package, with the name equal to the name of the package. 2.3. Interfaces to geometry objects The interfaces to geometry objects were defined with the intention to be suitable for a desription of geant-like geometries with a hierarchical volume structure. The basic entities sufficient for such geometry description have been identified: solid, volume and placement to describe volumes hierarchies; and isotope, element, material and medium to describe material properties. The solid and placement entities can have more specifications. In case of the solid it is reflected by introducing a specific interface for each solid type (box, tubs, cons,...), while in the 3

placement case, both types introduced (simple placement and multiple placement) are described with a single interface. The class diagram for the VGM implementation of the box object, see Fig. 3, demonstrates the mapping between the objects in the native geometry and the interfaces introduced in the VGM. The same approach has been applied to the other geometry entities. In case a common implementation of some functions (imposed by the interface) is wanted, an abstract base class providing this implementation is defined first in the BaseVGM package and the class in the VGM layer for a particular geometry model makes a specification of this abstract base class. Figure 3. The class diagram of the box solid in the VGM 2.4. Abstract factories The VGM abstract factories, VGM::IFactory and VGM::IMaterialFactory, provide functions for geometry construction, import and export. While the functions for geometry construction and import are specific to a geometry and have to be provided by the geometry specific layers, the export function could be implemented in a common way and is provided in the BaseVGM package (classes BaseVGM::VFactory, BaseVGM::VMaterialFactory). The class diagram for the VGM factories is shown in Fig. 4 3. Use of VGM 3.1. Geometry conversions To convert native geometry from one geometry model to another, the geometry has to be first imported in the VGM (the native geometry objects are mapped to the VGM interfaces) using 4

Figure 4. The class diagram of the VGM factories the concrete VGM factory for this geometry model, and then exported using the VGM factory for the other geometry model. At present, the implemented VGM packages provide the following ways: AGDD -> Geant4, Root, GDML Geant4 -> AGDD, Root, GDML Root -> AGDD, Geant4, GDML The GDML import is not available. In Example 1 the conversion of geometry from Geant4 to Root is demonstrated. 3.2. Use of VGM factory and interfaces The VGM can be used to define geometry independently from a concrete geometry model. The abstract VGM factories provide a complete set of create functions which can be used to define user geometry. The concrete geometry model will then be chosen with the instantiation of the concrete factory. The VGM interfaces to geometry objects make also possible to define a geometry application, eg. for visualization, based on the VGM, which can be then run with all supported geometry models. 5

Example 1. Converting geometry from Geant4 to Root via the VGM #include Geant4GM/volumes/Factory.h #include RootGM/volumes/Factory.h #include TGeoManager.h // Import Geant4 geometry to VGM Geant4GM::Factory g4factory; g4factory.import(physiworld); // where physiworld is of G4VPhysicalVolume* type // Export VGM geometry to Root Root::Factory rtfactory; g4factory.export(&rtfactory); ggeomanager->closegeometry(); return rtfactory.world(); // returns Root top volume of TGeoVolume* type 3.3. Export to XML The VGM geometry can be exported to XML in the AGDD [8] or GDML [7] format. Complying with the XML schema is embedded in the VGM XML exporter code itself, no external XML parser is then needed. This is demonstrated in Example 2. Example 2. Exporting geometry from the VGM factory in XML (AGDD, GDML) #include XmlVGM/AGDDExporter.h XmlVGM::AGDDExporter agddexporter(&thefactory); agddexporter.generatexmlgeometry(); // Export geometry to AGDD #include XmlVGM/GDMLExporter.h XmlVGM::GDMLExporter gdmlexporter(&thefactory); gdmlexporter.generatexmlgeometry(); // Export geometry to GDML 4. Testing The same simple geometry setups are defined via AGDD, Geant4, Root and VGM to test different aspects of the VGM: Solids, Placements, Reflections, Boolean Solids and Assemblies (see Fig. 5, Fig. 6, Fig. 8, Fig. 7 and Fig. 9 ). The test program can be then configured by a list of arguments to select the input geometry type, the selected geometry setup and the destination geometry model or XML output. It includes also options to run a test with Geant4 tracking and with G4Root navigation [11]. 6

International Conference on Computing in High Energy and Nuclear Physics (CHEP 07) IOP Publishing Figure 5. The geometry setup to test solids. It includes all solids supported in VGM. The bottom row (from left to right): box, elliptical tube, polycone, sphere, generic trapezoid, tube, extruded solid. The upper row: cone, parallellepiped, polyhedra, torus, trapezoid, cut tube, extruded solid with adjacent zsections. Figure 6. The geometry setup to test placements. A box with division including one more box layer is placed in a regular pattern. Figure 7. The geometry setup to test Boolean solids. The boolean intersection, subtraction and union is applied to box and cone solids with the same displacement transformation. Figure 8. The geometry setup to test reflections. All solids from the Solids test are placed once more with reflection. Figure 9. The geometry setup to test assemblies. Taken from Root tutorials. The testing procedure has been automated in three suite shell scripts, which execute the test program with all possible combinations of parameters and generate the output that can be compared with the reference output. The following test suites are available: Suite 1 - geometry import and export with verbosity output 7

Suite 2 - XML export from all possible inputs Suite 3 - Geant4 tracking with Geant4 native navigation and G4Root navigation with verbose output. The GPS [12] source of geantinos tuned for each geometry setup with a fixed random number seed is used. The test program can be also run with a user defined geometry and the comparison of the outputs from tracking with Geant4 native and G4Root navigation turned out to be very efficient for geometry debugging. 5. Examples As the test program, being written for the purpose of testing all aspects, is rather complex, five simple examples demonstrating use of the VGM for converting native geometries are provided. The summary of the use cases demonstrated in these examples is given in Table 3. Table 3. Summary of examples Use case Geometry source E1 G4 -> Root Geant4 novice example N03 E2 Root -> G4 Root file with geometry generated in E1 E3 G4 -> XML Geant4 novice example N03 E4 Root -> XML Root tutorial macro rootgeom.c E5 AGDD -> Root AGDD test file 6. Building systems The VGM provides three independent building systems which makes it easy to include it in various frameworks: The first building system is based on GNU makefiles [13], adapted from Geant4 [3]. CMT [14] - The VGM has been ported to CMT thanks to Laurent Garnier, LAL, who takes care of maintenance of the CMT requirements files and as well as of testing on MacOS platform. Autoconf [15] - the autoconf building system was introduced with adding the AgddGM package. 7. Present status 7.1. Features supported in VGM The VGM supports most of advanced features present in both Geant4 and Root geometry models: Large number of solids - all CSG solids and number of specific solids in Geant4 and their counterparts in Root Boolean solids (Geant4) and composite shapes (Root) Reflected solids (Geant4) and positioning with reflection (Root) Multiple placements - replicas, divisions (Geant4), divisions (Root) Assemblies (Root) Not supported: 8

Exotic solids - solids that have no counterpart in the other geometry model or recently added solids not yet required by any user Parameterised volumes (Geant4) Positions with the MANY option (Root) 7.2. Present status of packages Geant4GM, RootGM - Both VGM implementations for Geant4 and Root geometry models are complete, all VGM interfaces are implemented. AgddGM - The implementation started by the end of 2006. The interfaces to the geometry objects and the factory import function are implemented, the factory create functions, used in export, still have to be developed. It should be noted that the implementation is based on the AGDD v6, what was decided by Daya Bay collaboration, while the AGDD exporter is based on the newer, AGDD v7 version. XmlVGM - XML exporter GDML - All solids are supported, missing export of reflections and multiple placements. AGDD - All features are implemented, only some solids are not supported in AGDD. The current version of the VGM tool is available at [16]. 8. Conclusions The VGM introduces a general approach for access to geometries of specific geometry models (Geant4, Root TGeo, AGDD, GDML) and for their conversion. This gives a possibility for a user of one specific package to use the tools supported by other packages. It also provides a gateway for a geometry based application independent from a concrete geometry model. The VGM allows the user first to define the geometry independently from a concrete geometry model, and then to choose the concrete geometry model at run time, though this use case was not the primary goal of this tool. The VGM is used in Geant4 VMC [10] to support user geometry defined via Root geometrical modeller with Geant4 native navigation. It has been also used in G4Root [11] validation on a subset of the ALICE geometry. References [1] Hřivnáčová I 2004 Proc. of Computing in High Energy and Nuclear Physics (Interlaken) Id 387 [2] Cosmo G. et al 2006 Proc. of Computing in High Energy and Nuclear Physics (Mumbai) Id 257 [3] Agostinelli S et al 2003 Nucl. Instrum, and Methods A506 250-303 [4] Brun R, Gheata A and Gheata M 2003 Proc. of Computing in High Energy and Nuclear Physics (La Jolla) Id THMT001 [5] http://root.cern.ch [6] Hřivnáčová I et al 2003 Proc. of Computing in High Energy and Nuclear Physics (La Jolla) Id THJT006 [7] Chytracek R 2001 Proc. of Computing in High Energy and Nuclear Physics (Beijing) Id 8-009 [8] Arnault Ch et al 2001 Proc. of Computing in High Energy and Nuclear Physics (Beijing) Id 8-001 [9] Hřivnáč J 2003 Proc. of Computing in High Energy and Nuclear Physics (La Jolla) Id THJT009 [10] Hřivnáčová I 2007 Computing in High Energy and Nuclear Physics Id 126 [11] Gheata A and Gheata M 2007 Computing in High Energy and Nuclear Physics Id 38 [12] http://reat.space.qinetiq.com/gps/ [13] http://www.gnu.org/software/make/ [14] http://www.cmtsite.org/ [15] http://www.gnu.org/software/autoconf/ [16] http://ivana.home.cern.ch/ivana/vgm.html 9