Download presentation
Presentation is loading. Please wait.
Published byBarbra Blair Modified over 8 years ago
1
Ben Lloyd 1 New Developments in GDML and in Generator Services Ben Lloyd University of the West of England, Bristol, UK 11.04.2007
2
Ben Lloyd2 Outline What have I been working on all year? GDML Geant4 Binding to GDML ROOT Binding to GDML GDML Main Package Updates Generator Services subproject
3
Ben Lloyd3 GDML
4
Ben Lloyd4 What is GDML? Geometry Description Markup Language “Providing a means to share Geometry Information among applications” XML is used to provide: -An application independent format -Also architecture & platform independent -Extensible and Modular friendly -The ability to use standard I/O to read/write GDML -Easy to edit GDML files
5
Ben Lloyd5 GDML Currently.. Geant4ROOT G4Box box = new G4Box; G4PhysicalVolume = … … TGeoBBox box = new TGeoBBox; TGeoVolume = … … GDML Currently has good bindings to Geant4 and ROOT. Allowing import or export of GDML to/from these formats. GDML File GDML
6
Ben Lloyd6 Geant4 Binding to GDML
7
Ben Lloyd7 Supported Solids The final solids supported by Geant4 were added to the GDML Geant4 Binding.. This process consists of: Add solid to GDML Schema Adding Subscribers to read/convert GDML to Geant4 objects Adding G4 Processors to read Geant4 code and convert to GDML
8
Ben Lloyd8 Auxiliary Tag The auxiliary tag in GDML is there to carry information inside GDML volumes that is not widely supported. Information such as… Sensitive Detector Information Geometry colours An ‘aux pair’ consists of the type and value:
9
Ben Lloyd9 Auxiliary Tag This sits within a GDML volume like so: You can use the auxiliary tag as many times as you like in a volume. The tag was in the schema but user had no access to it.
10
Ben Lloyd10 Auxiliary Tag map > > The above map is populated during import of a GDML file. The current volume’s pointer is used as the key Each volume has a vector of aux pairs GDMLProcessor::AuxiliaryPairsMap* GetAuxiliaryMap(); vector >* GetAuxVector(G4LogicalVolume* auxvol);
11
Ben Lloyd11 Definition of Rotations GDML allows the definition of a position (x,y,z) and also it’s rotation. A rotation is also defined using x, y and z. Natively these values are resolved from a 3x3 matrix. I am currently extending GDML to allow the definition of a rotation through a 3x3 matrix.
12
Ben Lloyd12 Definition of Rotations This was previously restricted to: Soon to be available in addition to above… As matrices can already be defined independently, the author will be able to directly reference to a previously defined 3x3 matrix: Also the ability to directly define a new 3x3 matrix within the rotation definition: <matrix name=“new_matrix” xx=“-1” xy=“1” xz=“1” yx=“1” yy=“-1” yz=“1” zx=“1” zy=“1” zz=“-1” />
13
Ben Lloyd13 GDML Installation Previously the GDML package did not guide you through installation. It had: Default script in CVS for CERN installation: User to modify by hand configure switches in this script Somewhat unclear to the user what switches they could & couldn’t change For external installation, the script would need to be completely modified
14
Ben Lloyd14 GDML Installation A New script was created to collect information from the user including path’s to dependencies, enable features etc. By running the script, it will do the following: Requests user input (paths, options etc) Creates MyConfigure.(c)sh from this -This can be used in the future for clean installation Runs MyConfigure.(c)sh Issues make Issues make install (if required) Installation Complete!
15
Ben Lloyd15 GDML Installation Preview of script..
16
Ben Lloyd16 GDML Manual Previous revision barely existed, had not even been published. New Manual now represents GDML Package in its entirety. Small contributions from other authors. Now available from http://cern.ch/gdmlhttp://cern.ch/gdml
17
Ben Lloyd17 Current Status of GDML G4 Installation of GDML in one easy step ALL G4 Solids now supported and implemented Auxiliary information accessible Definition of volume/geometry rotations through matrices GDML Manual now up-to-date and accessible
18
Ben Lloyd18 XersesC GDML Common Geant4 Binding What’s Next for G4 GDML Remove G4 Binding from GDML Installation Fully integrate GDML G4 bind in Geant4 Make GDML Package stand-alone Geant4 Installation GDML PackageGDML Package
19
Ben Lloyd19 ROOT Binding to GDML
20
Ben Lloyd20 ROOT -> GDML The ROOT to GDML binding is implemented in python. Converts geometry imported into ROOT into GDML and outputs a GDML file. Was found to be incredibly slow. An optimisation of the python code done by Daniele Kruse (summer student) and myself reduced export times significantly. Example Times:ATLAS: 255 sec (previously 4707 sec) LHCb: 12 sec (previously 15 sec) ALICE: 129 sec (previously 620 sec) Times will vary with machine performance. All other detectors showing similar results, reductions not consistent based on detector geometries being structured differently
21
Ben Lloyd21 ROOT -> GDML GDML’s export from ROOT has been extended to now support… Assembly Volumes Division Volumes Reflected Volumes All ROOT solids
22
Ben Lloyd22 GDML -> ROOT Originally implemented in Python. No optimisation could resolve the fact that to import GDML to ROOT was too SLOW! Completely re-developed from scratch in C++. Fully integrated into ROOT as GDML library.
23
Ben Lloyd23 GDML -> ROOT Before building ROOT use:./configure --enable-gdml To import a GDML file to ROOT root [0] TGeoManager::Import(“test.root”) root [1] TGeoManager::Import(“test.gdml”)
24
Ben Lloyd24 GDML-> ROOT Using ROOT’s built in viewer, here is CMS after being imported from a GDML file using the new GDML Importer…
25
Ben Lloyd25 GDML -> ROOT On completion of the import the GDML geometry will be fully converted into ROOT format and in memory. Excellent improvements on import time also seen here. Example Times:CMS: 27 sec (previously 390 sec) LHCb: 6 sec (previously 37 sec) ATLAS: 103 sec (previously ~1900 sec) BABAR: 17 sec (previously 102 sec) As with the Export, same reasons apply for inconsistency.
26
Ben Lloyd26 Current Status of GDML ROOT GDML Export optimised and remains as a Python implementation GDML Import re-done in C++ and now fully integrated into the ROOT framework -Supports new features such as Modular GDML files GDML’s interaction with ROOT now has significantly reduced processing times All ROOT solids supported for Import and Export of GDML
27
Ben Lloyd27 Generator Services Subproject
28
Ben Lloyd28 Pythia8 Online Manual Pythia8 has an online manual which contains an extensive list of parameters to construct a configuration file from.. The author wanted to make this list interactive so the user could pick options, change defaults and the result… Your own customised configuration file!
29
Ben Lloyd29 Pythia8 Online Manual Currently the author had this in place: The webpage content in XML files Converted the XML to HTML using a C++ program My task was to change this C++ program to convert the XML into an interactive web page manual The solution was using PHP, a server-side web scripting language…
30
Ben Lloyd30 Pythia8 Online Manual The HTML version..
31
Ben Lloyd31 Pythia8 Online Manual The PHP version…
32
Ben Lloyd32 Pythia8 Online Manual Once the user finished customising their file, it would generate the file on the web-server and they can download it..
33
Ben Lloyd33 Pythia8 Online Manual
34
Ben Lloyd34 Requests from Generator Authors for an online FAQ page for their generator The solution was using -A web based Wiki tool -Can provide easy online editing for the authors -FAQ’s can be structured within categories -Removes the administration responsibility from Generator Services as opposed to a ‘home-made’ solution Generator Services FAQ
35
Ben Lloyd35 Generator Services FAQ We now have in place: A template for each Generator’s FAQ homepage that can be replicated for new Generators A How-To guide containing all the need to know information for an author to create their FAQ Each FAQ will provide: -FAQ Search Engine -Simple rules & syntax for editing -Ability to attach documents to an FAQ (Images, PDF’s,.ppt etc.) -Daily Email Notification (for changes) -RSS subscription -User Submission for questions not in the FAQ -Revision control
36
Ben Lloyd36
37
Ben Lloyd37 In Conclusion GDML/Geant4 binding -Now Complete to support full range of G4 solids -Extended functionality -GDML Installation is now one smooth process GDML/ROOT binding: -Import/Export times significantly shortened. -Fully integrated within ROOT -Now supports almost the complete GDML Schema Pythia8 now has a fully interactive webpage/manual to generate setup script Generator Services FAQ is now up and running
38
Ben Lloyd38 And finally… Thank You!!! My Supervisor - Witek Pokorski For all the support and help you have given me during my time at CERN.
39
Ben Lloyd39 Any Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.