GAUDI Detector Description News Radovan Chytracek 5/1/2019

Slides:



Advertisements
Similar presentations
1. Define the concept of assertions. 1 Explain the use of assertions. 2 Create Java program using assertions. 3 Run Java program using assertions. 4 2.
Advertisements

What's new in Microsoft Visual C Preview
History Leading to XHTML
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.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
LHCb Simulation Tutorial CERN, 21 st -22 nd February B 00 l e Detector Simulation and Geant4.
Working with XHTML Creating a Well-Formed Valid Document.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XML - DTD. The building blocks of XML documents Elements, Tags, Attributes, Entities, PCDATA, and CDATA.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Conditions DB in LHCb LCG Conditions DB Workshop 8-9 December 2003 P. Mato / CERN.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Programming Language C++ Xulong Peng CSC415 Programming Languages.
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.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Copyrighted material John Tullis 10/17/2015 page 1 04/15/00 XML Part 3 John Tullis DePaul Instructor
XML - DTD Week 4 Anthony Borquez. What can XML do? provides an application independent way of sharing data. independent groups of people can agree to.
Gaudi Framework Tutorial, XML The persistent world.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
XML in Atlas: from generic to parametric detector description Stan Bentvelsen NIKHEF Amsterdam XML workshop, CERN, May 22.
CSC 107 – Programming For Science. The Week’s Goal.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
XML Document Type Definitions and the Document object model.
Detector Description in LHCb (Extended Version) Detector Description Workshop 4 July 2002 S. Ponce - CERN.
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.
DTD Document Type Definition. Agenda Introduction to DTD DTD Building Blocks DTD Elements DTD Attributes DTD Entities DTD Exercises DTD Q&A.
2. C FUNDAMENTALS. Example: Printing a Message /* Illustrates comments, strings, and the printf function */ #include int main(void) { printf("To C, or.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XML 1.Introduction to XML 2.Document Type Definition (DTD) 3.XML Parser 4.Example: CGI Gateway to XML Middleware.
New Xml Converters General presentation of Xml converters The old way
Object-Oriented Programming (OOP) Lecture No. 16
C++ Lesson 1.
Creating a Well-Formed Valid Document
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
Chapter 4 Assignment Statement
New Xml Converters General presentation of Xml converters The old way
2.5 Another Java Application: Adding Integers
Handling Several Geometry Configurations in XML
Chapter 3 Assignment Statement
Object-Oriented Programming (OOP) Lecture No. 16
Introduction to C Programming Language
Operator Overloading BCA Sem III K.I.R.A.S.
CS212: Object Oriented Analysis and Design
XML in LHCb Detector Description Framework Radovan Chytracek CERN
Tutorial 9 Working with XHTML
null, true, and false are also reserved.
Basics of ‘C’.
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Various News From Detector Description
Detector Description in LHCb
DTD (Document Type Definition)
2. Second Step for Learning C++ Programming • Data Type • Char • Float
Engineering Problem Solving with C++ An Object Based Approach
Engineering Problem Solving with C++ An Object Based Approach
Programming Language C Language.
G4 Workshop 2002 Detector Description Parallel Session
Quiz Points 1 Rules Raise your hand if you know the question
CSE591: Data Mining by H. Liu
The Calorimeter Detector Description
Detector description News
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Presentation transcript:

GAUDI Detector Description News Radovan Chytracek 5/1/2019

What Was Detector Description v2 Prototype implementation Basic DTD covering the minimal set of tags needed to describe detector Verbose and complex user defined converters implementation Lack of CLHEP units support We got plenty of user feedback and motivating criticism 5/1/2019 Radovan Chytracek

What Is Detector Description v3 Improved in many ways User feed back reflected in the code Simplified user defined converters Numerical expressions parser Compatibility with CLHEP units DTD is much more rich and safe Improved positions and rotations Parametric physical volumes available Units entities with the same names as in CLHEP 5/1/2019 Radovan Chytracek

Numerical Expressions Parser 5/1/2019 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 is: [()] [unary +|-] [^] [*|/] [+|-] By default checks for units in expressions 5/1/2019 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; 5/1/2019 Radovan Chytracek

MyDetector Example #include "Gaudi/DetectorDataSvc/DetectorElement.h" extern const CLID& CLID_MyDetector; class MyDetector: public DetectorElement { public: int cellSize( x,y ); int setCellSize( double size ); inline const CLID& clID() { return MyDetector::classID(); } static const CLID& classID(){ return CLID_MyDetector; } private: int m_cellSize; }; 5/1/2019 Radovan Chytracek

MyDetector Structure In XML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE DDDB SYSTEM "xmldb.dtd" [ <!--Number of stations in Vertex detector--> <!ELEMENT CellSize EMPTY> <!ATTLIST CellSize n CDATA #REQUIRED> ]> <DDDB> <detelem classID="7001" name="MyDetectorModule"> <author>RCH</author> <version>0.1</version> <geometryinfo> <lvname name = "/dd/Geometry/MyDetector/lvMyDetector" /> <support name = "/dd/Structure/LHCb"> <npath value = "MDM_0" /> </support> </geometryinfo> <detelemref classID="7002" href=“mysubmodule.xml#MySubModule01”/> <detelemref classID="7002" href=“mysubmodule.xml#MySubModule02”/> <detelemref classID="7003" href=“myanothersubmodule.xml#MyAnotherSubModule”/> <specific> <CellSize n="56.7*&cm;" /> </specific> </detelem> User defined XML tag Associated geometry data Detector specific data Units inside numerical expression 5/1/2019 Radovan Chytracek

MyDetector XML Converter #include "DetDesc/XmlCnvSvc/XmlUserDeCnv.h" #include "MyDetector.h" class XmlMyDetectorCnv : public XmlUserDeCnv<MyDetector> { public: XmlMyDetectorCnv(ISvcLocator* svc); ~XmlMyDetectorCnv() {} virtual void uStartElement( const char* const name, XmlCnvAttributeList& attributes); }; static CnvFactory<XmlMyDetectorCnv> myde_factory; const ICnvFactory& XmlMyDetectorCnvFactory = myde_factory; XmlMyDetectorCnv::XmlMyDetectorCnv(ISvcLocator* svc) : XmlUserDeCnv<MyDetector>( svc, "XmlMyDetectorCnv" ){} void XmlMyDetectorCnv::uStartElement( const char* const name, XmlCnvAttributeList& attributes) { MsgStream log( msgSvc(), m_msId ); std::string tagName( name ); if( tagName == "CellSize" ) { std::string nval = attributes.getValue( "n" ); m_dataObj->setCellSize( xmlSvc()->eval(nval) ); } } else { // Unknown tag, a warning message can be issued here 5/1/2019 Radovan Chytracek

MyDetector Geometry In XML <?xml version="1.0"?> <!DOCTYPE DDDB SYSTEM "xmldb.dtd"> <DDDB> <catalog name="MyDetector"> <logvolref href="#lvMyDetector" /> <logvolref href="#lvMyDetectorSubModule" /> <logvolref href="#lvMyDetectorAnotherSubModule" /> </catalog> <logvol name="lvMyDetector" material="Vacuum"> <box name="lvMyDeBox" sizeZ="800*&mm;" sizeY="10000*&mm;" sizeX="10000*&mm;" /> <paramphysvol number="2"> <physvol name="ppvMySM" logvol="/dd/Geometry/MyDetector/lvMyDetectorSubModule"> <posXYZ x="0*&mm;" y="0*&mm;" z="-300*&mm;" /> </physvol> <posXYZ x="0*&mm;" y="0*&mm;" z="100*&mm;" /> <rotXYZ rotX="0*&degree;" rotY="0*&degree;" rotZ="90*&degree;" /> </paramphysvol> <physvol name="pvMyAnotherSM" logvol="/dd/Geometry/MyDetector/lvMyAnotherSubModule"> <posXYZ x="0*&mm;" y="0*&mm;" z="200*&mm;" /> </logvol> </DDDB> 5/1/2019 Radovan Chytracek

Conclusions DetDesc v3 works on supported platforms Documentation is updated ( being updated ) New XML DB structure has been defined provides better support for parallel development gives unified hierarchical structure uses the latest features is made as a CMT package is in CVS 5/1/2019 Radovan Chytracek