ATLAS Offline Software
Functions | Variables
python.MuonCablingConfig Namespace Reference

Functions

def NRPCCablingConfigCfg (flags, name="MuonNRPC_CablingAlg", **kwargs)
 
def RPCCablingConfigCfg (flags)
 
def RPCLegacyCablingConfigCfg (flags)
 
def TGCCablingDbToolCfg (flags)
 
def MuonTGC_CablingSvcCfg (flags)
 
def TGCCablingConfigCfg (flags)
 
def MDTCablingConfigCfg (flags, name="MuonMDT_CablingAlg", **kwargs)
 
def MdtTwinTubeMapCondAlgCfg (flags, name="MdtTwinTubeCondAlg", **kwargs)
 
def CSCCablingConfigCfg (flags)
 
def NswCablingCfg (flags, name="MuonNSW_CablingAlg", **kwargs)
 
def MuonCablingConfigCfg (flags)
 

Variables

 flags = initConfigFlags()
 
 Files
 
 AtlasVersion
 
 acc = ComponentAccumulator()
 
def result = MuonCablingConfigCfg(flags)
 
 f = open('MuonCabling.pkl','wb')
 

Function Documentation

◆ CSCCablingConfigCfg()

def python.MuonCablingConfig.CSCCablingConfigCfg (   flags)

Definition at line 166 of file MuonCablingConfig.py.

166 def CSCCablingConfigCfg(flags):
167  acc = ComponentAccumulator()
168  if not flags.Detector.GeometryCSC: return acc
169  CSCcablingSvc=CompFactory.CSCcablingSvc
170  cscCablingSvc = CSCcablingSvc()
171 
172  acc.addService( cscCablingSvc, primary=True )
173 
174  return acc
175 

◆ MDTCablingConfigCfg()

def python.MuonCablingConfig.MDTCablingConfigCfg (   flags,
  name = "MuonMDT_CablingAlg",
**  kwargs 
)

Definition at line 100 of file MuonCablingConfig.py.

100 def MDTCablingConfigCfg(flags, name = "MuonMDT_CablingAlg", **kwargs):
101  acc = ComponentAccumulator()
102  if not flags.Detector.GeometryMDT: return acc
103  from AthenaConfiguration.Enums import LHCPeriod
104 
105  kwargs.setdefault("UseJSONFormat", flags.Muon.usePhaseIIGeoSetup and \
106  flags.GeoModel.Run >= LHCPeriod.Run4)
107 
108  kwargs.setdefault("MezzanineJSON", "")
109  kwargs.setdefault("CablingJSON", "")
110 
111  kwargs.setdefault("isRun3", flags.GeoModel.Run >= LHCPeriod.Run3 )
112  from IOVDbSvc.IOVDbSvcConfig import addFolders
113  if len(kwargs["MezzanineJSON"]) == 0 and len(kwargs["CablingJSON"]) == 0:
114  if flags.Input.isMC is True:
115  dbTagMezz = None
116  dbTagSchema = None
117  if flags.Muon.usePhaseIIGeoSetup and \
118  flags.GeoModel.Run >= LHCPeriod.Run4:
119  dbTagMezz = "MDTMezMapSchemaJSON_RUN4_FantasyCabling_1"
120  dbTagSchema = "MDTCablingMapSchemaJSON_RUN4_FantasyCabling_1"
121  elif flags.GeoModel.Run >= LHCPeriod.Run4:
122  dbTagSchema = "MDTOflCablingMapSchema_RUN124_MC15_02"
123  dbTagMezz = "MDTOflCablingMezzanineSchema_RUN124_MC15_02"
124  if kwargs["UseJSONFormat"]:
125  kwargs.setdefault("MapFolders", "/MDT/CABLING/MAP_SCHEMA_JSON")
126  kwargs.setdefault("MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA_JSON")
127  else:
128  kwargs.setdefault("MapFolders", "/MDT/Ofl/CABLING/MAP_SCHEMA")
129  kwargs.setdefault("MezzanineFolders", "/MDT/Ofl/CABLING/MEZZANINE_SCHEMA")
130  acc.merge( addFolders( flags, [kwargs["MapFolders"]], 'MDT_OFL',
131  className="CondAttrListCollection", tag = dbTagSchema))
132  acc.merge( addFolders( flags, [kwargs["MezzanineFolders"]], 'MDT_OFL',
133  className="CondAttrListCollection", tag = dbTagMezz) )
134  else:
135  if kwargs["UseJSONFormat"]:
136  kwargs.setdefault("MapFolders", "/MDT/CABLING/MAP_SCHEMA_JSON")
137  kwargs.setdefault("MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA_JSON")
138  else:
139  kwargs.setdefault("MapFolders", "/MDT/CABLING/MAP_SCHEMA")
140  kwargs.setdefault("MezzanineFolders", "/MDT/CABLING/MEZZANINE_SCHEMA")
141  acc.merge( addFolders( flags, [kwargs["MapFolders"], kwargs["MezzanineFolders"]], 'MDT',
142  className="CondAttrListCollection") )
143 
144 
145  MDTCablingAlg = CompFactory.MuonMDT_CablingAlg(name, **kwargs)
146  acc.addCondAlgo( MDTCablingAlg, primary = True )
147 
148  return acc
149 

◆ MdtTwinTubeMapCondAlgCfg()

def python.MuonCablingConfig.MdtTwinTubeMapCondAlgCfg (   flags,
  name = "MdtTwinTubeCondAlg",
**  kwargs 
)

Definition at line 150 of file MuonCablingConfig.py.

150 def MdtTwinTubeMapCondAlgCfg(flags, name="MdtTwinTubeCondAlg", **kwargs):
151  result = ComponentAccumulator()
152  if not flags.Detector.GeometryMDT: return result
153  kwargs.setdefault("JSONFile","")
154  if(not kwargs["JSONFile"]):
155  kwargs.setdefault("FolderName","/MDT/TWINMAPPING")
156  from IOVDbSvc.IOVDbSvcConfig import addFolders
157  result.merge(addFolders(flags,[kwargs["FolderName"]], ("MDT_OFL" if flags.Input.isMC else "MDT"),className="CondAttrListCollection", tag="MDTTwinMapping_compactFormat_Run123"))
158  else:
159  kwargs["FolderName"] = ""
160 
161  the_alg = CompFactory.Muon.TwinTubeMappingCondAlg(name, **kwargs)
162  result.addCondAlgo(the_alg, primary = True)
163  return result
164 
165 # This should be checked by experts

◆ MuonCablingConfigCfg()

def python.MuonCablingConfig.MuonCablingConfigCfg (   flags)

Definition at line 191 of file MuonCablingConfig.py.

191 def MuonCablingConfigCfg(flags):
192  acc = ComponentAccumulator()
193  acc.merge( RPCCablingConfigCfg(flags) )
194  acc.merge( TGCCablingConfigCfg(flags) )
195 
196  acc.merge( MDTCablingConfigCfg(flags) )
197 
198  acc.merge( CSCCablingConfigCfg(flags) )
199 
200  acc.merge(NswCablingCfg(flags))
201 
202  return acc
203 

◆ MuonTGC_CablingSvcCfg()

def python.MuonCablingConfig.MuonTGC_CablingSvcCfg (   flags)

Definition at line 72 of file MuonCablingConfig.py.

72 def MuonTGC_CablingSvcCfg(flags):
73  acc = ComponentAccumulator()
74 
75  svc = CompFactory.MuonTGC_CablingSvc()
76  tool = acc.popToolsAndMerge(TGCCablingDbToolCfg(flags))
77  # The same tool is used as a public tool by TGCCableASDToPP and a
78  # private tool by MuonTGC_CablingSvc - not great...
79  acc.addPublicTool(tool)
80  svc.TGCCablingDbTool = tool
81  acc.addService(svc, primary = True)
82 
83  return acc
84 
85 

◆ NRPCCablingConfigCfg()

def python.MuonCablingConfig.NRPCCablingConfigCfg (   flags,
  name = "MuonNRPC_CablingAlg",
**  kwargs 
)

Definition at line 6 of file MuonCablingConfig.py.

6 def NRPCCablingConfigCfg(flags, name = "MuonNRPC_CablingAlg", **kwargs):
7  result = ComponentAccumulator()
8 
9 
10  kwargs.setdefault("JSONFile", "")
11  if len(kwargs["JSONFile"]) == 0:
12  from IOVDbSvc.IOVDbSvcConfig import addFolders
13  dbName = 'RPC_OFL' if flags.Input.isMC else 'RPC'
14  cablingFolder = "/RPC/NCABLING/JSON" if flags.Input.isMC else "/RPC/Onl/NCABLING/JSON"
15  cablingTag = "RpcNcablingJson-RUN3-04"
16  from AthenaConfiguration.Enums import LHCPeriod
17  if flags.Muon.usePhaseIIGeoSetup and flags.Input.isMC:
18  if flags.GeoModel.Run <= LHCPeriod.Run3:
19  cablingTag = "RpcNcablingJson-RUN3-FantasyCabling-2"
20  else:
21  cablingTag = "RpcNcablingJson-RUN4-FantasyCabling-3"
22 
23  result.merge(addFolders(flags, [cablingFolder], detDb=dbName, className='CondAttrListCollection', tag=cablingTag))
24  kwargs.setdefault("MapFolders", cablingFolder)
25 
26 
27  NRPCCablingAlg = CompFactory.MuonNRPC_CablingAlg(name, **kwargs)
28 
29  result.addCondAlgo( NRPCCablingAlg, primary= True)
30  return result
31 
32 

◆ NswCablingCfg()

def python.MuonCablingConfig.NswCablingCfg (   flags,
  name = "MuonNSW_CablingAlg",
**  kwargs 
)

Definition at line 176 of file MuonCablingConfig.py.

176 def NswCablingCfg(flags, name = "MuonNSW_CablingAlg", **kwargs):
177  result = ComponentAccumulator()
178 
179  if flags.Input.isMC or (not flags.Detector.GeometryMM and not flags.Detector.GeometrysTGC):
180  return result
181 
182  from IOVDbSvc.IOVDbSvcConfig import addFolders
183  cablingFolder = ["/MDT/MM/CABLING" if not flags.Common.isOnline else "/MDT/Onl/MM/CABLING"]
184  kwargs.setdefault("CablingFolder",cablingFolder)
185  result.merge(addFolders(flags, kwargs["CablingFolder"], detDb=("MDT_OFL" if not flags.Common.isOnline else "MDT_ONL"), className="CondAttrListCollection"))
186 
187  the_alg = CompFactory.MuonNSW_CablingAlg(name, **kwargs)
188  result.addCondAlgo(the_alg, primary = True)
189  return result
190 #All the cabling configs together (convenience function)

◆ RPCCablingConfigCfg()

def python.MuonCablingConfig.RPCCablingConfigCfg (   flags)

Definition at line 33 of file MuonCablingConfig.py.

33 def RPCCablingConfigCfg(flags):
34  acc = ComponentAccumulator()
35  if not flags.Detector.GeometryRPC: return acc
36  if flags.Muon.enableNRPC:
37  acc.merge(NRPCCablingConfigCfg(flags))
38  acc.merge(RPCLegacyCablingConfigCfg(flags))
39  return acc
40 

◆ RPCLegacyCablingConfigCfg()

def python.MuonCablingConfig.RPCLegacyCablingConfigCfg (   flags)

Definition at line 41 of file MuonCablingConfig.py.

41 def RPCLegacyCablingConfigCfg(flags):
42  acc = ComponentAccumulator()
43  dbName = 'RPC_OFL' if flags.Input.isMC else 'RPC'
44  dbRepo="MuonRPC_Cabling/ATLAS.data"
45  rpcCabMap="/RPC/CABLING/MAP_SCHEMA"
46  rpcCabMapCorr="/RPC/CABLING/MAP_SCHEMA_CORR"
47  rpcTrigEta="/RPC/TRIGGER/CM_THR_ETA"
48  rpcTrigPhi="/RPC/TRIGGER/CM_THR_PHI"
49 
50  from IOVDbSvc.IOVDbSvcConfig import addFolders
51  acc.merge(addFolders(flags, [rpcCabMap,rpcCabMapCorr], dbName, className='CondAttrListCollection' ))
52 
53  acc.merge(addFolders(flags, [rpcTrigEta,rpcTrigPhi], dbName, className='CondAttrListCollection'))
54 
55  RpcCablingCondAlg=CompFactory.RpcCablingCondAlg
56  RpcCablingAlg = RpcCablingCondAlg("RpcCablingCondAlg",DatabaseRepository=dbRepo)
57  acc.addCondAlgo( RpcCablingAlg )
58 
59  return acc
60 
61 

◆ TGCCablingConfigCfg()

def python.MuonCablingConfig.TGCCablingConfigCfg (   flags)

Definition at line 86 of file MuonCablingConfig.py.

86 def TGCCablingConfigCfg(flags):
87  acc = ComponentAccumulator()
88  if not flags.Detector.GeometryTGC: return acc
89 
90  acc.merge(MuonTGC_CablingSvcCfg(flags))
91 
92  from IOVDbSvc.IOVDbSvcConfig import addFolders
93  dbName = 'TGC_OFL' if flags.Input.isMC else 'TGC'
94  acc.merge(addFolders(flags, '/TGC/CABLING/MAP_SCHEMA', dbName))
95 
96  return acc
97 
98 # This should be checked by experts since I just wrote it based on
99 # athena/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCablingConfig.py

◆ TGCCablingDbToolCfg()

def python.MuonCablingConfig.TGCCablingDbToolCfg (   flags)

Definition at line 62 of file MuonCablingConfig.py.

62 def TGCCablingDbToolCfg(flags):
63  acc = ComponentAccumulator()
64 
65  filename = 'ASD2PP_diff_12_OFL.db' if flags.Input.isMC else 'ASD2PP_diff_12_ONL.db'
66  acc.setPrivateTools(CompFactory.TGCCablingDbTool(name = "TGCCablingDbTool",
67  filename_ASD2PP_DIFF_12 = filename))
68 
69  return acc
70 
71 

Variable Documentation

◆ acc

python.MuonCablingConfig.acc = ComponentAccumulator()

Definition at line 212 of file MuonCablingConfig.py.

◆ AtlasVersion

python.MuonCablingConfig.AtlasVersion

Definition at line 209 of file MuonCablingConfig.py.

◆ f

python.MuonCablingConfig.f = open('MuonCabling.pkl','wb')

Definition at line 217 of file MuonCablingConfig.py.

◆ Files

python.MuonCablingConfig.Files

Definition at line 208 of file MuonCablingConfig.py.

◆ flags

python.MuonCablingConfig.flags = initConfigFlags()

Definition at line 207 of file MuonCablingConfig.py.

◆ result

def python.MuonCablingConfig.result = MuonCablingConfigCfg(flags)

Definition at line 214 of file MuonCablingConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonCablingConfig.NswCablingCfg
def NswCablingCfg(flags, name="MuonNSW_CablingAlg", **kwargs)
Definition: MuonCablingConfig.py:176
python.MuonCablingConfig.MdtTwinTubeMapCondAlgCfg
def MdtTwinTubeMapCondAlgCfg(flags, name="MdtTwinTubeCondAlg", **kwargs)
Definition: MuonCablingConfig.py:150
python.MuonCablingConfig.TGCCablingConfigCfg
def TGCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:86
python.MuonCablingConfig.MDTCablingConfigCfg
def MDTCablingConfigCfg(flags, name="MuonMDT_CablingAlg", **kwargs)
Definition: MuonCablingConfig.py:100
CSCcablingSvc
Definition: CSCcablingSvc.h:23
python.MuonCablingConfig.NRPCCablingConfigCfg
def NRPCCablingConfigCfg(flags, name="MuonNRPC_CablingAlg", **kwargs)
Definition: MuonCablingConfig.py:6
RpcCablingCondAlg
Definition: RpcCablingCondAlg.h:20
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
python.MuonCablingConfig.TGCCablingDbToolCfg
def TGCCablingDbToolCfg(flags)
Definition: MuonCablingConfig.py:62
python.MuonCablingConfig.CSCCablingConfigCfg
def CSCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:166
python.MuonCablingConfig.MuonCablingConfigCfg
def MuonCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:191
python.MuonCablingConfig.RPCCablingConfigCfg
def RPCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:33
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
python.MuonCablingConfig.MuonTGC_CablingSvcCfg
def MuonTGC_CablingSvcCfg(flags)
Definition: MuonCablingConfig.py:72
python.MuonCablingConfig.RPCLegacyCablingConfigCfg
def RPCLegacyCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:41