Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
python.MuonGeometryConfig Namespace Reference

Functions

def TrackingVolumesSvcCfg (flags, name="TrackingVolumesSvc", **kwargs)
 
def MuonIdHelperSvcCfg (flags)
 
def MuonGeoModelCfg (flags)
 
def MuonDetectorToolCfg (flags, name="MuonDetectorTool", **kwargs)
 
def MuonAlignmentCondAlgCfg (flags, name="MuonAlignmentCondAlg", **kwargs)
 
def MuonAlignmentErrorDbAlgCfg (flags)
 
def NswAsBuiltCondAlgCfg (flags, name="NswAsBuiltCondAlg", **kwargs)
 
def sTGCAsBuiltCondAlgCfg (flags, name="sTGCAsBuiltCondAlg", **kwargs)
 
def MdtAsBuiltCondAlgCfg (flags, name="MdtAsBuiltCondAlg", **kwargs)
 
def CscILineCondAlgCfg (flags, name="CscILinesCondAlg", **kwargs)
 
def MuonDetectorCondAlgCfg (flags, name="MuonDetectorCondAlg", **kwargs)
 
def MuonGeoModelToolCfg (flags)
 

Function Documentation

◆ CscILineCondAlgCfg()

def python.MuonGeometryConfig.CscILineCondAlgCfg (   flags,
  name = "CscILinesCondAlg",
**  kwargs 
)

Definition at line 186 of file MuonGeometryConfig.py.

186 def CscILineCondAlgCfg(flags, name="CscILinesCondAlg", **kwargs):
187  result = ComponentAccumulator()
188  if not flags.Muon.Align.UseILines:
189  return result
190  from IOVDbSvc.IOVDbSvcConfig import addFolders
191  if (flags.Common.isOnline and not flags.Input.isMC):
192  result.merge(addFolders( flags, ['/MUONALIGN/Onl/CSC/ILINES'], 'MUONALIGN', className='CondAttrListCollection'))
193  else:
194  result.merge(addFolders( flags, ['/MUONALIGN/CSC/ILINES'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
195 
196  the_alg = CompFactory.CscILinesCondAlg(name, **kwargs)
197  result.addCondAlgo(the_alg, primary = True)
198  return result
199 
200 
201 @AccumulatorCache

◆ MdtAsBuiltCondAlgCfg()

def python.MuonGeometryConfig.MdtAsBuiltCondAlgCfg (   flags,
  name = "MdtAsBuiltCondAlg",
**  kwargs 
)

Definition at line 177 of file MuonGeometryConfig.py.

177 def MdtAsBuiltCondAlgCfg(flags, name="MdtAsBuiltCondAlg", **kwargs):
178  result = ComponentAccumulator()
179  from IOVDbSvc.IOVDbSvcConfig import addFolders
180  if "readFromJSON" not in kwargs or not kwargs["readFromJSON"]:
181  result.merge(addFolders( flags, '/MUONALIGN/MDT/ASBUILTPARAMS' , 'MUONALIGN_OFL', className='CondAttrListCollection'))
182  the_alg = CompFactory.MdtAsBuiltCondAlg(name = name, **kwargs)
183  result.addCondAlgo(the_alg, primary = True)
184  return result
185 

◆ MuonAlignmentCondAlgCfg()

def python.MuonGeometryConfig.MuonAlignmentCondAlgCfg (   flags,
  name = "MuonAlignmentCondAlg",
**  kwargs 
)

Definition at line 100 of file MuonGeometryConfig.py.

100 def MuonAlignmentCondAlgCfg(flags, name="MuonAlignmentCondAlg", **kwargs):
101  acc = ComponentAccumulator()
102 
103  # here define if I-lines (CSC internal alignment) are enabled
104  acc.merge(CscILineCondAlgCfg(flags))
105  # here define if As-Built (MDT chamber alignment) are enabled
106  if flags.Muon.Align.UseAsBuilt:
107  acc.merge(MdtAsBuiltCondAlgCfg(flags))
108  acc.merge(NswAsBuiltCondAlgCfg(flags))
109  if(flags.Muon.Align.UsesTGCAsBuild):
110  acc.merge(sTGCAsBuiltCondAlgCfg(flags))
111 
112  if not flags.Muon.Align.UseALines and not flags.Muon.Align.UseBLines:
113  return acc
114  from IOVDbSvc.IOVDbSvcConfig import addFolders
115 
116  onl = "/Onl" if ((flags.Common.isOnline or flags.IOVDb.GlobalTag.startswith("CONDBR2-HLTP")) and not flags.Input.isMC) else ""
117  ParlineFolders = [f"/MUONALIGN{onl}/MDT/BARREL",
118  f"/MUONALIGN{onl}/MDT/ENDCAP/SIDEA",
119  f"/MUONALIGN{onl}/MDT/ENDCAP/SIDEC",
120  f"/MUONALIGN{onl}/TGC/SIDEA",
121  f"/MUONALIGN{onl}/TGC/SIDEC"]
122  acc.merge(addFolders( flags, ParlineFolders, 'MUONALIGN' if len(onl) else 'MUONALIGN_OFL', className='CondAttrListCollection'))
123 
124  if len(onl):
125  ParlineFolders = [ x[ :x.find(onl)] + x[x.find(onl) + len(onl): ] for x in ParlineFolders]
126 
127  kwargs.setdefault("LoadALines", flags.Muon.Align.UseALines)
128  kwargs.setdefault("LoadBLines", flags.Muon.Align.UseBLines)
129 
130  kwargs.setdefault("ParlineFolders", ParlineFolders)
131  MuonAlign = CompFactory.MuonAlignmentCondAlg(name, **kwargs)
132  acc.addCondAlgo(MuonAlign, primary = True)
133  return acc
134 
135 

◆ MuonAlignmentErrorDbAlgCfg()

def python.MuonGeometryConfig.MuonAlignmentErrorDbAlgCfg (   flags)

Definition at line 136 of file MuonGeometryConfig.py.

136 def MuonAlignmentErrorDbAlgCfg(flags):
137  acc = ComponentAccumulator()
138  from IOVDbSvc.IOVDbSvcConfig import addFolders
139  acc.merge(addFolders(flags, "/MUONALIGN/ERRS", "MUONALIGN_OFL", className="CondAttrListCollection"))
140  acc.addCondAlgo(CompFactory.MuonAlignmentErrorDbAlg("MuonAlignmentErrorDbAlg"))
141  return acc
142 

◆ MuonDetectorCondAlgCfg()

def python.MuonGeometryConfig.MuonDetectorCondAlgCfg (   flags,
  name = "MuonDetectorCondAlg",
**  kwargs 
)

Definition at line 202 of file MuonGeometryConfig.py.

202 def MuonDetectorCondAlgCfg(flags, name = "MuonDetectorCondAlg", **kwargs):
203  result = ComponentAccumulator()
204 
205  kwargs.setdefault("MuonDetectorTool", result.popToolsAndMerge(MuonDetectorToolCfg(flags)))
206  kwargs.setdefault("applyMmPassivation", flags.Muon.applyMMPassivation)
207 
208  if kwargs["applyMmPassivation"]:
209  from MuonConfig.MuonCondAlgConfig import NswPassivationDbAlgCfg
210  result.merge(NswPassivationDbAlgCfg(flags))
211  if flags.Muon.enableAlignment:
212  result.merge(MuonAlignmentCondAlgCfg(flags))
213  kwargs.setdefault("applyALines", flags.Muon.Align.UseALines)
214  kwargs.setdefault("applyBLines", flags.Muon.Align.UseBLines)
215  kwargs.setdefault("applyILines", flags.Muon.Align.UseILines)
216  kwargs.setdefault("applyNswAsBuilt", len([alg for alg in result.getCondAlgos() if alg.name == "NswAsBuiltCondAlg"])>0)
217  kwargs.setdefault("applysTGCAsBuilt", len([alg for alg in result.getCondAlgos() if alg.name == "sTGCAsBuiltCondAlg"])>0)
218  kwargs.setdefault("applyMdtAsBuilt", len([alg for alg in result.getCondAlgos() if alg.name == "MdtAsBuiltCondAlg"])>0)
219 
220 
221 
222  MuonDetectorManagerCond = CompFactory.MuonDetectorCondAlg(name, **kwargs)
223 
224  result.addCondAlgo(MuonDetectorManagerCond, primary = True)
225  return result
226 
227 

◆ MuonDetectorToolCfg()

def python.MuonGeometryConfig.MuonDetectorToolCfg (   flags,
  name = "MuonDetectorTool",
**  kwargs 
)

Definition at line 46 of file MuonGeometryConfig.py.

46 def MuonDetectorToolCfg(flags, name = "MuonDetectorTool", **kwargs):
47  acc = ComponentAccumulator()
48  kwargs.setdefault("HasCSC", flags.Detector.GeometryCSC)
49  kwargs.setdefault("HasSTgc", flags.Detector.GeometrysTGC)
50  kwargs.setdefault("HasMM", flags.Detector.GeometryMM)
51 
52  kwargs.setdefault("UseConditionDb", flags.Muon.enableAlignment)
53  kwargs.setdefault("UseAsciiConditionData", flags.Muon.enableAlignment)
54 
55  UseIlinesFromGM = False
56  EnableCscInternalAlignment = False
57 
58  if flags.Muon.enableAlignment:
59  if not flags.Input.isMC:
60  kwargs.setdefault("BEENoShift", True)
61  # here define if I-lines (CSC internal alignment) are enabled
62  if flags.Muon.Align.UseILines and flags.Detector.GeometryCSC:
63  if 'HLT' in flags.IOVDb.GlobalTag:
64  #logMuon.info("Reading CSC I-Lines from layout - special configuration for COMP200 in HLT setup.")
65  UseIlinesFromGM = True
66  EnableCscInternalAlignment = False
67  else :
68  #logMuon.info("Reading CSC I-Lines from conditions database.")
69  if (flags.Common.isOnline and not flags.Input.isMC):
70  EnableCscInternalAlignment = True
71  else:
72  UseIlinesFromGM = False
73  EnableCscInternalAlignment = True
74 
75  kwargs.setdefault("UseIlinesFromGM", UseIlinesFromGM)
76  kwargs.setdefault("EnableCscInternalAlignment", EnableCscInternalAlignment)
77 
78  if not flags.GeoModel.SQLiteDB:
79 
80  AGDD2Geo = CompFactory.AGDDtoGeoSvc()
81  muonAGDDTool = CompFactory.MuonAGDDTool("MuonSpectrometer", BuildNSW=False)
82  AGDD2Geo.Builders += [ muonAGDDTool ]
83  if (flags.Detector.GeometrysTGC and flags.Detector.GeometryMM):
84  nswAGDDTool = CompFactory.NSWAGDDTool("NewSmallWheel", Locked=False)
85  nswAGDDTool.Volumes = ["NewSmallWheel"]
86  nswAGDDTool.DefaultDetector = "Muon"
87  AGDD2Geo.Builders += [ nswAGDDTool ]
88 
89  #create=True is needed for the service to be initialised in the new style
90  acc.addService(AGDD2Geo, create=True)
91 
92 
93  acc.merge(MuonIdHelperSvcCfg(flags))
94 
95  detTool = CompFactory.MuonDetectorTool(name, **kwargs)
96  acc.setPrivateTools(detTool)
97  return acc
98 
99 

◆ MuonGeoModelCfg()

def python.MuonGeometryConfig.MuonGeoModelCfg (   flags)

Definition at line 28 of file MuonGeometryConfig.py.

28 def MuonGeoModelCfg(flags):
29  result = ComponentAccumulator()
30  result.merge(MuonIdHelperSvcCfg(flags))
31  if flags.Muon.usePhaseIIGeoSetup:
32  from MuonGeoModelR4.MuonGeoModelConfig import MuonGeoModelCfg as MuonGeoModelCfgR4
33  result.merge(MuonGeoModelCfgR4(flags))
34  from MuonGeoModelR4.MuonGeoModelConfig import MuonAlignStoreCfg
35  result.merge(MuonAlignStoreCfg(flags))
36  if flags.Common.ProductionStep != ProductionStep.Simulation:
37  from MuonGeometryCnv.MuonReadoutGeomCnvCfg import MuonReadoutGeometryCnvAlgCfg
38  result.merge(MuonReadoutGeometryCnvAlgCfg(flags))
39  return result
40 
41  result.merge(MuonGeoModelToolCfg(flags))
42  result.merge(MuonDetectorCondAlgCfg(flags))
43  return result
44 
45 

◆ MuonGeoModelToolCfg()

def python.MuonGeometryConfig.MuonGeoModelToolCfg (   flags)

Definition at line 228 of file MuonGeometryConfig.py.

228 def MuonGeoModelToolCfg(flags):
229  result = ComponentAccumulator()
230  geoModelSvc = result.getPrimaryAndMerge(GeoModelCfg(flags))
231  geoModelSvc.DetectorTools+= [result.popToolsAndMerge(MuonDetectorToolCfg(flags))]
232  return result

◆ MuonIdHelperSvcCfg()

def python.MuonGeometryConfig.MuonIdHelperSvcCfg (   flags)

Definition at line 15 of file MuonGeometryConfig.py.

15 def MuonIdHelperSvcCfg(flags):
16  acc = ComponentAccumulator()
17  acc.merge(GeoModelCfg(flags))
18  acc.addService( CompFactory.Muon.MuonIdHelperSvc("MuonIdHelperSvc",
19  HasCSC=flags.Detector.GeometryCSC,
20  HasSTGC=flags.Detector.GeometrysTGC,
21  HasMM=flags.Detector.GeometryMM,
22  HasMDT=flags.Detector.GeometryMDT,
23  HasRPC=flags.Detector.GeometryRPC,
24  HasTGC=flags.Detector.GeometryTGC), primary=True )
25  return acc
26 
27 @AccumulatorCache

◆ NswAsBuiltCondAlgCfg()

def python.MuonGeometryConfig.NswAsBuiltCondAlgCfg (   flags,
  name = "NswAsBuiltCondAlg",
**  kwargs 
)

Definition at line 143 of file MuonGeometryConfig.py.

143 def NswAsBuiltCondAlgCfg(flags, name = "NswAsBuiltCondAlg", **kwargs):
144  result = ComponentAccumulator()
145 
146  if flags.GeoModel.Run < LHCPeriod.Run3:
147  return result
148  kwargs.setdefault("MicroMegaJSON","")
149 
150  kwargs.setdefault("ReadMmAsBuiltParamsKey","/MUONALIGN/ASBUILTPARAMS/MM")
151 
152 
153  from IOVDbSvc.IOVDbSvcConfig import addFolders
154  if(not (kwargs["MicroMegaJSON"] or not kwargs["ReadMmAsBuiltParamsKey"]) ) : # no need to add the folder if we are reading a json file anyhow
155  result.merge(addFolders( flags, kwargs["ReadMmAsBuiltParamsKey"] , 'MUONALIGN_OFL', className='CondAttrListCollection', tag='MuonAlignAsBuiltParamsMm-RUN3-01-00'))
156  the_alg = CompFactory.NswAsBuiltCondAlg(name, **kwargs)
157  result.addCondAlgo(the_alg, primary = True)
158  return result
159 

◆ sTGCAsBuiltCondAlgCfg()

def python.MuonGeometryConfig.sTGCAsBuiltCondAlgCfg (   flags,
  name = "sTGCAsBuiltCondAlg",
**  kwargs 
)

Definition at line 160 of file MuonGeometryConfig.py.

160 def sTGCAsBuiltCondAlgCfg(flags, name = "sTGCAsBuiltCondAlg", **kwargs):
161  result = ComponentAccumulator()
162 
163  if flags.GeoModel.Run < LHCPeriod.Run3 or not flags.Muon.Align.UsesTGCAsBuild:
164  return result
165  kwargs.setdefault("readFromJSON","")
166  if not kwargs["readFromJSON"]:
167  kwargs.setdefault("ReadKey","/MUONALIGN/ASBUILTPARAMS/STGC")
168  from IOVDbSvc.IOVDbSvcConfig import addFolders
169  result.merge(addFolders( flags, kwargs["ReadKey"], 'MUONALIGN_OFL', className='CondAttrListCollection', tag = 'MUONALIGN_STG_IntAl_alCons_noQL3_v01'))
170  the_alg = CompFactory.sTGCAsBuiltCondAlg(name,**kwargs)
171  result.addCondAlgo(the_alg, primary=True)
172  return result
173 
174 
175 
176 

◆ TrackingVolumesSvcCfg()

def python.MuonGeometryConfig.TrackingVolumesSvcCfg (   flags,
  name = "TrackingVolumesSvc",
**  kwargs 
)

Definition at line 10 of file MuonGeometryConfig.py.

10 def TrackingVolumesSvcCfg(flags, name="TrackingVolumesSvc", **kwargs):
11  result = ComponentAccumulator()
12  trackingVolSvc = CompFactory.Trk.TrackingVolumesSvc(name=name, **kwargs)
13  result.addService(trackingVolSvc, primary=True)
14  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MuonGeoModelConfig.MuonAlignStoreCfg
def MuonAlignStoreCfg(flags)
Definition: MuonGeoModelConfig.py:84
MuonReadoutGeomCnvCfg.MuonReadoutGeometryCnvAlgCfg
def MuonReadoutGeometryCnvAlgCfg(flags, name="MuonDetectorCondAlg", **kwargs)
Definition: MuonReadoutGeomCnvCfg.py:7
python.MuonGeometryConfig.MuonAlignmentCondAlgCfg
def MuonAlignmentCondAlgCfg(flags, name="MuonAlignmentCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:100
python.MuonGeometryConfig.MdtAsBuiltCondAlgCfg
def MdtAsBuiltCondAlgCfg(flags, name="MdtAsBuiltCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:177
python.MuonCondAlgConfig.NswPassivationDbAlgCfg
def NswPassivationDbAlgCfg(flags, **kwargs)
Definition: MuonCondAlgConfig.py:338
python.MuonGeometryConfig.NswAsBuiltCondAlgCfg
def NswAsBuiltCondAlgCfg(flags, name="NswAsBuiltCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:143
python.MuonGeometryConfig.MuonIdHelperSvcCfg
def MuonIdHelperSvcCfg(flags)
Definition: MuonGeometryConfig.py:15
python.MuonGeometryConfig.TrackingVolumesSvcCfg
def TrackingVolumesSvcCfg(flags, name="TrackingVolumesSvc", **kwargs)
Definition: MuonGeometryConfig.py:10
python.MuonGeometryConfig.MuonDetectorToolCfg
def MuonDetectorToolCfg(flags, name="MuonDetectorTool", **kwargs)
Definition: MuonGeometryConfig.py:46
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:81
python.MuonGeometryConfig.CscILineCondAlgCfg
def CscILineCondAlgCfg(flags, name="CscILinesCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:186
python.MuonGeometryConfig.sTGCAsBuiltCondAlgCfg
def sTGCAsBuiltCondAlgCfg(flags, name="sTGCAsBuiltCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:160
python.MuonGeometryConfig.MuonDetectorCondAlgCfg
def MuonDetectorCondAlgCfg(flags, name="MuonDetectorCondAlg", **kwargs)
Definition: MuonGeometryConfig.py:202
python.MuonGeometryConfig.MuonAlignmentErrorDbAlgCfg
def MuonAlignmentErrorDbAlgCfg(flags)
Definition: MuonGeometryConfig.py:136
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
python.MuonGeometryConfig.MuonGeoModelToolCfg
def MuonGeoModelToolCfg(flags)
Definition: MuonGeometryConfig.py:228
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16