19
8 May, 2000 Berk eley J. Bogart XML Detector Descr. Works hop XML for LCD

XML for LCD

  • Upload
    mahala

  • View
    28

  • Download
    1

Embed Size (px)

DESCRIPTION

XML for LCD. Outline. The LCD project and a little something about GLAST Attraction of XML What it looks like (current implementation) New technology to watch. LCD Project. - PowerPoint PPT Presentation

Citation preview

Page 1: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

XML for LCD

Page 2: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

2

Outline

• The LCD project and a little something about GLAST

• Attraction of XML

• What it looks like (current implementation)

• New technology to watch

Page 3: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

3

LCD Project

The purpose of the Linear Collider Detector project is to evaluate different detector designs for a linear collider and eventually settle on one or two in light of the hoped-for physics and expected characteristics (energy range, backgrounds, …) of the collider.

Efforts so far have centered on two fundamentally different designs, known as Small and Large.

Page 4: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

4

S design has magnet inside HAD

LCD Large

Page 5: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

5

GLAST

Gamma-ray Large Area Space Telescope: a NASA project. The Stanford/SLAC proposal was recently approved. There has already been considerable development effort, including a recent (pre-apporval) testbeam run with a prototype at SLAC.

The instrument is like a HEP detector in a box rather than a barrel. HEP tools and methods are used for simulation, reconstruction, etc., so the problem of how to represent the detector is fundamentally the same.

Page 6: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

6

The picture is old. Current design is a 4x4

array of towers.

GLAST Instrument

Page 7: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

7

Environment

• Both LCD and GLAST use Gismo, written in C++, for simulation; both will probably someday move to Geant4.

• There are FastMC programs for LCD running in the Root environment and also in Java Analysis Studio. Reconstruction and analysis are done primarily in JAS.

Page 8: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

8

Attractions of XML

LCD: Since the whole point of the exercise is to optimize the detector design, multiple descriptions must be supported and it must be straightforward to modify an existing design, preferably interactively.

GLAST: Design is still being fine-tuned. Need support for rather different prototype and final design.

Flexibility: extensible element design and ability to edit values easily

Page 9: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

9

More Attractions

• Portable, accessible because text-based

• Choice of programming interfaces (SAX or DOM) and languages (C++, Java,…)

• Well-designed syntax with a standard behind it

• Lots of free tools available, more coming

Page 10: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

10

<lcdparm> <global file=“largeParms2.xml” /> <physical_detector topology=“large” id = “L2” > <volume id=“EM_BARREL” > <tube> <barrel_dimensions inner_r = “196.0” outer_z = “322.0” /> <layering n=“40”> <slice material = “Pb” width = “0.4” /> <slice material = “Tyvek” width = “0.05” /> <slice material = “Polystyrene” width = “0.1” sensitive = “yes” /> </layering>

<segmentation theta = “300” phi = “300” /> </tube> <calorimeter type = “em” /> </volume> ...

Start subdetector description

function

End subdectectordescription

largeParms2.xml

Page 11: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

11

<!-- Mark-up language for lcd detector description, possibly other parms. -->

<!ELEMENT lcdparm (global, physical_detector, proc_parm?)> <!ELEMENT global EMPTY> <!ATTLIST global file NMTOKEN #REQUIRED> <!ELEMENT physical_detector (volume | complex_volume)+ > <!ATTLIST physical_detector topology (large | small) #REQUIRED id ID #IMPLIED>

<!ELEMENT volume ((tube | disk | cone), (calorimeter | tracker | coil | cryo | support)?) > <!ATTLIST volume id ID #REQUIRED inter_len_cm NMTOKEN #IMPLIED rad_len_cm NMTOKEN #IMPLIED>

comment

attributesdeclarations

element

declaration

contentmodel

detParms.dtd

Page 12: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

12

Utilities Layer (generic)Low-level, to address deficiencies in DOM:class LCD_DocumentUtil {

public:

static bool convertValue(const DOMString& strVal, double *val);

static bool convertValue(const DOMString& strVal, int *val);

// ..and so forth

}

class LCD_DocumentImpl : public LCD_Document {

public:

DOM_Element getElement(DOMString id,

DOMString elementName = DOMString("*"));

}

..and others meant for use with DOM level 2 events.

Page 13: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

13

Utilities (DTD-specific)

class LCD_DocGeoUtil {

public:

static double getLayerWidth(DOM_Element elt, bool all = false);

static bool barrelDim(const DOM_Element& tube, double (*pInnerR,

double *pOuterZ, double *pOuterR = 0);

// ..and others for tube, disk, cone

// Given a segmentation elt or something that contains one, return theta, phi divisions

static bool getSegmentation(const DOM_Element& elt, double *nTheta,

double *nPhi);

}

Page 14: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

14

Choices - parser

• Use DOM. Detector description files are not large enough to worry about. Random in-memory access is simpler to deal with, and will support interactive changes.

• Validate. Screens out at least some errors.

• Make use of defaults. Particularly important if detector description files are edited by hand.

Page 15: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

15

Choices – DTD design

• Volume elements have two primary children: one for physical description and one to express function. See dtd slide

• Volumes may have a number of identical layers which in turn may consist of slices of different materials.

• Materials database was kept elsewhere (historical; not a conscious decision)

Page 16: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

16

Lessons

• Should have separated tranformation (translation, rotation) from definition of volume

• Tried to express concept of “neighbor” but it was too simplistic, unusable.

• More generic geometry description? Can consumer applications handle it?

Page 17: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

17

New Technology

• Schemas should be a boon when spec and associated tools settle down.

– explicit numeric datatypes

– namespace support

– object-like inheritance for element definitions

• DOM 2 event model supports more interactive applications (but application-level validation could be a problem)

Page 18: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

18

New Technology (cont’d)

• XSLT: don’t need to design a single schema for all applications as long as there is a way to translate documents from one type to another as needed.

• Possibility to build on other initiatives– MathML content model for geometry, magnetic field

modelling?

– XML for Materials Property Data (MatML)? Just starting; nothing publicly available yet

Page 19: XML for LCD

8 May, 2000 Berkeley J. Bogart XML Detector Descr. Workshop

19

References

• LCD (general): http://www-sldnt.slac.stanford.edu/nld/

• LCD (full dtd, xml documents): http://www.slac.stanford.edu/~jrb/nlc_detectors/

• GLAST: http://www-glast.stanford.edu/

• MatML: http://www.ceramics.nist.gov/matml/matml.htm