XML in LHCb Detector Description Framework Radovan Chytracek CERN

Slides:



Advertisements
Similar presentations
XML Document Type Definitions ( DTD ). 1.Introduction to DTD An XML document may have an optional DTD, which defines the document’s grammar. Since the.
Advertisements

ModelicaXML A Modelica XML representation with Applications Adrian Pop, Peter Fritzson Programming Environments Laboratory Linköping University.
Witek Pokorski, Radovan Chytracek, Jeremy McCormick, Giovanni Santin
LHCb Simulation Tutorial CERN, 21 st -22 nd February B 00 l e How to pass a detector geometry to.
LHCb Simulation Tutorial CERN, 21 st -22 nd February B 00 l e Detector Simulation and Geant4.
XML – what is it? eXtensible Markup Language Standard for publishing and interchange on the web and over the wire simpler version of SGML adapted to internet.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
Conditions DB in LHCb LCG Conditions DB Workshop 8-9 December 2003 P. Mato / CERN.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
Gaudi Framework Tutorial, XML The persistent world.
© GMV S.A., 2004 Property of GMV S.A. All rights reserved 2004/05/13 XML in CCSDS CCSDS Spring Meeting - Montreal Fran Martínez GMVSA 4081/04.
W. Pokorski - EP/SFT Simulation Project1 GDML - recent developments Witek Pokorski
XML in Atlas: from generic to parametric detector description Stan Bentvelsen NIKHEF Amsterdam XML workshop, CERN, May 22.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
The Persistency Patterns of Time Evolving Conditions for ATLAS and LCG António Amorim CFNUL- FCUL - Universidade de Lisboa A. António, Dinis.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Introduction CMS database workshop 23 rd to 25 th of February 2004 Frank Glege.
The GeoModel Toolkit for Detector Description Joe Boudreau Vakho Tsulaia University of Pittsburgh CHEP’04 Interlaken.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
WIRED Detector Description in XML Mark Dönszelmann, Applications for Physics and Infrastructure, IT, CERN XML Detector Description Workshop CERN, 14 April,
Hands on AGDD*: Atlas Generic Detector Description in XML
GenX- XML Mapping of GenCAM Andy Dugenske Andy Scholand Manufacturing Research Center Georgia Institute of Technology January 23, 1999.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
Detector Description in LHCb (Extended Version) Detector Description Workshop 4 July 2002 S. Ponce - CERN.
GLAST LAT Offline SoftwareCore review, Jan. 17, 2001 Review of the “Core” software: Introduction Environment: THB, Thomas, Ian, Heather Geometry: Joanne.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Detector Description in LHCb Detector Description Workshop 13 June 2002 S. Ponce, P. Mato / CERN.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
23/2/2000Status of GAUDI 1 P. Mato / CERN Computing meeting, LHCb Week 23 February 2000.
27 March 2003RD Schaffer & C. Arnault CHEP031 Use of a Generic Identification Scheme Connecting Events and Detector Description in Atlas  Authors: C.
Gloria Corti, CERN Credits to Chris Jones, Wouter Hulsbergen, Sajan Easo, Dima Popov Computing Workshop Online/Databases/Detector Description Session Paris.
1 Configuration Database David Forrest University of Glasgow RAL :: 31 May 2009.
Detector Description (Overview) C.Cheshkov. 25/9/2006Detector Description (C.Cheshkov)OutlineTerminology Overview on: Detector geometry implementation.
M.Frank, CERN/LHCb Persistency Workshop, Dec, 2004 Distributed Databases in LHCb  Main databases in LHCb Online / Offline and their clients  The cross.
Xml News Slide 1 S. Ponce, 21 June 2001 Detector description language news.
CERN, 7 November 2011 Anton Pytel Slovak Technical University TRIP FROM GENERATORS TO GEOMETRIES.
LHCb Software Week 25/11/99 Gonzalo Gracia Abril 1 r Status of Geant4 in LHCb. r Ideas on how to populate the LHCb Detector Description Data Base (LHCb.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
Extensible Markup Language (XML) Pat Morin COMP 2405.
New Xml Converters General presentation of Xml converters The old way
(on behalf of the POOL team)
New Xml Converters General presentation of Xml converters The old way
CMS High Level Trigger Configuration Management
XML Schema for WIRED XML Detector Description Workshop
Java XML IS
A C++ generic model for the GLAST Geometric Description
Handling Several Geometry Configurations in XML
Dirk Düllmann CERN Openlab storage workshop 17th March 2003
Markus Frank CERN/LHCb CHEP2013, Amsterdam, October 14th–18th 2013
HEP detector description supporting the full experiment life cycle
SW Architecture SG meeting 22 July 1999 P. Mato, CERN
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Detector Description in LHCb
Metadata The metadata contains
Simulation and Physics
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
G4 Workshop 2002 Detector Description Parallel Session
Detector Geometry Description
CSE591: Data Mining by H. Liu
GAUDI Detector Description News Radovan Chytracek 5/1/2019
The Calorimeter Detector Description
Detector description News
Event Storage GAUDI - Data access/storage Framework related issues
Andrea Valassi Pere Mato
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Presentation transcript:

XML in LHCb Detector Description Framework Radovan Chytracek CERN

Detector Description Overview Component of the Gaudi framework Inherits the Gaudi architecture decisions Detector description provides Single source of detector data for all clients simulation, reconstruction, analysis, test beam It is not detector geometry only! logical detector structure, geometry & positions, materials, mapping electronic channels to detector cells, detector control data needed for reconstruction, calibration and alignment data Versioning of all detector data based on event time, run #, etc. Persistency of detector description in XML format XML may be stored in files on disk , on the Web or in a DBMS 11/20/2018 Radovan Chytracek

Detector Data Store Persistent Detector Store Detector Persistency DetElement DetElement1 DetElement2 Persistent Detector Store Algorithm Detector Persistency Service Converter Transient Detector Store DetElement2 DetElement1 Detector Data Service Geant4 Service G4Converter Geant4 Representation The transient detector store contains a “snapshot” of the detector data valid for the currently processed event 11/20/2018 Radovan Chytracek

Transient Detector Store Root of the store Top level catalogues Top level catalogues Top level catalogues Tree-like structure Items identified by a logical name Updated on demand Automatic update when a new event is loaded 11/20/2018 Radovan Chytracek

Specific detector description questions from algorithms Loading on demand DetElement Geometry Info ReadOut Calibration Hierarchy DataObject * Detector Description Association resolved on demand LVolume PVolume Solid Geometry SolidBox * Material Element Mixture Isotope * MuonStation Specific detector description questions from algorithms 11/20/2018 Radovan Chytracek

Choices made for XML XML DOM is not used memory expensive we don’t write data back to XML (yet) we have already the transient hierarchical object model in Gaudi SAX is the choice for implementation easy to implement and extend we loose structure of XML documents IBM XML4C parser 11/20/2018 Radovan Chytracek

Numerical Expressions Parser Simple parser for evaluation of expressions Expressions can be composed of integer and floating point numbers 100 | 100. | .05 | 0.1| 1.34-e12|-23 operations: +, -, *, /, unary +|-, exponent ^ parenthesized expressions: 1.4 * ( 23.4-e12 / 1.8 ) Result is always evaluated to double value Operator precedence from left to right: [()] [unary +|-] [^] [*|/] [+|-] By default checks for units in expressions 11/20/2018 Radovan Chytracek

CLHEP Units Compatibility DTD for XML detector description defines units a la CLHEP Units MUST be used where required XML converters assume the use of units In case the units are missing processing stops and an exception is thrown. Use expressions parser where needed with check for units enabled Examples 23*&cm; | 12*&volt; | 23.6*&g;/&cm3; 11/20/2018 Radovan Chytracek

C++ to XML 11/20/2018 Radovan Chytracek

DDDB Tag <!ENTITY % elems "detelem | logvol | material"> <!ELEMENT DDDB (catalog | catalogref | %elems;)+> <!ATTLIST DDDB version CDATA "3.0"> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE DDDB SYSTEM "xmldb.dtd"> <DDDB> <catalog name="dd"> <catalogref href="structure.xml#Structure"/> <catalogref href="materials/materials.xml#Materials"/> <catalogref href="geometry.xml#Geometry"/> </catalog> </DDDB> 11/20/2018 Radovan Chytracek

Detector Element Tag <!ENTITY % detelemdata "author?,version,geometryinfo"> <!ENTITY % nmclid "name ID #REQUIRED classID CDATA #REQUIRED"> <!ELEMENT detelem (%detelemdata;, detelemref*, specific?)> <!ATTLIST detelem %nmclid;> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE DDDB SYSTEM "../xmldb.dtd"> <DDDB> <detelem classID="2" name="LHCb"> <author>RCH</author> <version>0.1</version> <geometryinfo> <lvname name="/dd/Geometry/LHCb/lvLHCb"/> </geometryinfo> <detelemref classID="9999" href="VertexRich1/Vertex/structure.xml#Vertex"/> <detelemref classID="2" href="VertexRich1/Rich1/structure.xml#Rich1"/> <detelemref classID="2" href="TrackerRich2/Tracker/structure.xml#Tracker"/> <detelemref classID="2" href="TrackerRich2/Rich2/structure.xml#RICH2"/> <detelemref classID="8900" href="CaloMuon/Calo/structure.xml#Ecal"/> <detelemref classID="2" href="CaloMuon/Muon/structure.xml#Muon"/> </detelem> </DDDB> 11/20/2018 Radovan Chytracek

Inheritance in XML Definition of the user XML tags Detector specific <!DOCTYPE DDDB SYSTEM "xmldb.dtd" [ <!--Number of stations in Vertex detector--> <!ELEMENT SiTankRadius EMPTY> <!ATTLIST SiTankRadius n CDATA #REQUIRED> <!ELEMENT DiodePitch EMPTY> <!ATTLIST PiodePitch n CDATA #REQUIRED> <!ELEMENT ReadoutPitch EMPTY> <!ATTLIST ReadoutPitch n CDATA #REQUIRED> ]> <DDDB> <detelem classID="9999" name="Vertex"> ... <geometryinfo> <lvname name="/dd/Geometry/lvVertex" /> <support name="/dd/Structure/LHCb"> <npath value="pvVertex_0" /> </support> </geometryinfo> <detelemref classID="2" href="#VStation01"/> <detelemref classID="2" href="#VStation02"/> <specific> <SiTankRadius n=‘17’ /> <DiodePitch n=‘0.0025’ /> <ReadoutPitch n=‘0.0050’ /> </specific> </detelem> </DDDB> Definition of the user XML tags Detector specific data 11/20/2018 Radovan Chytracek

Logical Volume Tag <!ENTITY % solid "(box | cons | sphere | tubs | trd | union | subtraction | intersection)"> <!ELEMENT logvol (%solid;, (physvol | paramphysvol)*)> <!ATTLIST logvol name ID #REQUIRED material CDATA #REQUIRED classID CDATA #FIXED "1100"> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE DDDB SYSTEM "../../xmldb.dtd"> <DDDB> <logvol name="lvVertexRich1" material="Vacuum"> <box name="VertexRich1Box” sizeX="5000*&mm;" sizeY="5000*&mm;" sizeZ="5000*&mm;"/> <physvol name="pvVertex” logvol="/dd/Geometry/LHCb/Vertex/lvVertex"> <posXYZ x="0*&mm;" y="0*&mm;" z="-1000*&mm;"/> </physvol> <physvol name="pvRich1” logvol="/dd/Geometry/LHCb/Rich1/lvRich1"> <posXYZ x="0*&mm;" y="0*&mm;" z="2000*&mm;"/> </logvol> </DDDB> 11/20/2018 Radovan Chytracek

Physical Volume Tags Initial position of the first physical volume <!ELEMENT physvol ((posXYZ|posRPhiZ|posRThPhi),(rotXYZ|rotAxis)?)> <!ATTLIST physvol name ID #REQUIRED logvol CDATA #REQUIRED> <!ELEMENT paramphysvol (physvol,(posXYZ|posRPhiZ|posRThPhi),(rotXYZ|rotAxis))> <!ATTLIST paramphysvol number CDATA #REQUIRED> Initial position of the first physical volume copy Parametric physical volume Step for rotation Step for translation Simple physical volume <logvol name="lvPVStation" material="Vacuum"> <tubs name="pvStationTubsPV" sizeZ="0.15*&mm;” outerRadius="60*&degree;" innerRadius="10*&degree;” startPhiAngle="-1.5*&degree;" deltaPhiAngle="181.5*&degree;"/> <paramphysvol number="6"> <physvol name="waferPV" logvol="/dd/Geometry/LHCb/Vertex/lvWafer"> <posXYZ x="0*&mm;" y="0*&mm;" z="-0.5*&mm;"/> <rotXYZ rotX="0*&degree;" rotY="0*&degree;" rotZ="0*&degree;"/> </physvol> <posXYZ x="0*&mm;" y="0*&mm;" z="0*&mm;"/> <rotXYZ rotX="0*&degree;" rotY="0*&degree;" rotZ="53.25*&degree;"/> </paramphysvol> <physvol name="pvwaferStrange" logvol="/dd/Geometry/LHCb/Vertex/lvWafer"> <posXYZ x="0*&mm;" y="0*&mm;" z="-1.5*&mm;"/> </logvol> 11/20/2018 Radovan Chytracek

Solid Tags Main or reference solid Main or reference solid Subtracted <!ENTITY % simplesolid "(box | cons | sphere | tubs | trd)"> <!ELEMENT box ((posXYZ | posRPhiZ | posRThPhi), (rotXYZ | rotAxis)?)?> <!ATTLIST box name ID #REQUIRED sizeX CDATA #REQUIRED sizeY CDATA #REQUIRED sizeZ CDATA #REQUIRED> <!ELEMENT union (%simplesolid;)+> <!ATTLIST union name ID #REQUIRED> Main or reference solid Main or reference solid <logvol material="Vacuum" name="lvEcalOuter"> <subtraction name="boxEcalOuter"> <box name="boxEOMain” sizeZ="432*&mm;" sizeX="7933.44*&mm;" sizeY="6445.92*&mm;"> <posXYZ z="0*&mm;" y="0*&mm;" x="0*&mm;"/> </box> <box name="boxEOSubtracted” sizeZ="432*&mm;" sizeX="2479.20*&mm;" sizeY="1983.36*&mm;"> </subtraction> </logvol> Subtracted solid placed relative to the main solid Subtracted solid placed relative to main solid 11/20/2018 Radovan Chytracek

Position Tags Cartesian coordinate system <!ELEMENT posXYZ EMPTY> <!ATTLIST posXYZ x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED> Cylindrical coordinate system <!ELEMENT posRPhiZ EMPTY> <!ATTLIST posRPhiZ r CDATA #REQUIRED phi CDATA #REQUIRED z CDATA #REQUIRED> Spherical coordinate system <!ELEMENT posRThPhi EMPTY> <!ATTLIST posRThPhi r CDATA #REQUIRED theta CDATA #REQUIRED phi CDATA #REQUIRED> 11/20/2018 Radovan Chytracek

Rotation Tags Rotation around the axes X,Y and Z <!ELEMENT rotXYZ EMPTY> <!ATTLIST rotXYZ rotX CDATA #REQUIRED rotY CDATA #REQUIRED rotZ CDATA #REQUIRED> Rotation using vector and angle <!ELEMENT rotAxis EMPTY> <!ATTLIST rotAxis axTheta CDATA #REQUIRED axPhi CDATA #REQUIRED angle CDATA #REQUIRED> 11/20/2018 Radovan Chytracek

Material Tag <!ENTITY % materialdata "a?,z?,n?,density,x0?,lambda?"> <!ELEMENT fraction (atoms | mass)> <!ELEMENT atoms EMPTY> <!ATTLIST atoms n CDATA #REQUIRED> <!ELEMENT mass EMPTY> <!ATTLIST mass n CDATA #REQUIRED> <!ELEMENT material (%materialdata;, (materialref)*)> <!ATTLIST material %nmclid; form (isotope | element | mixture) #IMPLIED temperature CDATA #IMPLIED pressure CDATA #IMPLIED state (solid | liquid | gas) #IMPLIED > <!ELEMENT a (#PCDATA)> <!ELEMENT z (#PCDATA)> <!ELEMENT n (#PCDATA)> <!ELEMENT density (#PCDATA)> <!ELEMENT x0 (#PCDATA)> <!ELEMENT lambda (#PCDATA)> 11/20/2018 Radovan Chytracek

Material Tag <material name="Bor_10" classID="&isotope;"> <a>10.000*&g;/&mole;</a> <z>5.000</z> <density>2.3400*&g;/&cm3;</density> <x0>0.0000e+00*&cm;</x0> <lambda>0.0000e+00*&cm;</lambda> </material> <material name="Water" classID="&mixture;"> <density>1.0000*&g;/&cm3;</density> <materialref classID="&element;" href="elements.xml#Hydrogen"> <fraction> <atoms n="2"/> </fraction> </materialref> <materialref classID="&element;" href="elements.xml#Oxygen"> <atoms n="1"/> </material> 11/20/2018 Radovan Chytracek

Conclusions Status Future steps XML based det. descr. is the integral part of Gaudi Working on NT, Linux Future steps Versioning Population of the XML DDDB from the LHCb detector description based on Geant3 Define the XML format for conditions calibration, alignment, channel maps, slow control, ... Implement the XML DDDB in the conjunction with a “real” DB (RD45 Conditions/DB, Oracle, ...) 11/20/2018 Radovan Chytracek

Geometry Info Tag lvLHCb Replica path is /pvVertex_0 Replica path is <lvname name="/dd/Geometry/lvVertex" /> <support name="/dd/Structure/LHCb"> <npath value="pvVertex_0" /> </support> </geometryinfo> lvVertex pvVSt 0 pvVSt 1 lvVtxSt Replica path is /pvVertex_0 lvLHCb pvVertex_0 pvVertex_1 pvVSt 0 pvVSt 1 Replica path is /pvVertex_0/pvVst0 11/20/2018 Radovan Chytracek

XML Converters Model 11/20/2018 Radovan Chytracek

XML Conversion It can be any XML parser supporting SAX API for C++ XML Converter Transient Store XML data XML Parser SAX API It can be any XML parser supporting SAX API for C++ SAX - Simple API for XML 11/20/2018 Radovan Chytracek

XML Briefly XML is the XML features W3C Recommendation XML 1.0 subset of SGML 20% complexity 80% flexibility of SGML Application independent data interchange format XML features User defined tags Data self described Hyperlinks Properly nested tags forming a tree structure Data separated from behavior Safe investment in data and manpower increasing support for XML in the industry maintained outside CERN Problems with XML C++ to XML mapping Inheritance Performance Data Management 11/20/2018 Radovan Chytracek

Persistent Detector Store The Gaudi architecture shields end users from a persistent technology Allows co-existence of different persistency technologies technology specific code only on well defined places services and converters We don’t know which technologies will be available in 2005 We use XML as our persistent data format XML can be stored in files, WWW, database 11/20/2018 Radovan Chytracek