Skip to content

provide the possibility to define sub-detector versions using the option file

Menglin Xu requested to merge mexu_comp_version into master
  • Problem: currently the version of the components are defined at Default.py script, we are unable to specify what version to use for each componetns.
  • Changes: provide the flexibility to read the version from an option python scrip
  • achived:
    • can specifiy the sub-detectors in DD4HEP

      the code changes in `Sim/Gauss/options/Geometry/DD4hep-DBTags-2023.py` to specifiy FT and Magnet
      GaussGeometry(
          # adds the geometry of FT and Magnet
          DetectorGeo = {"Detectors": ["FT", "Magnet"],"Version": {"FT": "trunk","Magnet": "trunk"}},
          # adds the hit extraction classes for FT and turns on the magnetic field
          DetectorSim={ "Detectors": ["FT", "Magnet"] },
          # adds the monitoring algorithms for FT (histograms will be produced)
          DetectorMoni={ "Detectors": ["FT"] },
      )
      the output xml file
      
      <?xml version="1.0" ?>
      <lccdd>
         <debug>
            <type name="includes" value="0"/>
            <type name="incguard" value="1"/>
         </debug>
         <includes>
            <file ref="/home/mexu/stack/Detector/compact/common/global/common.xml"/>
            <file ref="/home/mexu/stack/Detector/compact/components/Pipe/trunk/PipeCommon.xml"/>
         </includes>
         <include ref="/home/mexu/stack/Detector/compact/components/FT/trunk/FT.xml"/>
         <include ref="/home/mexu/stack/Detector/compact/components/Magnet/trunk/Magnet.xml"/>
      </lccdd>
      
    • still allows for not specifying the version of the detectors, meanning all existing tests still work

    • throw a warning, if Version is used in DetDesc DBTag python script

    # applying configuration of GaussGeometry
    # WARNING: the Version feature is intended for use exclusively with DD4HEP. Despite its inclusion in the DetDesc DBTags Python file, it 
    does not function as expected
  • in long term: will be a plugin in Detector or in LHCb that allows to steer the xml file at run time

Includes !1084 (merged)

Edited by Gloria Corti

Merge request reports

Loading