Skip to content

Detector flags autoconfiguration

Tadej Novak requested to merge tadej/athena:detector-autoconfig into 22.0

I finally managed to setup a sensible detector flags autoconfiguration (for MC only for now). The idea is as following:

  1. Read the default list of detectoes from the geometry database.
  2. Check if either simulation or digitisation metadata is available. If yes, use the latest state of enabled detectors as this is what's actually available in the input file.
  3. Allow setting a custom list (e.g. using --detectors). This also compares with metadata and throws an exception if one wants to process a detector that is not available.

For some nostalgia I also print a nice table again 😊, an example requiring Muon on Run 2 geometry:

Py:DetectorConfigFlags    INFO               Initial       Metadata      Requested     Final
Py:DetectorConfigFlags    INFO               Geo.   Enbl.  Sim.   Digi.  Geo.   Enbl.  Geo.   Enbl.
Py:DetectorConfigFlags    INFO       Bpipe : ON     n/a    n/a    n/a    --     n/a    --     n/a
Py:DetectorConfigFlags    INFO         BCM : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO       Pixel : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO         SCT : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO         TRT : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO    BCMPrime : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO         PLR : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO    ITkPixel : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO    ITkStrip : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO        HGTD : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO         LAr : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO        Tile : ON     ON     ON     ON     --     --     --     --
Py:DetectorConfigFlags    INFO        MBTS : ON     ON     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO         CSC : ON     ON     ON     ON     ON     ON     ON     ON
Py:DetectorConfigFlags    INFO         MDT : ON     ON     ON     ON     ON     ON     ON     ON
Py:DetectorConfigFlags    INFO         RPC : ON     ON     ON     ON     ON     ON     ON     ON
Py:DetectorConfigFlags    INFO         TGC : ON     ON     ON     ON     ON     ON     ON     ON
Py:DetectorConfigFlags    INFO        sTGC : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO          MM : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO       Lucid : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO         ZDC : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO        ALFA : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO         AFP : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO   FwdRegion : --     --     --     --     --     --     --     --
Py:DetectorConfigFlags    INFO      Cavern : --     n/a    n/a    n/a    --     n/a    --     n/a
Py:DetectorConfigFlags    INFO Disabling detectors: ['BCM', 'Pixel', 'SCT', 'TRT', 'LAr', 'Tile', 'MBTS']

/cc @elmsheus, @nstyles, @goetz, @mhodgkin, @christos, @tstreble, @jchapman, @tlari, @wlampl, @fwinkl, @tbold

Edited by Tadej Novak

Merge request reports