1 / 39

New Developments in GDML and in Generator Services

New Developments in GDML and in Generator Services. Ben Lloyd University of the West of England, Bristol, UK 11.04.2007. 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. GDML.

akea
Download Presentation

New Developments in GDML and in Generator Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. New Developments in GDML and in Generator Services Ben Lloyd University of the West of England, Bristol, UK 11.04.2007

  2. 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. GDML

  4. 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. Geant4 ROOT GDML GDML Currently.. 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

  6. Geant4 Binding to GDML

  7. 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. 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: <auxiliary auxtype="SensDet" auxvalue="veloSD1"/>

  9. Auxiliary Tag This sits within a GDML volume like so: <volume name="World" > <materialref ref="Air" /> <solidref ref="Box" /> <physvol> <volumeref ref="Boxvol" /> <positionref ref="R" /> <rotationref ref="V" /> </physvol> <auxiliary auxtype="SensDet" auxvalue="veloSD1"/> </volume> You can use the auxiliary tag as many times as you like in a volume. The <auxiliary/> tag was in the schema but user had no access to it.

  10. Auxiliary Tag map < G4LogicalVolume*, vector<pair<string, string>> > • 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<pair<string, string>>* GetAuxVector(G4LogicalVolume* auxvol);

  11. 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. Definition of Rotations This was previously restricted to: <rotation name=“oldrot” x=“0.5” y=“-1” z=“1” unit=“rad”/> 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: <rotation name=“newrot1”> <matrixref ref=“old_matrix”/> </rotation> Also the ability to directly define a new 3x3 matrix within the rotation definition: <rotation name=“newrot2” unit=“rad”> <matrix name=“new_matrix” xx=“-1” xy=“1” xz=“1” yx=“1” yy=“-1” yz=“1” zx=“1” zy=“1” zz=“-1” /> </rotation>

  13. 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. 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 • Issuesmake • Issuesmake install (if required) Installation Complete!

  15. GDML Installation Preview of script..

  16. 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/gdml

  17. 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. XersesC GDML Common Geant4 Binding What’s Next for G4<->GDML Geant4 Installation GDML Package • Remove G4 Binding from GDML Installation • Fully integrate GDML <-> G4 bind in Geant4 • Make GDML Package stand-alone

  19. ROOT Binding to GDML

  20. 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. ROOT -> GDML GDML’s export from ROOT has been extended to now support… • Assembly Volumes • Division Volumes • Reflected Volumes • All ROOT solids

  22. 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. 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. GDML-> ROOT Using ROOT’s built in viewer, here is CMS after being imported from a GDML file using the new GDML Importer…

  25. 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. 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. Generator Services Subproject

  28. 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. 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. Pythia8 Online Manual The HTML version..

  31. Pythia8 Online Manual The PHP version…

  32. 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. Pythia8 Online Manual

  34. Generator Services FAQ • 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

  35. 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. 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

  37. And finally… Thank You!!! My Supervisor - Witek Pokorski For all the support and help you have given me during my time at CERN.

  38. Any Questions?

More Related