Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHEP 2003 - 3/21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.

Similar presentations


Presentation on theme: "CHEP 2003 - 3/21/03 Detector Description Framework in LHCb Sébastien Ponce CERN."— Presentation transcript:

1 CHEP 2003 - 3/21/03 Detector Description Framework in LHCb Sébastien Ponce CERN

2 2/21CHEP 2003 - 3/21/03Sébastien Ponce Topics ● Detector data overview ● Structure, Transient Store, XML backend ● Possible extensions ● Parameters, Full extension ● Condition Database ● Purpose, Implementation, Impact on user ● Tools ● Simulation, Geometry Checker, Visualization

3 3/21CHEP 2003 - 3/21/03Sébastien Ponce Data Diagram Structure Material Geometry DetElem Geometry Info Calibration Condition Alignment Condition Readout Condition MuonStation EcalCluster Condition Conditions EcalClusterCondition MuonStationAlignment VeloReadout Lvolume Pvolume Solid Box Sphere * Points to Inherits from Resolved on demand Material IsotopeMixture Element

4 4/21CHEP 2003 - 3/21/03Sébastien Ponce Transient Store ● Tree-like structure ● Items identified by a logical name ● Load/update on demand ● Automatic update when new event Transient Store Lvolume DetElem Geometry Db Detector Data Service Persistency Service Algorithm Ask for Object Retrieve pointer Check presence Load Ask creation Cnv

5 5/21CHEP 2003 - 3/21/03Sébastien Ponce XML Backend ● Easy to read and to parse ● Extensible ● Easy to convert ● Many tools ● Extended using references <box name="box3“ sizeX="1*m“ sizeY="1*m“ sizeZ="15*cm"/> <tubs name="tub2“ outerRadius="15*cm“ sizeZ="25*cm"/> protocol://hostname/path/file.xml#ObjectID

6 CHEP 2003 - 3/21/03 User Extensions

7 7/21CHEP 2003 - 3/21/03Sébastien Ponce User Extensions ● Why ? ● In order to implement specific behaviour (e.g. answering specific simulation questions) ● Add specific information to elements / conditions ● How ? ● By specializing the Detector Element / Condition ● 3 main possibilities : ● Usage of parameters in the XML code ● Specialization of the C ++ object only ● Full extension, including XML, DTD and C ++ converters

8 8/21CHEP 2003 - 3/21/03Sébastien Ponce Parameter Extension 1.2222*mm SmartDataPtr station (detSvc(), "/dd/Structure/LHCb/Muon/MStation01"); std::cout param("Al_thickness"); SmartDataPtr station (detSvc(), "/dd/Structure/LHCb/Muon/MStation01"); std::cout param("Al_thickness"); ● Definition of parameters (name, type and value) in the XML code ● Vectors of parameters also allowed ● Direct and easy access in C ++

9 9/21CHEP 2003 - 3/21/03Sébastien Ponce C++ Class Extension ● New C ++ class inheriting from DetectorElement ● Any member or method may be added ● Its initialize method is called by the framework. ● A dummy converter is needed (2 lines) class MyDetElem : public DetectorElement { int getChannelNb() { return chNb; } StatusCode initialize() { chNb = paramAsInt (“ChNb”); return SUCCESS; } private : int chNb; } static CnvFactory > s_factory; const ICnvFactory& XmlMyDetElemCnvFactory = s_factory;

10 10/21CHEP 2003 - 3/21/03Sébastien Ponce Full Extension ● Extension of the DTD to define new XML elements inside the element ● Parsing of the new XML code using dedicated converters ● Still specialized C ++ objects <channelSet name="Controls"> <channels name=”in” nb="20"/> <channels name=”out” nb="150"/> <channelSet name="Controls"> <channels name=”in” nb="20"/> <channels name=”out” nb="150"/> if ("channels" == elementName) { string name = childElement.getAttribute ("name"); int nb = xmlSvc()->eval(childElement.getAttribute("nb")); currentChannelSet->addChannel(name, nb); } if ("channels" == elementName) { string name = childElement.getAttribute ("name"); int nb = xmlSvc()->eval(childElement.getAttribute("nb")); currentChannelSet->addChannel(name, nb); }

11 CHEP 2003 - 3/21/03 Condition Database

12 12/21CHEP 2003 - 3/21/03Sébastien Ponce CondDB Purpose Data Item Time Version ● To deal with time varying data like calibration, alignment, environment (temperatures)... ● Handle several versions of a given data ● Also deal with the geometry, which is also time dependent (longer period though)

13 13/21CHEP 2003 - 3/21/03Sébastien Ponce CondDB Implementation Transient Store DetElem Detector Data Service Persistency Service Algorithm Ask for Object Retrieve pointer Check presence Ask creation Cnv Condition Db Condition Service Ask for data Retrieve them from Database Abstract interface ● Additional service of the framework ● Independent of the type of data contained (XML) ● Based on an abstract interface with several possible backends (Objectivity, ORACLE, MySQL)

14 14/21CHEP 2003 - 3/21/03Sébastien Ponce Impact on End User ● No impact on the "raw" XML code ● Only references are changed by the usage of the "conddb" protocol ● No change at all in the C ++ code : the correct data are loaded depending on the event time <conditionref href="conddb:/CONDDB/SlowControl/Hcal/scHcal#scHcal"/> <conditionref href="conddb:/CONDDB/SlowControl/Hcal/scHcal#scHcal"/>

15 CHEP 2003 - 3/21/03 Tools

16 16/21CHEP 2003 - 3/21/03Sébastien Ponce XmlEditor Tool ● Specialized XML Editor for Detector data ● Understanding cross file references ● Hides the complexity of XML from the end user ● Tree like structure a la explorer ● Easy drag & drop, cut & paste ● Insure that the XML is well-formed and valid ● Still writes human readable, indented XML

17 17/21CHEP 2003 - 3/21/03Sébastien Ponce XmlEditor Tool

18 18/21CHEP 2003 - 3/21/03Sébastien Ponce Geometry Checkers ● Visual checker : ● based on David : Dawn's Visual Intersection Debugger ● Uses GiGa : Gaudi interface to Geant4 applications ● Gaudi Transport Service : ● More precise ● More reliable

19 19/21CHEP 2003 - 3/21/03Sébastien Ponce Visualization Tool ● Event and geometry viewer ● Interfaced with Gaudi via scripting services

20 20/21CHEP 2003 - 3/21/03Sébastien Ponce Visualization (2)

21 21/21CHEP 2003 - 3/21/03Sébastien Ponce Conclusion ● A fully functional and stable solution ● Many tools provided : ● For XML generation ● For geometry checking ● For visualization ● Used successfully for simulation, reconstruction and analysis


Download ppt "CHEP 2003 - 3/21/03 Detector Description Framework in LHCb Sébastien Ponce CERN."

Similar presentations


Ads by Google