GeometrySvc

In order to facilitate developers to call various DD4hep plugins and obtain the required geometry formats, the software framework implements the GeometrySvc service, which is responsible for providing the geometry generated by DD4hep to all application software. During initialization, GeometrySvc will call the geometry parsing tool of DD4hep to convert the user-specified XML file into a geometry in memory. In addition, GeometrySvc provides a series of interface functions to facilitate the use of detector simulation, digital simulation, reconstruction, and analysis software. The functions currently available in GeometrySvc and their functions are summarized as following, and can be further expanded in the future based on the needs of application software.

  • initialize: Initialize the service to complete tasks such as XML parsing and geometry construction, which will be automatically called by the framework system.

  • getPhyVol: Get the Geant4 physical volume

  • getDetDesc: Get the DD4hep detector description

  • getPosition: Get the coordinates of a particular volume

  • getDimension: Get the XYZ dimension of a particular volume

  • getPhyNode: Get the ROOT node of a detector volume

  • GlobalToLocal: Transform from global system to local system

  • LocalToGlobal: Transform from local system to global system

  • getVolID: Get the volume ID of a particular volume

  • getCode: Get the self-defined ID of a particular volume

  • finalize: Clean-up, automatically called by the framework.