ATLAS Offline Software
Functions | Variables
DumpGeoConfig Namespace Reference

Functions

def configureGeometry (flags, cfg)
 
def getATLASVersion ()
 
def DumpGeoCfg (flags, name="DumpGeoCA", outFileName="", **kwargs)
 

Variables

 _logger = logging.getLogger('DumpGeo')
 
 flags = initConfigFlags()
 
 MaxEvents
 
 NumThreads
 
 parser = flags.getArgumentParser()
 
 prog
 
 default
 
 help
 
 metavar
 
 action
 
 args = flags.fillFromArgs(parser=parser)
 
bool dumpgeo_empty_input = False
 
 ProjectName
 
 RunNumbers
 
 TimeStamps
 
 TypedCollections
 
 GlobalTag
 
 isMC
 
 MCCampaign
 
 AtlasVersion
 
 None
 
 use_metadata
 
 toggle_geometry
 
 True
 
 keep_beampipe
 
string outFileName = "geometry"
 
list filterDetManagers = []
 
 geoTAG = flags.GeoModel.AtlasVersion
 
 cfg = MainServicesCfg(flags)
 
 debugCAlevel = int(args.debugCA)
 

Function Documentation

◆ configureGeometry()

def DumpGeoConfig.configureGeometry (   flags,
  cfg 
)

Definition at line 13 of file DumpGeoConfig.py.

13 def configureGeometry(flags, cfg):
14 
15  # Beam pipe
16  if flags.Detector.GeometryBpipe:
17  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
18  cfg.merge(BeamPipeGeometryCfg(flags))
19 
20  # Inner Detectors
21  if flags.Detector.GeometryPixel:
22  from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
23  cfg.merge(PixelReadoutGeometryCfg(flags))
24  # TODO: do we need to set this separately?
25  # if flags.Detector.GeometryBCM:
26 
27  if flags.Detector.GeometrySCT:
28  from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
29  cfg.merge(SCT_ReadoutGeometryCfg(flags))
30 
31  if flags.Detector.GeometryTRT:
32  from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
33  cfg.merge(TRT_ReadoutGeometryCfg(flags))
34 
35  # InDetServMat
36  # Trigger the build of the InDetServMat geometry
37  # if any ID subsystems have been enabled
38  if flags.Detector.GeometryID:
39  from InDetServMatGeoModel.InDetServMatGeoModelConfig import (
40  InDetServiceMaterialCfg)
41  cfg.merge(InDetServiceMaterialCfg(flags))
42 
43  # Calorimeters
44  if flags.Detector.GeometryLAr:
45  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
46  cfg.merge(LArGMCfg(flags))
47 
48  if flags.Detector.GeometryTile:
49  from TileGeoModel.TileGMConfig import TileGMCfg
50  #flags.Tile.forceFullGeometry = True
51  cfg.merge(TileGMCfg(flags))
52  # We must set the "FULL" geometry explicitely, otherwise the "RECO" version will be used by default,
53  # which is almost 'empty' (just the first level of child volumes is created for the "RECO" geo).
54  cfg.getService("GeoModelSvc").DetectorTools["TileDetectorTool"].GeometryConfig="FULL"
55  # TODO: do we need to set this separately?
56  # if flags.Detector.GeometryMBTS:
57 
58  # Muon spectrometer
59  if flags.Detector.GeometryMuon:
60  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
61  cfg.merge(MuonGeoModelCfg(flags))
62 
63  # HGTD (defined only for Run4 geometry tags)
64  if flags.Detector.GeometryHGTD:
65  #set up geometry
66  if flags.HGTD.Geometry.useGeoModelXml:
67  from HGTD_GeoModelXml.HGTD_GeoModelConfig import HGTD_SimulationGeometryCfg
68  else:
69  from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_SimulationGeometryCfg
70  cfg.merge(HGTD_SimulationGeometryCfg(flags))
71 
72  # ITk (defined only for Run4 geometry tags)
73  if flags.Detector.GeometryITkPixel:
74  from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
75  cfg.merge(ITkPixelReadoutGeometryCfg(flags))
76  if flags.Detector.GeometryITkStrip:
77  from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
78  cfg.merge(ITkStripReadoutGeometryCfg(flags))
79  # TODO: do we need to set those separately?
80  # if flags.Detector.GeometryBCMPrime:
81  # if flags.Detector.GeometryPLR:
82 
83  # Cavern (disabled by default)
84  if flags.Detector.GeometryCavern:
85  from AtlasGeoModel.CavernGMConfig import CavernGeometryCfg
86  cfg.merge(CavernGeometryCfg(flags))
87 
88  # Forward detectors (disabled by default)
89  if flags.Detector.GeometryLucid or flags.Detector.GeometryALFA or flags.Detector.GeometryAFP or flags.Detector.GeometryFwdRegion :
90  from AtlasGeoModel.ForDetGeoModelConfig import ForDetGeometryCfg
91  cfg.merge(ForDetGeometryCfg(flags))
92  if flags.Detector.GeometryZDC:
93  from ZDC_GeoM.ZdcGeoModelConfig import ZDC_DetToolCfg
94  cfg.merge(ZDC_DetToolCfg(flags))
95 
96  # Temporary 'hack':
97  # Replace EllipticTube with Box,
98  # to bypass a crash due to lack of support
99  # for EllipticTube in GeoModelIO
100  # See: https://its.cern.ch/jira/browse/ATLASSIM-7263
101  if "ForwardRegionGeoModelTool" in cfg.getService("GeoModelSvc").DetectorTools:
102  cfg.getService("GeoModelSvc").DetectorTools["ForwardRegionGeoModelTool"].vp1Compatibility=True
103 
104 

◆ DumpGeoCfg()

def DumpGeoConfig.DumpGeoCfg (   flags,
  name = "DumpGeoCA",
  outFileName = "",
**  kwargs 
)

Definition at line 114 of file DumpGeoConfig.py.

114 def DumpGeoCfg(flags, name="DumpGeoCA", outFileName="", **kwargs):
115  # This is based on a few old-style configuation files:
116  # JiveXML_RecEx_config.py
117  # JiveXML_jobOptionBase.py
118  result = ComponentAccumulator()
119 
120  #print(dir("args: ", args)) # debug
121 
122 
123  # set diitional Alg's properties
124  # Note: at this point, the user-defined Geo TAG args.detDescr,
125  # if set, has already replaced the default GeoModel.AtlasVersion in 'flags';
126  # so, we can use the latter, directy.
127  _logger.verbose("Using ATLAS/Athena version: %s", getATLASVersion())
128  _logger.verbose("Using GeoModel ATLAS version: %s", flags.GeoModel.AtlasVersion)
129  kwargs.setdefault("AtlasRelease", getATLASVersion())
130  kwargs.setdefault("AtlasVersion", flags.GeoModel.AtlasVersion)
131  kwargs.setdefault("OutSQLiteFileName", outFileName)
132  if args.filterDetManagers:
133  kwargs.setdefault("UserFilterDetManager", args.filterDetManagers.split(","))
134  if args.showTreetopContent:
135  kwargs.setdefault("ShowTreetopContent", True)
136 
137  the_alg = CompFactory.DumpGeo(name="DumpGeoAlg", **kwargs)
138  result.addEventAlgo(the_alg, primary=True)
139  return result
140 
141 

◆ getATLASVersion()

def DumpGeoConfig.getATLASVersion ( )

Definition at line 105 of file DumpGeoConfig.py.

105 def getATLASVersion():
106  import os
107 
108  if "AtlasVersion" in os.environ:
109  return os.environ["AtlasVersion"]
110  if "AtlasBaseVersion" in os.environ:
111  return os.environ["AtlasBaseVersion"]
112  return "Unknown"
113 

Variable Documentation

◆ _logger

DumpGeoConfig._logger = logging.getLogger('DumpGeo')
private

Definition at line 153 of file DumpGeoConfig.py.

◆ action

DumpGeoConfig.action

Definition at line 185 of file DumpGeoConfig.py.

◆ args

DumpGeoConfig.args = flags.fillFromArgs(parser=parser)

Definition at line 190 of file DumpGeoConfig.py.

◆ AtlasVersion

DumpGeoConfig.AtlasVersion

Definition at line 225 of file DumpGeoConfig.py.

◆ cfg

DumpGeoConfig.cfg = MainServicesCfg(flags)

Definition at line 291 of file DumpGeoConfig.py.

◆ debugCAlevel

DumpGeoConfig.debugCAlevel = int(args.debugCA)

Definition at line 300 of file DumpGeoConfig.py.

◆ default

DumpGeoConfig.default

Definition at line 180 of file DumpGeoConfig.py.

◆ dumpgeo_empty_input

bool DumpGeoConfig.dumpgeo_empty_input = False

Definition at line 200 of file DumpGeoConfig.py.

◆ filterDetManagers

list DumpGeoConfig.filterDetManagers = []

Definition at line 253 of file DumpGeoConfig.py.

◆ flags

DumpGeoConfig.flags = initConfigFlags()

Definition at line 157 of file DumpGeoConfig.py.

◆ geoTAG

DumpGeoConfig.geoTAG = flags.GeoModel.AtlasVersion

Definition at line 258 of file DumpGeoConfig.py.

◆ GlobalTag

DumpGeoConfig.GlobalTag

Definition at line 222 of file DumpGeoConfig.py.

◆ help

DumpGeoConfig.help

Definition at line 181 of file DumpGeoConfig.py.

◆ isMC

DumpGeoConfig.isMC

Definition at line 223 of file DumpGeoConfig.py.

◆ keep_beampipe

DumpGeoConfig.keep_beampipe

Definition at line 236 of file DumpGeoConfig.py.

◆ MaxEvents

DumpGeoConfig.MaxEvents

Definition at line 158 of file DumpGeoConfig.py.

◆ MCCampaign

DumpGeoConfig.MCCampaign

Definition at line 224 of file DumpGeoConfig.py.

◆ metavar

DumpGeoConfig.metavar

Definition at line 181 of file DumpGeoConfig.py.

◆ None

DumpGeoConfig.None

Definition at line 235 of file DumpGeoConfig.py.

◆ NumThreads

DumpGeoConfig.NumThreads

Definition at line 170 of file DumpGeoConfig.py.

◆ outFileName

string DumpGeoConfig.outFileName = "geometry"

Definition at line 252 of file DumpGeoConfig.py.

◆ parser

DumpGeoConfig.parser = flags.getArgumentParser()

Definition at line 177 of file DumpGeoConfig.py.

◆ prog

DumpGeoConfig.prog

Definition at line 178 of file DumpGeoConfig.py.

◆ ProjectName

DumpGeoConfig.ProjectName

Definition at line 216 of file DumpGeoConfig.py.

◆ RunNumbers

DumpGeoConfig.RunNumbers

Definition at line 217 of file DumpGeoConfig.py.

◆ TimeStamps

DumpGeoConfig.TimeStamps

Definition at line 218 of file DumpGeoConfig.py.

◆ toggle_geometry

DumpGeoConfig.toggle_geometry

Definition at line 236 of file DumpGeoConfig.py.

◆ True

DumpGeoConfig.True

Definition at line 236 of file DumpGeoConfig.py.

◆ TypedCollections

DumpGeoConfig.TypedCollections

Definition at line 219 of file DumpGeoConfig.py.

◆ use_metadata

DumpGeoConfig.use_metadata

Definition at line 235 of file DumpGeoConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
BeamPipeGMConfig.BeamPipeGeometryCfg
def BeamPipeGeometryCfg(flags)
Definition: BeamPipeGMConfig.py:5
TRT_GeoModelConfig.TRT_ReadoutGeometryCfg
def TRT_ReadoutGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:55
python.InDetServMatGeoModelConfig.InDetServiceMaterialCfg
def InDetServiceMaterialCfg(flags)
Definition: InDetServMatGeoModelConfig.py:8
python.ForDetGeoModelConfig.ForDetGeometryCfg
def ForDetGeometryCfg(flags)
Definition: ForDetGeoModelConfig.py:33
DumpGeoConfig.configureGeometry
def configureGeometry(flags, cfg)
Definition: DumpGeoConfig.py:13
ZdcGeoModelConfig.ZDC_DetToolCfg
def ZDC_DetToolCfg(flags)
Definition: ZdcGeoModelConfig.py:4
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:42
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
PixelGeoModelConfig.PixelReadoutGeometryCfg
def PixelReadoutGeometryCfg(flags)
Definition: PixelGeoModelConfig.py:42
DumpGeoConfig.getATLASVersion
def getATLASVersion()
Definition: DumpGeoConfig.py:105
ITkPixelGeoModelConfig.ITkPixelReadoutGeometryCfg
def ITkPixelReadoutGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:39
python.CavernGMConfig.CavernGeometryCfg
def CavernGeometryCfg(flags)
Definition: CavernGMConfig.py:6
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
ITkStripGeoModelConfig.ITkStripReadoutGeometryCfg
def ITkStripReadoutGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkStripGeoModelConfig.py:39
DumpGeoConfig.DumpGeoCfg
def DumpGeoCfg(flags, name="DumpGeoCA", outFileName="", **kwargs)
Definition: DumpGeoConfig.py:114
HGTD_GeoModelConfig.HGTD_SimulationGeometryCfg
def HGTD_SimulationGeometryCfg(flags)
Definition: python/HGTD_GeoModelConfig.py:17
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7