ATLAS Offline Software
MuonSimHitCnvCfg.py
Go to the documentation of this file.
1 #Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def xAODSimHitToMdtMeasCnvAlgCfg(flags,name = "SimHitToMdtMeasurementCnvAlg", **kwargs):
7  result = ComponentAccumulator()
8  from MuonConfig.MuonCalibrationConfig import MdtCalibDbAlgCfg
9  result.merge(MdtCalibDbAlgCfg(flags))
10  from RngComps.RngCompsConfig import AthRNGSvcCfg
11  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
12  the_alg = CompFactory.xAODSimHitToMdtMeasCnvAlg(name, **kwargs)
13  result.addEventAlgo(the_alg, primary = True)
14  return result
15 
16 def xAODSimHitToRpcMeasCnvAlgCfg(flags,name = "SimHitToRpcMeasurementCnvAlg", **kwargs):
17  result = ComponentAccumulator()
18  from RngComps.RngCompsConfig import AthRNGSvcCfg
19  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
20  the_alg = CompFactory.xAODSimHitToRpcMeasCnvAlg(name, **kwargs)
21  result.addEventAlgo(the_alg, primary = True)
22  from xAODMuonMeasViewAlgs.ViewAlgsConfig import RpcMeasViewAlgCfg
23  result.merge(RpcMeasViewAlgCfg(flags))
24  return result
25 
26 def xAODSimHitToTgcMeasCnvAlgCfg(flags,name = "SimHitToTgcMeasurementCnvAlg", **kwargs):
27  result = ComponentAccumulator()
28  from RngComps.RngCompsConfig import AthRNGSvcCfg
29  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
30  the_alg = CompFactory.xAODSimHitToTgcMeasCnvAlg(name, **kwargs)
31  result.addEventAlgo(the_alg, primary = True)
32  return result
33 
34 def xAODSimHitTosTGCMeasCnvAlgCfg(flags, name = "SimHitTosTGCMeasurementCnvAlg",**kwargs):
35  result = ComponentAccumulator()
36  from RngComps.RngCompsConfig import AthRNGSvcCfg
37  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
38  from MuonConfig.MuonCalibrationConfig import NswErrorCalibDbAlgCfg
39  result.merge(NswErrorCalibDbAlgCfg(flags))
40 
41  the_alg = CompFactory.xAODSimHitTosTGCMeasCnvAlg(name,**kwargs)
42  result.addEventAlgo(the_alg,primary=True)
43  from xAODMuonMeasViewAlgs.ViewAlgsConfig import sTgcMeasViewAlgCfg
44  result.merge(sTgcMeasViewAlgCfg(flags))
45  return result
46 
47 def xAODSimHitToMmMeasCnvAlgCfg(flags, name = "SimHitToMmMeasurementCnvAlg",**kwargs):
48  result = ComponentAccumulator()
49  from RngComps.RngCompsConfig import AthRNGSvcCfg
50  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
51  from MuonConfig.MuonCalibrationConfig import NswErrorCalibDbAlgCfg
52  result.merge(NswErrorCalibDbAlgCfg(flags))
53 
54  the_alg = CompFactory.xAODSimHitToMmMeasCnvAlg(name,**kwargs)
55  result.addEventAlgo(the_alg,primary=True)
56  return result
57 
58 
59 def MmFastDigitizationCfg(flags, name="MmFastDigitizer", **kwargs):
60  result = ComponentAccumulator()
61  kwargs.setdefault("StreamName", "MmSimForklift")
62  kwargs.setdefault("OutputSDOName", "MM_SDO")
63  kwargs.setdefault("SimHitKey", "xMmSimHits")
64  kwargs.setdefault("EffiDataKey", "")
65 
66  from MuonConfig.MuonCalibrationConfig import NswErrorCalibDbAlgCfg
67  result.merge(NswErrorCalibDbAlgCfg(flags))
68 
69  from RngComps.RngCompsConfig import AthRNGSvcCfg
70  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
71  the_tool = CompFactory.MuonR4.MmFastDigiTool(name="MmDigitizationTool", **kwargs)
72  the_alg = CompFactory.MuonDigitizer(name,
73  DigitizationTool = the_tool)
74  result.addEventAlgo(the_alg, primary = True)
75  return result
76 def RpcFastDigitizationCfg(flags, name="RpcFastDigitizer", **kwargs):
77  result = ComponentAccumulator()
78  kwargs.setdefault("StreamName", "RpcSimForklift")
79  kwargs.setdefault("OutputSDOName", "RPC_SDO")
80  kwargs.setdefault("SimHitKey", "xRpcSimHits")
81  kwargs.setdefault("EffiDataKey", "")
82  from RngComps.RngCompsConfig import AthRNGSvcCfg
83  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
84  the_tool = CompFactory.MuonR4.RpcFastDigiTool(name="RpcDigitizationTool", **kwargs)
85  the_alg = CompFactory.MuonDigitizer(name,
86  DigitizationTool = the_tool)
87  result.addEventAlgo(the_alg, primary = True)
88  return result
89 def RpcDigitToMeasCnvAlgCfg(flags, name ="RpcDigitToMeasCnvAlg", **kwargs):
90  result = ComponentAccumulator()
91  from xAODMuonMeasViewAlgs.ViewAlgsConfig import RpcMeasViewAlgCfg
92  result.merge(RpcMeasViewAlgCfg(flags))
93  the_alg = CompFactory.MuonR4.RpcDigitToRpcMeasCnvAlg(name, **kwargs)
94  result.addEventAlgo(the_alg, primary = True)
95  return result
96 
97 def TgcFastDigitizationCfg(flags, name = "TgcFastDigitizer", **kwargs):
98  result = ComponentAccumulator()
99  kwargs.setdefault("StreamName", "TgcSimForklift")
100  kwargs.setdefault("OutputSDOName", "TGC_SDO")
101  kwargs.setdefault("SimHitKey", "xTgcSimHits")
102  kwargs.setdefault("EffiDataKey", "")
103  from RngComps.RngCompsConfig import AthRNGSvcCfg
104  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
105  the_tool = CompFactory.MuonR4.TgcFastDigiTool(name="TgcDigitizationTool", **kwargs)
106  the_alg = CompFactory.MuonDigitizer(name,
107  DigitizationTool = the_tool)
108  result.addEventAlgo(the_alg, primary = True)
109  return result
110 
111 def sTgcFastDigitizationCfg(flags, name="sTgcFastDigitizer", **kwargs):
112  result = ComponentAccumulator()
113  result = ComponentAccumulator()
114  kwargs.setdefault("StreamName", "sTgcSimForklift")
115  kwargs.setdefault("OutputSDOName", "STGC_SDO")
116  kwargs.setdefault("SimHitKey", "xStgcSimHits")
117  kwargs.setdefault("EffiDataKey", "")
118  from MuonConfig.MuonCalibrationConfig import NswErrorCalibDbAlgCfg
119  result.merge(NswErrorCalibDbAlgCfg(flags))
120  from RngComps.RngCompsConfig import AthRNGSvcCfg
121  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
122  the_tool = CompFactory.MuonR4.sTgcFastDigiTool(name="sTgcDigitizationTool", **kwargs)
123  the_alg = CompFactory.MuonDigitizer(name,
124  DigitizationTool = the_tool)
125  result.addEventAlgo(the_alg, primary = True)
126 
127  return result
128 
132  result = ComponentAccumulator()
133  if flags.Detector.GeometryMDT:
134  from MuonConfig.MDT_DigitizationConfig import MDT_DigitizationDigitToRDOCfg
135  #result.merge(xAODSimHitToMdtMeasCnvAlgCfg(flags))
136  from MuonConfig.MuonRdoDecodeConfig import MdtRDODecodeCfg
137  result.merge(MDT_DigitizationDigitToRDOCfg(flags))
138  result.merge(MdtRDODecodeCfg(flags))
139  if flags.Detector.GeometryRPC:
140  #result.merge(xAODSimHitToRpcMeasCnvAlgCfg(flags))
141  result.merge(RpcFastDigitizationCfg(flags))
142  result.merge(RpcDigitToMeasCnvAlgCfg(flags))
143  if flags.Detector.GeometryTGC:
144  #result.merge(xAODSimHitToTgcMeasCnvAlgCfg(flags))
145  result.merge(TgcFastDigitizationCfg(flags))
146  from MuonConfig.MuonByteStreamCnvTestConfig import TgcDigitToTgcRDOCfg
147  from MuonConfig.MuonCablingConfig import TGCCablingConfigCfg
148  result.merge(TGCCablingConfigCfg(flags))
149  result.merge(TgcDigitToTgcRDOCfg(flags))
150  from MuonConfig.MuonRdoDecodeConfig import TgcRDODecodeCfg
151  result.merge(TgcRDODecodeCfg(flags))
152 
153 
154  if flags.Detector.GeometrysTGC:
155  #result.merge(xAODSimHitTosTGCMeasCnvAlgCfg(flags))
156  result.merge(sTgcFastDigitizationCfg(flags))
157  from MuonConfig.MuonByteStreamCnvTestConfig import STGC_DigitToRDOCfg
158  result.merge(STGC_DigitToRDOCfg(flags))
159  from MuonConfig.MuonRdoDecodeConfig import StgcRDODecodeCfg
160  result.merge(StgcRDODecodeCfg(flags))
161  if flags.Detector.GeometryMM:
162  #result.merge(xAODSimHitToMmMeasCnvAlgCfg(flags))
163  result.merge(MmFastDigitizationCfg(flags))
164  from MuonConfig.MuonByteStreamCnvTestConfig import MM_DigitToRDOCfg
165  result.merge(MM_DigitToRDOCfg(flags))
166  from MuonConfig.MuonRdoDecodeConfig import MMRDODecodeCfg
167  result.merge(MMRDODecodeCfg(flags))
168 
169  return result
ViewAlgsConfig.RpcMeasViewAlgCfg
def RpcMeasViewAlgCfg(flags, name="RpcMeasViewAlg", **kwargs)
Definition: ViewAlgsConfig.py:14
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonByteStreamCnvTestConfig.MM_DigitToRDOCfg
def MM_DigitToRDOCfg(flags, name="MM_DigitToRDO", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:244
MuonSimHitCnvCfg.MuonSimHitToMeasurementCfg
def MuonSimHitToMeasurementCfg(flags)
Configuration snippet to go from xAOD::MuonSimHit to xAOD::MuonPrepData
Definition: MuonSimHitCnvCfg.py:131
python.MuonRdoDecodeConfig.StgcRDODecodeCfg
def StgcRDODecodeCfg(flags, name="StgcRdoToStgcPrepData", **kwargs)
Definition: MuonRdoDecodeConfig.py:169
python.MuonCalibrationConfig.NswErrorCalibDbAlgCfg
def NswErrorCalibDbAlgCfg(flags, name="NswErrorCalibDbAlg", **kwargs)
Definition: MuonCalibrationConfig.py:174
MuonSimHitCnvCfg.xAODSimHitToTgcMeasCnvAlgCfg
def xAODSimHitToTgcMeasCnvAlgCfg(flags, name="SimHitToTgcMeasurementCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:26
python.MuonRdoDecodeConfig.MMRDODecodeCfg
def MMRDODecodeCfg(flags, name="MM_RdoToMM_PrepData", **kwargs)
Definition: MuonRdoDecodeConfig.py:198
ViewAlgsConfig.sTgcMeasViewAlgCfg
def sTgcMeasViewAlgCfg(flags, name="sTgcMeasViewAlg", **kwargs)
Definition: ViewAlgsConfig.py:6
MuonSimHitCnvCfg.xAODSimHitTosTGCMeasCnvAlgCfg
def xAODSimHitTosTGCMeasCnvAlgCfg(flags, name="SimHitTosTGCMeasurementCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:34
python.MuonCablingConfig.TGCCablingConfigCfg
def TGCCablingConfigCfg(flags)
Definition: MuonCablingConfig.py:74
MuonSimHitCnvCfg.RpcDigitToMeasCnvAlgCfg
def RpcDigitToMeasCnvAlgCfg(flags, name="RpcDigitToMeasCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:89
MuonSimHitCnvCfg.TgcFastDigitizationCfg
def TgcFastDigitizationCfg(flags, name="TgcFastDigitizer", **kwargs)
Definition: MuonSimHitCnvCfg.py:97
python.MuonByteStreamCnvTestConfig.STGC_DigitToRDOCfg
def STGC_DigitToRDOCfg(flags, name="STGC_DigitToRDO", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:227
python.MDT_DigitizationConfig.MDT_DigitizationDigitToRDOCfg
def MDT_DigitizationDigitToRDOCfg(flags)
Definition: MDT_DigitizationConfig.py:174
MuonSimHitCnvCfg.sTgcFastDigitizationCfg
def sTgcFastDigitizationCfg(flags, name="sTgcFastDigitizer", **kwargs)
Definition: MuonSimHitCnvCfg.py:111
MuonSimHitCnvCfg.xAODSimHitToMdtMeasCnvAlgCfg
def xAODSimHitToMdtMeasCnvAlgCfg(flags, name="SimHitToMdtMeasurementCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:6
MuonSimHitCnvCfg.MmFastDigitizationCfg
def MmFastDigitizationCfg(flags, name="MmFastDigitizer", **kwargs)
Definition: MuonSimHitCnvCfg.py:59
python.MuonRdoDecodeConfig.TgcRDODecodeCfg
def TgcRDODecodeCfg(flags, name="TgcRdoToTgcPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:108
MuonSimHitCnvCfg.xAODSimHitToMmMeasCnvAlgCfg
def xAODSimHitToMmMeasCnvAlgCfg(flags, name="SimHitToMmMeasurementCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:47
MuonSimHitCnvCfg.xAODSimHitToRpcMeasCnvAlgCfg
def xAODSimHitToRpcMeasCnvAlgCfg(flags, name="SimHitToRpcMeasurementCnvAlg", **kwargs)
Definition: MuonSimHitCnvCfg.py:16
python.MuonByteStreamCnvTestConfig.TgcDigitToTgcRDOCfg
def TgcDigitToTgcRDOCfg(flags, name="TgcDigitToTgcRDO", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:175
python.MuonCalibrationConfig.MdtCalibDbAlgCfg
def MdtCalibDbAlgCfg(flags, name="MdtCalibDbAlg", **kwargs)
Definition: MuonCalibrationConfig.py:101
MuonSimHitCnvCfg.RpcFastDigitizationCfg
def RpcFastDigitizationCfg(flags, name="RpcFastDigitizer", **kwargs)
Definition: MuonSimHitCnvCfg.py:76
python.MuonRdoDecodeConfig.MdtRDODecodeCfg
def MdtRDODecodeCfg(flags, name="MdtRdoToMdtPrepData", RDOContainer=None, **kwargs)
Definition: MuonRdoDecodeConfig.py:211
RngCompsConfig.AthRNGSvcCfg
def AthRNGSvcCfg(flags, name="AthRNGSvc")
Definition: RngCompsConfig.py:51