Download presentation
Presentation is loading. Please wait.
Published byPhebe Boyd Modified over 8 years ago
1
XML in Atlas: from generic to parametric detector description Stan Bentvelsen NIKHEF Amsterdam XML workshop, CERN, May 22
2
May 22, 2001Stan Bentvelsen Detector Description Goals Description of an ideal, static detector Two basic approaches –Generic and explicit description No explicit mentioning of `ATLAS’ LEGO-like building stones to create complex geometries –Parametric and compact description Explicit notion of each detector Parameters interpreted by an algorithm to create complex geometries Both methods advantages/disadvantages –Have we arrived at a marriage between them?
3
May 22, 2001Stan Bentvelsen Generic approach: Architecture XML syntax defined in AGDD.dtd XML file-parsing using Xerces SAX2 Customized C++ model reflecting XML information Client programs communicate with transient objects AGDD XML file Generic Model Transient C++ Client programs AGDD.dtd Syntax def AGDD.dtd Syntax def visitorfactory
4
May 22, 2001Stan Bentvelsen Generic Approach: geometry Creation of ‘Volumes’ –Generic and descriptive Elementary Solids –Basic building blocks, described by shape, dimensions and material »box »tube, etc... Boolean Solids –Boolean operations »union »subtraction, etc... Logical grouping of Volumes –Create composite volumes »composition »stack, etc... Positioning of ‘Volumes’ –Description of the instantiation of the volumes Absolute or relative, single or multiple positioners – Define the translation and rotation matrix of a volume wrt the origin of the constituents, through parameterized algorithms » posXYZ » mposPhi » axisPos, etc...
5
May 22, 2001Stan Bentvelsen Transient model: volume hierarchy AGDD_Volume AGDD_SolidAGDD_CompositionAGDD_BooleanAGDD_Stack AGDD_BoxAGDD_TrapezoidAGDD_TubesAGDD_Cons AGDD_UnionAGDD_SubtractionAGDD_Intersection AGDD_StackXAGDD_StackYAGDD_StackZ Logical grouping of volumes
6
May 22, 2001Stan Bentvelsen Creation of Volumes Documentation Volume specific name ID, units, parameters Solid specific material IDREF Definition box Definition ‘box’ in DTD: Mimic hierarchy in XML using entities
7
May 22, 2001Stan Bentvelsen Transient model positioning hierarchy AGDD_AbsolutePosition AGDD_SinglePositionAGDD_MultiplePosition AGDD_PosXYZ AGDD_RelativePosition AGDD_AxisPosAGDD_AxisMPos AGDD_MPosPhiAGDD_MPosR AGDD_MPosXAGDD_MPosZAGDD_MPosY AGDD_PosRPhiZ Used in Stack Volumes Used in Composition Volumes
8
May 22, 2001Stan Bentvelsen Generic Approach: an example Creation solid: tube Section: sub-detector + author + version Various positioning of volumes Nice, but becomes quite cumbersome to describe the whole of ATLAS
9
May 22, 2001Stan Bentvelsen Number Redundancy Numbers vs Algorithms. –problem of many redundant numbers in explicit XML description. 1Arithmetic. –allow ‘arithmetic’ in attribute value (LHCb). External library interpret value attributes. 2Compactification. –Invent specialised syntax for specialised geometry. New specialised syntax to describe detector pieces. Supply C++ algorithms to ‘expand’ these to basic volumes. 3pre-XML. –let C++ or JAVA programs produce XML. using basic set of parameters. Algorithms outside scope of XML source Numbersalgorithm Y=“r*sin(2*phi_mod)” int main(){…}
10
May 22, 2001Stan Bentvelsen Compactification Compactification in XML Definition (DTD) of MyNewElement described in ACDD.dtd –Mechanism to chain DTD files using external entities The MyNewElement corresponds to a volume and can be used as such in the rest of the AGDD description –Compact element represents a detailed view of a region in space –Function of a set of basic parameters as given by the attributes of the content element (MyNewElement)
11
May 22, 2001Stan Bentvelsen Example: parametric description <section name = "CompactTest" version = "1.1" date = "Fri Jan 14, 2001" author = "Stan Bentvelsen" top_volume = "ATLAS" DTD_version= "v4" > Example of a compact XML file, with element that contains the parameters to describe the geometry C++ code connected to
12
May 22, 2001Stan Bentvelsen Generic versus parametric approach Generic (explicit) –Limited set of syntax –Automatic visualization –Straightforward interpretation –Easy start-up –Self-contained –Many redundant numbers –Difficult to maintain –No room for optimization of client software Parametric (compact) –Unlimited syntax –External algorithm needed to interpret the parameters –Initial start-up hurdle to define the syntax –No redundant numbers –Once syntax is defined, its easy to maintain –Optimization possible in client software
13
May 22, 2001Stan Bentvelsen Generic model: Volume hierarchy AGDD_Volume AGDD_SolidAGDD_BooleanAGDD_CompositionAGDD_Compact AGDD_Cone AGDD_Tube AGDD_Box AGDD_Intersection AGDD_Union AGDD_Subtraction Pure AGDD Compact AGDD Basic, explicit description In numbers Algorithmic Description In terms of parameters MyNewElement
14
May 22, 2001Stan Bentvelsen Registration ‘MyCompact’ elements are associated to C++ type The C++ type is associated to corresponding factory The factory is registered in a FactoryTable The FactoryTable is known by the AGDD parser Macro: REGISTER_FACTORY(type,”XMLname”) XML element C++ type MyCompact AGDD_Compact Factory MyCompactFactory AGDD_CompactFactory FactoryTableAGDD_Parser Xerces parser register
15
May 22, 2001Stan Bentvelsen Class MyCompactExample XML information available via AGDD_Compact string getElementName(); int getNrAttributes(); string getAttName(int index); double getDoubleAttValue(string name); int getIntAttValue(string name); Interface to other volumes available AGDD_Volume* getVolumeAttValue(string name); Expand to ‘pure AGDD’ (boxes, tubes, compositions) Expand(); (user written; required) Create new AGDD objects Store all AGDD objects in a container Automatic registration in the Generic Model User is required to provide the ‘expand()’ method Fill vector m_expandedVolumes The expanded AGDD should correspond to valid XML
16
May 22, 2001Stan Bentvelsen Architecture Compact AGDD XML ASCII file Generic Model Transient C++ ‘expanded’ C++ Algorithms compact C++ Algorithms compact AGDD_Printer ACDD/AGDD clients Pure AGDD XML ASCII file ACDD/AGDD Syntax def ACDD/AGDD Syntax def Detector description visitor visualisation factory
17
May 22, 2001Stan Bentvelsen The Developer Interface AGDD_Muon.dtd
18
May 22, 2001Stan Bentvelsen The Developer Interface MDT_Tube.xml
19
May 22, 2001Stan Bentvelsen The Application Interface Expanded_Station.xml
20
May 22, 2001Stan Bentvelsen The simulation client Two ‘routes’ to a representation of the geometry in G4 –Via ‘pure’ AGDD to an automatic G4 representations Development only –Via ‘compact’ AGDD to an optimized G4 representation Production code Study difference in G4 performance AGDD ACDD syntax Compact XML Pure XML Expand() Optimized code Geant4 representation Geant4 representation Compare? Automatic building Syntax check Syntax check
21
May 22, 2001Stan Bentvelsen Status Initiative to use XML started 1 1/2 years ago Core group –Christian Arnault, Stan Bentvelsen, Steven Goldfarb, Julius Hrivnac, Jean-François Laporte, Christopher Lester, RD Schaffer, Marc Virchaux Acceptance around ATLAS –(some) description available for most parts of the detector –Moving toward ‘compact’ description Hope to have G4 simulation based on AGDD/ACDD by 2002
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.