W. Pokorski - EP/SFT Simulation Project1 GDML - recent developments Witek Pokorski 29.11.2004.

Slides:



Advertisements
Similar presentations
XML Schema Heewon Lee. Contents 1. Introduction 2. Concepts 3. Example 4. Conclusion.
Advertisements

Artificial Neural Networks And XML
XML: text format Dr Andy Evans. Text-based data formats As data space has become cheaper, people have moved away from binary data formats. Text easier.
XML & Data Structures for the Internet Yingcai Xiao.
what is VA? advantages tools a b c what is VA? advantages tools fully integrated architectural plug-in for Rhino 4 powerful feature-based editor to create.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
ModelicaXML A Modelica XML representation with Applications Adrian Pop, Peter Fritzson Programming Environments Laboratory Linköping University.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
Geometry III Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
XML October 24, Unit 6. What is XML? Stands for eXtensible Markup Language It is a markup language, like HTML But, –XML is designed to markup data –HTML.
Victor Serbo, SLAC30 September 2004, Interlaken, Switzerland JASSimApp plugin for JAS3: Interactive Geant4 GUI Serbo, Victor (SLAC) - presenter Donszelmann,
Jennifer Widom XML Data XML Schema. Jennifer Widom XML Schema “Valid” XML Adheres to basic structural requirements  Also adheres to content-specific.
Witek Pokorski, Radovan Chytracek, Jeremy McCormick, Giovanni Santin
RMS Importer/Exporter Create configuration for the MedAustron Control System PP a-ABR_RMSImporterExporter.pptm abrett/mmarchha RMS Importer/Exporter.
By: Shawn Li. OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and.
XML I/O in ROOT S. Linev, R. Brun, H.G. Essel CHEP 2004.
Overcoming the limitation of XML Documentation Type Definition XML schema generator CS689 Hae-Soon Kwon 11/16/2000.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML Extensible Markup Language. Markup Languages u What does this number (100) mean? –Actually, it’s just a string of characters! –A markup language can.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
Conditions DB in LHCb LCG Conditions DB Workshop 8-9 December 2003 P. Mato / CERN.
Emmanuel Delage LPC Clermont – IN2P3/CNRS – Clermont Université
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
Updating JUPITER framework using XML interface Kobe University Susumu Kishimoto.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
W. Pokorski - CERN Simulation Project1 Python binding for Geant4 toolkit using Reflex/PyROOT tool Witek Pokorski EuroPython 2006, CERN, Geneva
XML in Atlas: from generic to parametric detector description Stan Bentvelsen NIKHEF Amsterdam XML workshop, CERN, May 22.
Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI,
SIMO SIMulation and Optimization ”New generation forest planning system” Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Virtual Monte Carlo and new geometry description in STAR Maxim Potekhin STAR Collaboration Meeting, BNL July 17, 2004 July 17, 2004.
Jump to first page The new ROOT geometry package Andrei Gheata - ALICE Institute of Space Sciences, Bucharest.
GDB Meeting - 10 June 2003 ATLAS Offline Software David R. Quarrie Lawrence Berkeley National Laboratory
Using of XML for object store S. Linev, GSI Using of XML for object store. S.Linev2 Content XML and existing packages XML and existing packages.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
SIMO Python/XML Simulator Current situation 28/10/2005 SIMO Seminar Antti Mäkinen Dept. of Forest Resource Management / University of Helsinki.
Proposal for a Geometry Manager in The Beast Proposal for a Geometry Manager based upon GDML G. Cerati, S. Magni, D. Menasce.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
STATUS OF THE UNIFIED SOLIDS LIBRARY Gabriele Cosmo/CERN Tatiana Nikitina/CERN.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Outline  Developments/fixes in the last year  Introduced in release 9.6 and patches  Planned for release 10.0 and ongoing …  Currently under development.
GlueX Computing GlueX Collaboration Meeting – JLab Edward Brash – University of Regina December 11 th -13th, 2003.
GDML “Geometry Description Markup Language” by Daniele Francesco Kruse University of Rome “Tor Vergata” European Organization for Nuclear Research.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
- GDML - ROOT I/O for Geant4 - General Suggestions SFT Program of Work Meeting Witek Pokorski 03/03/2010.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
GEANT4 Geometry Status & Plans
Status of the development of the Unified Solids library Marek Gayer, CERN PH/SFT 2 nd AIDA Annual Meeting, Frascati 2013.
STATUS OF GDML SUPPORT IN ROOT A.Gheata SFT group meeting, June 2, 2014.
New features in ROOT geometrical modeller for representing non-ideal geometries René Brun, Federico Carminati, Andrei Gheata, Mihaela Gheata CHEP’06,
Modularization of Geant4 Dynamic loading of modules Configurable build using CMake Pere Mato Witek Pokorski
CERN, 7 November 2011 Anton Pytel Slovak Technical University TRIP FROM GENERATORS TO GEOMETRIES.
Ben Lloyd 1 New Developments in GDML and in Generator Services Ben Lloyd University of the West of England, Bristol, UK
The Object-Oriented Thought Process Chapter 11
Complex Geometry Visualization TOol
XML QUESTIONS AND ANSWERS
European Organization for Nuclear Research
A C++ generic model for the GLAST Geometric Description
Geant4 Geometry Objects Persistency using ROOT
HEP detector description supporting the full experiment life cycle
Ideas for G4 navigation interface using ROOT geometry
XML in LHCb Detector Description Framework Radovan Chytracek CERN
Geometry checking tools
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Various News From Detector Description
Simulation Framework Subproject cern
G4 Workshop 2002 Detector Description Parallel Session
WIRED 4 Event Display Linear Collider Simulation Workshop
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Presentation transcript:

W. Pokorski - EP/SFT Simulation Project1 GDML - recent developments Witek Pokorski

W. Pokorski - EP/SFT Simulation Project 2 Outline Some background info GDML Schema GDML readers/writers Some examples Conclusion

W. Pokorski - EP/SFT Simulation Project 3 GDML - historical background… GDML stands for Geometry Description Markup Language first appearance around year 2000 (?) activity started by Radovan Chytracek -until ~May 2004 all work done by Radovan initial frame: XML based geometry description for Geant4 motivation: -move away from hardcoded geometry -enable geometry interchange between different applications discussed at 'Geometry Description' Requirement Technical Assessment Group (R TAG), became 'LCG- supported' project in October 2003 presently part of the Simulation Framework subproject (Simulation Project), as the geometry interchange format workpackage

W. Pokorski - EP/SFT Simulation Project 4 GDML - ideological background… GDML designed as an application of XML purpose of GDML is to describe data »to dump geometry data »not procedural, but markup language format has to be application independent »there is nothing more universal than an ASCII file 'human-readability' is a big advantage »there is nothing more readable than an ASCII file… should be easily extensible and modular

W. Pokorski - EP/SFT Simulation Project 5 GDML - technical background… GDML is defined through XML Schema (XSD) -XSD = XML based alternative to Document Type Definition (DTD) -defines document structure and the list of legal elements -XSD are in XML -> they are extensible valid GDML document conforms to GDML schema GDML would be useless without I/O… C++ implementation of GDML processor was started (by Radovan) in parallel to GDML Schema -allows writing-out GDML data to a stream -uses Xerces-C SAX parser to create 'in-memory' representation of the geometry description -allows easy bindings to different applications (Geant4, ROOT) alternative Python-based processing architecture under development -uses xml.sax Python module -allows very light binding to applications

W. Pokorski - EP/SFT Simulation Project 6 GDML Schema

W. Pokorski - EP/SFT Simulation Project 7 GDML Schema - structure (1/2) located in $GDML_BASE/GDMLSchema/ top level file: gdml_X.Y.xsd defines the general structure of GDML document -specifies the geometry tree implementation includes -gdml_simple_core.xsd (core types - vectors, etc) -gdml_simple_defines.xsd (constants, positions, rotations, etc) -gdml_simple_materials.xsd (elements, isotopes, materials, etc) -gdml_simple_solids.xsd (all supported solids) -gdml_simple_replicas.xsd (replicas, divisions, etc) -gdml_simple_parameterised.xsd (parameterised volumes)

W. Pokorski - EP/SFT Simulation Project 8 GDML Schema - structure (2/2) … … … …

W. Pokorski - EP/SFT Simulation Project 9 GDML Schema - status about to release GDML_2.0.0 core, defines, materials schema - complete solids supported: -box, sphere (G4Sphere and G4Orb), tube, cone, polycone, parallepiped, trapezoid (G4Trap and G4Trd), torus, polyhedra, hype (tube with hyperbolic profile), elliptical tube -boolean solids: -union, subtraction, intersection assembly volumes supported replicas and divisions (on their way) parameterised volumes (position, rotation and size) -gradually adding parameterisation capability for all the solids

W. Pokorski - EP/SFT Simulation Project 10 Parameterised volumes in GDML how could we persistify parameterisation algorithms? the only (?) way: to dump the parameters as a table -we cannot 'guess' the form of the function, we can only dump the values while reading back GDML we instantiate 'tabularised' parameterisation algorithm -although the 'algorithm' changes with respect to the original one the resulting parameterised volume should be identical this is in the context of GDML as exchange/persistency format -to use GDML for geometry implementation ('by hand') some 'predefined' algorithms will be provided (for ex. linear)

W. Pokorski - EP/SFT Simulation Project 11 Parameterisation example

W. Pokorski - EP/SFT Simulation Project 12 GDML Readers/Writers

W. Pokorski - EP/SFT Simulation Project 13 GDML reader - structure Application (ROOT, G4) GDML XML Engine (SAX) Application binding (ROOT, G4) XML Schema purpose: to (re)create the transient representation of geometry tree most logic in application- independent part light application- depended bindings create material, volume, etc… give pointer to world volume

W. Pokorski - EP/SFT Simulation Project 14 GDML reader - status C++ implementation: application-independent part complete for the present schema application-dependent part: -complete for Geant4 -on its way for ROOT… runs on rh73_gcc323, Cygwin, Mac OS X Python implementation: see next slides…

W. Pokorski - EP/SFT Simulation Project 15 GDML writer - structure purpose: to persistify the geometry description in the form of GDML file application independent part generating XML -'cursors' for materials, solids, structure, etc 'light' application dependent bindings -scanning the geometry tree and adding elements to the 'cursors' Application Application binding (scanning tree) Document Builder dump geometry GDML add volume, etc write document

W. Pokorski - EP/SFT Simulation Project 16 GDML writer - status C++ implementation: application-independent part complete for the present schema application-dependent part: -complete for Geant4 -on its way for ROOT… runs on rh73_gcc323, Cygwin, Mac OS X Python implementation: next item on my 'to do' list…

W. Pokorski - EP/SFT Simulation Project 17 GDML - example use (G4) to write: #include "WriterG4/G4GDMLWriter.h" G4GDMLWriter g4writer("GDMLSchema/gdml_2.0.xsd", "g4test.gdml"); try { g4writer.DumpGeometryInfo(g4worldvolume); } catch(std::logic_error &lerr) { std::cout << "Caught an exception: " << lerr.what () << std::endl; } to read: SAXProcessor sxp; sxp.Initialize(); ProcessingConfigurator config; config.SetURI( "g4test.gdml" ); config.SetSetupName( "Default" ); sxp.Configure( &config ); sxp.Run() fWorld = (G4VPhysicalVolume *)GDMLProcessor::GetInstance()->GetWorldVolume();

W. Pokorski - EP/SFT Simulation Project 18 GDML processing - performance GDML G4reader/G4writer (C++) tested on complete LHCb geometry parts of ATLAS geometry -problem with full ATLAS geometry - use of custom solids for LHCb geometry ( ~5000 single placements, ~20 million 'real' vols.) writing out ~10 seconds (on P4 2.4GHz) reading in ~ 5 seconds file size ~2.7 Mb (~40k lines) also successfully tested G4->GDML->G4->ROOT for G4->ROOT, converter by Ivana Hrivnacova used

W. Pokorski - EP/SFT Simulation Project 19 GDML reader/writer revisited Python - an interesting alternative to C++ for implementing the GDML processing code dealing with XML in Python much easier (less code needed) Python very good for 'glueing' different applications together very easy interaction with C++ objects through: -PyROOT for ROOT classes -LCGDict/PyLCGDict for Geant4 classes (or any other C++ classes)

W. Pokorski - EP/SFT Simulation Project 20 PyGDML - status first implementation of GDML->ROOT reader ready uses xml.sax Python module uses PyROOT for accessing ROOT classes application-specific part very small (~150 lines of Python) -Geant4 binding ready in a day or two… works for full LHCb geometry GDML file -> 'in-memory' ROOT TGeo next task: ROOT->GDML writer

W. Pokorski - EP/SFT Simulation Project 21 PyGDML - example (ROOT) import xml.sax import ROOT import GDMLContentHandler ROOT.gSystem.Load("libGeom") geomgr = ROOT.TGeoManager("World","GDMLGeo") gdmlhandler = GDMLContentHandler.GDMLContentHandler() xml.sax.parse('test.gdml',gdmlhandler) geomgr.SetTopVolume(gdmlhandler.WorldVolume()) geomgr.CloseGeometry() gdmlhandler.WorldVolume().Draw() Python SAX parser PyROOT GDML-specific parser extension Standard TGeo GDML parsing get world volume from GDMLContentHandler

W. Pokorski - EP/SFT Simulation Project 22 Example use case someone provides: 1.testbeam geometry exported to GDML 2.dictionary for sensitive detector implementation created with LCGDict (so one can instantiate it in Python and associate it to the specific volume ) someone else uses it to: 1.load geometry in Python 2.run Geant4 in Python this comes almost for free using PyLCGDict/LCGDict 3.run other simulation using VMC (?) 4.plot different distributions with ROOT (using PyROOT) 5.and/or check for overlaps in geometry with ROOT

W. Pokorski - EP/SFT Simulation Project 23 Conclusions there is no doubt about the need to have a geometry exchange format GDML - good candidate universal format (ASCII…) human-readable extensible interest in GDML from many places motivating and proving usefulness Python interfacing provides flexibility high priority given to GDML in LCG Simulation Framework subproject development of Geant4 and ROOT bindings will continue with regular releases