Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gloria Corti, CERN Credits to Chris Jones, Wouter Hulsbergen, Sajan Easo, Dima Popov Computing Workshop Online/Databases/Detector Description Session Paris.

Similar presentations


Presentation on theme: "Gloria Corti, CERN Credits to Chris Jones, Wouter Hulsbergen, Sajan Easo, Dima Popov Computing Workshop Online/Databases/Detector Description Session Paris."— Presentation transcript:

1 Gloria Corti, CERN Credits to Chris Jones, Wouter Hulsbergen, Sajan Easo, Dima Popov Computing Workshop Online/Databases/Detector Description Session Paris 18 th November 2015 Computing Workshop Online/Databases/Detector Description Session Paris 18 th November 2015 basic principles essential & weak points from the reconstruction and simulation viewpoints Detector Description for the current detector

2 G. Corti The (obvious) Scope Model the experimental setup in the software Computing Workshop - 16 Nov 2015 Detector Description 2

3 G. Corti Detector Description framework Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Application Manager Converter Event Selector Transient Histogram Store Transient Event Store ✔ Single source of detector information for all LHCb software … BUT sometimes different ‘views’ are needed XML Files Transient Detector Store Sub-architecture of Gaudi with same principles Computing Workshop - 16 Nov 2015 Detector Description 3

4 G. Corti A little historical background Very first implementation of the framework for Detector Description presented at CHEP’00 Concepts are the same Fully functional implementation with connection to a very first implementation of Conditions Database at CHEP’03 The Detector Description framework has not essentially changed since then. Technologies behind the scenes have. Radovan Chytracek et al. Sebastian Ponce et al. Alignment framework in CHEP’06, Juan Palacios et al. Doc entry page - http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/DetDesc/default.htm Computing Workshop - 16 Nov 2015 Detector Description 4

5 G. Corti Using it in the context of the applications Used for over 14(11) years. DC04 was the first production where used in all applications DB technologies and tools have been evolving but framework itself rather stable Customizable Current detector described in all of its evolutions from 2001 to few months ago All upgrade TDRs studies have been done with it with n-options Complexity of detector data has strong influence on timing of navigation Major rewrite with this in mind and introduction of tracking simplified geometry Some weak points for things that we did not really consider at the time… Computing Workshop - 16 Nov 2015 Detector Description 5

6 G. Corti Basic Principles and Components Computing Workshop - 16 Nov 2015 Detector Description 6

7 G. Corti Two hierarchies of description Breakdown of detectors Identification LogicalVolumes, i.e. unplaced dimensioned shapes PhysicalVolumes, i.e. placed volumes Two tree structures with hook for other detector data independent but connected calibration, alignment, … Computing Workshop - 16 Nov 2015 Detector Description 7

8 G. Corti Logical Structure The basic object is a Detector Element Identification Navigation (tree-like) DetectorElement is an information center Able to answer any detector related question E.g. global position of strip#, temperature of detector, absolute channel gain, user parameters, etc. Placeholder for specific code The specific answers can be coded by “Physicists” DetectorElement objects are shared by all Algorithms DetElement * MyDetector Computing Workshop - 16 Nov 2015 Detector Description 8

9 G. Corti Volumes Logical Volume Contains the info of the Shape and Material of a Volume Physical Volume Contains the placement info of the Logical Volume i.e. Physical location and orientation of a Volume. Logical Volume also has a)the information regarding which other physical volumes are contained in that Volume. b)the graphics attributes needed for visualization. c)user defined parameters needed for tracking, electromagnetic field. d)flags to indicate if the volume is a sensitive detector (to create hits in G4) More info: LHCb-2004-020 Computing Workshop - 16 Nov 2015 Detector Description 9

10 G. Corti Shapes: attributes to Volumes Shapes in LHCb are Constructed Solid Geometry (GSG) Simple shapes, i.e. Box, Tubs, Cons, Trd, Sphere, … Easy to use and with better performance respect to other types Combination of solids via Boolean Operations Subtractions, intersections, union, … Should be avoided for performance reason but sometimes the only option Also to avoid Boolean operations with disjoint solids and with those that share surfaces Computing Workshop - 16 Nov 2015 10 Detector Description More info: LHCb-2004-018

11 G. Corti 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 Data Diagram Computing Workshop - 16 Nov 2015 Detector Description 11

12 G. Corti Transient Store Lvolume DetElem Geometry Db Detector Data Service Persistency Service Algorithm Ask for Object Retrieve pointer Check presence Load Ask creation Cnv Detector Transient Store 12 Computing Workshop - 16 Nov 2015 Detector Description Tree-like structure “Catalogs” of geometry, materials, structure Items identified by logical names, in the form /xxx/yyy/zzz Load/update on demand Automatic update with new event A Standard Gaudi Transient Store

13 G. Corti Persistent Representation The detector description resides in a unique Detector Description Database Partition (DDDB). Part of CondDB Shielded from actual DB technology via COOL interface XML is used as the language for the persistent representation Syntax specified in DTD files Computing Workshop - 16 Nov 2015 13 Detector Description DDDB LHCBCONDONLINECOND SIMCOND

14 G. Corti XML format ‘files’ Why did we choose XML at the time ??? Instead of inventing our own format use a standard one Considered as strategic technology a decade ago ! Computing Workshop - 16 Nov 2015 14 Detector Description a) Easy to read and to parse b) Extensible c) Easy to convert d) Many tools e) Extended using references

15 G. Corti Persistency based on XML format ‘files’ 15 Computing Workshop - 16 Nov 2015 Detector Description a) Easy to read and to parse b) Extensible c) Easy to convert d) Many tools e) Extended using references c)Converters used to build C ++ objets from XML One converter per object type Almost 1-to-1 mapping a) Uses the xerces-C parser Could use any DOM parser e) Independent development for sub-detectors b) Three main possibilities for users extensions to implement specific behaviour - Usage of parameters in the XML code - Specialization of the C ++ objets - Full extension, including XML, DTD and C ++ converters

16 G. Corti Things we had to cope along the way or we found are missing by using it Computing Workshop - 16 Nov 2015 Detector Description 16

17 G. Corti Geometry in the simulation Gauss delegates to Geant4 the transport of particles through the experimental setup and the simulation of the processes that can occur Computing Workshop - 16 Nov 2015 17 Detector Description Instantiation of Sensitive Detector and Magnetic Field objects, special simulation XML tags A dedicated set of services, algorithms and converters to transform the geometry to be simulated from the LHCb transient detector description into the Geant4 representation

18 G. Corti Passing the geometry to Geant4 Loops through the list of detector elements provided, finds the corresponding LHCb volume elements, converts them to build the volume tree structure for GEANT4. Computing Workshop - 16 Nov 2015 18 Detector Description DetectorElement MuonStation Geometry Info IGeometryInfo Specific detector description LVolume PVolume Solid ISolid Detector Description Geometry IDetectorElement ILVolume Solid SolidBox IPVolume * Same geometry tree exists in G4 Material Alignment Exploited in a 1 to 1 mapping when passing the information to G4 GiGaDetectorElementCnv only called when given as StreamItems GiGaLVolumeCnv convert to G4 all its geometry tree with their positions

19 G. Corti Passing the geometry to Geant4 19 Computing Workshop - 16 Nov 2015 Detector Description BUT detector information varying with time is separate from the geometry structure Quite a bit of gymnastic to get back the position for the PVolume from the corresponding DetectorElement DetectorElement MuonStation Geometry Info IGeometryInfo Specific detector description LVolume PVolume Solid ISolid Detector Description Geometry IDetectorElement ILVolume Solid SolidBox IPVolume * Material Alignment info about misalignment position as given in geometry tree

20 G. Corti Applying the misalignment in the simulation 20 Computing Workshop - 16 Nov 2015 Detector Description Misalignment is applied only for some sub-detectors during simulation l lvA1, pvA1, deA1 lvB1, pvB1,deB1 l lvA2, pvA2, deA2 lvB2, pvB2, deB2 l lvA3, pvA3, deA3 lvB3, pvB3, deB3 ll lvB, pvB,deB1 lvB, pvB, deB2 l lvB, pvB, deB3 lvA, pvA1, deA1 lvA, pvA2, deA2lvA, pvA3, deA3 Misalignment info created for the list of ‘de’ for A and B. In Gauss we will the Geant4 info for each ‘pv’ and try to find the corresponding ‘de’ to get the info from. Needs a unique path name correspondence. (a) (b) Need to change the schema in Gauss to support case (b) Example: A= HPD B= Si Anode inside HPD Example: A= ST sensor B= ST plane ✓ ✗

21 G. Corti Geometry in the reconstruction Material description used in track fit for estimating energy loss estimating multiple scattering Essential steps in Kalman filter locate material intersections between any two ‘nodes’ on track compute for each material intersection the e-loss and scattering using known material properties Precise aligned position is needed by all detectors. e.g. for photon reconstruction in the RICH essential to know where each mirror segment is and of each HPD and its internal silicon sensor Knowledge of material around is also necessary e.g. RICH needs to know the shape and position of the beam pipe to correct for lost photons Computing Workshop - 16 Nov 2015 21 Detector Description

22 G. Corti Degree of details in the geometry The degree of details varies depending on the scope * RICH only need very basic shape of beam pipe and effectively has private element for it The track fit is not so sensitive to the actual position of the actual position of the scattering planes between any two hits we see a number of material objects replacing these by one ‘average’ object may be enough The ‘full’ geometry can be used for everything but it has a cost * many elements locating intersections is time consuming (80% of fitting time) other experiments don’t do it this way Computing Workshop - 16 Nov 2015 22 Detector Description * The same applies to the geometry in the simulation

23 G. Corti Simplified material description In 2007 a `simplified geometry’ was developed to be used for the track fit The `simplified geometry’ has only O(30) volumes only boxes and cylinders most fine grained in the Velo The track fit is entirely oblique to which geometry is used Computing Workshop - 16 Nov 2015 23 Detector Description Behind the VELO, 19 boxes & 9 cylinders In the VELO, 3 sections (RF, sensors, support)

24 G. Corti Simplified material description Volumes are assigned a ‘material composition’, by running simulated particles through the detector and averaging ‘real’ material in each of the ‘simplified’ volumes Defining a suitable set of volumes was (is) hand work keep the number as small as possible but still try to separate dense from less dense regions Computing Workshop - 16 Nov 2015 24 Detector Description tracing ‘reconstructable’ particles through the detector we characterise the material that actual tracks will see in each of the ‘simple’ volumes

25 G. Corti Simplified material description, validation the result is validated by looking at track parameter resolution and pull distributions at various positions along the track track chi2 distribution Computing Workshop - 16 Nov 2015 25 Detector Description shows pull of impact parameter in x versus eta and phi black is full geometry and blue is simplified geometry from ‘recent’ talk by Michael Alexander

26 G. Corti Simplified geometry considerations The main drawback to current implementation is that it has no connection to real geometry It means, for instance for every update to the full geometry, necessary to manually run a job to compute new material constants, but cannot update the volumes if the velo is open, or not centered at (0,0,0), the ‘simplified velo’ is still closed and still centered at (0,0,0) ! The current simplified geometry is not appropriate for the RICH because integrates materials with very different densities Could choose differently the material in the RICH regions Somebody ambitious could develop procedure that generates simplified geometry automatically, including volumes should look at how other collaborations solve this! Computing Workshop - 16 Nov 2015 Detector Description 26 Simplified geometry could partly be used also in the simulation

27 G. Corti Parallel geometry (in simulation) The simplified geometry coexists in the detector description in a ‘parallel’ path More then one in different paths used at the same time for different purposes? Need to be made ‘automatically’: with extern processing or with ‘tags’? In Geant4 two separate geometries Mass geometry where particles are tracked Parallel geometry where particles are not tracked but can create hits. Volumes can overlap with those of the mass geometry Want to use the parallel geometry in the future for scoring planes for material scans (and possibly for fastMC and readout geometries) Investigate parallel path in TDS with parallel geometry in Geant4 Computing Workshop - 16 Nov 2015 27 Detector Description

28 G. Corti Some random topics related to geometry Computing Workshop - 16 Nov 2015 Detector Description 28

29 G. Corti Do we have enough shapes? Computing Workshop - 16 Nov 2015 Detector Description Geant4 has even more CSG shapes. GEANT4 also has: BREPS (Boundary Represented Solids) Tessellated Solids, i.e. Volumes defined by a number of facets. Useful for importing complex shapes created by CAD systems.

30 G. Corti Importing geometry from CAD CAD geometries cannot be used as-is but sometimes very useful to do so Tools exist to transform STEP files into GDML files for Geant4 Used for example for some RF foil studies, but not so trivial! One of this tools developed by some engineers also in LHCb Our DTD not too different from GDML Are we interested in this for the upgrade? Purely for support structure? Computing Workshop - 16 Nov 2015 30 Detector Description

31 G. Corti Geometry for other simulation engines Fast MC in various forms is one hot topic at the moment. Need to give ‘some’ geometry. Embedded in Gauss can use Detector Description, but need to transfer it in the form understood by external engine used (if any) Use simplified geometry for simple acceptance? For radiation studies we use a completely separate application, FLUKA. Its own geometry description. For current detector ported by hand. Full geometry not always appropriate and part of the environment missing Some connections to Geant4 geometry possible (FLUGG) but with limitations Keep the status quo for the upgrade or is there something that we could use? Computing Workshop - 16 Nov 2015 31 Detector Description

32 G. Corti Tools: geometry checkers, visualization Computing Workshop - 16 Nov 2015 Detector Description 32

33 G. Corti Tools Tools to help in designing and checking the geometry both in the LHCb and in the simulation engines exists and are essential Computing Workshop - 16 Nov 2015 33 Detector Description ① Write and check consistency of XML ‘file’ ② Visually verify volumes are where they are supposed to be in the LHCb world ③ Check for overlaps in the LHCb world ④ Do (2) & (3) in simulation engine (Geant4) world

34 G. Corti Exploring and visualizing Until now the first tests to check a geometry were done with Panoramix Useful for quick overview of detector geometry, material inventory, XML debbugging Access to Geometry and Structure with different reference systems Computing Workshop - 16 Nov 2015 34 Detector Description Need a tool like this for the upgrade (and not only) with a fast loading time Does not need to be connected to the events

35 G. Corti Visualizing the simulation geometry Gauss can run in interactive mode and visualize the geometry using Geant4 tools DB  LHCb Geometry  Geant4 Geometry  Geant4 graphics  GDML  … Computing Workshop - 16 Nov 2015 35 Detector Description Many graphics drivers in GEANT4: OpenGL, DAWN. Need to make sure they work within Gauss. Recent example of Gauss with G4-OpenGL

36 G. Corti Checking for overlaps Overlaps are a big cause of problems: crashes or, worse, strange results Main tool in LHCb is the Transport Service Precise and reliable For Gauss we also have Geant4 tools Computing Workshop - 16 Nov 2015 36 Detector Description https://twiki.cern.ch/twiki/bin/view/LHCb/FAQ/GaussCheckOverlap Can enable checking at construction time Use the Geant4 Dawn’s Visual Intersection Debugger (aka DAVID). Need to know how to interpret it. Need to make it work again for the upgrade detector

37 G. Corti Final remarks Computing Workshop - 16 Nov 2015 Detector Description 37

38 G. Corti A personal view Our Detector Description has served us well up to now We can keep using it as-is with the current limitations There is room for improvement, with non-negligible work Better integration of simplified geometry Redesign of how we pass it to the Geant4 simulation Integration with other simulation engines to be looked at Optimization of how the detectors themselves are structured in the XML needed: particularly for the upgrade detector  huge influence on timing! Tools for checking the geometry are also essential Should we be radical and change it completely? Computing Workshop - 16 Nov 2015 38 Detector Description

39 G. Corti References Detector Description documentation entry point Tutorials Solids, volumes Simplified geometry Computing Workshop - 16 Nov 2015 39 Detector Description More recent validation by Michael Alexander: https://indico.cern.ch/event/385900/contribution/11/material/slides/1.pdf Wouter’s original talks: https://indico.cern.ch/event/10171/contribution/2/material/slides/0.pdf https://indico.cern.ch/event/10171/contribution/2/material/slides/0.pdf https://indico.cern.ch/event/10728/session/2/contribution/19 http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/DetDesc/default.htm LHCb-2004-018, LHCb-2004-020 large section of Simulation 2012 tutorial, https://indico.cern.ch/event/175918/


Download ppt "Gloria Corti, CERN Credits to Chris Jones, Wouter Hulsbergen, Sajan Easo, Dima Popov Computing Workshop Online/Databases/Detector Description Session Paris."

Similar presentations


Ads by Google