4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 GlobalFieldManagerTool, DetectorFieldManagerTool=CompFactory.getComps(
"GlobalFieldManagerTool",
"DetectorFieldManagerTool",)
7 from G4AtlasServices.G4AtlasFieldServices
import StandardFieldSvcCfg, Q1FwdG4FieldSvcCfg, Q2FwdG4FieldSvcCfg, Q3FwdG4FieldSvcCfg, D1FwdG4FieldSvcCfg, D2FwdG4FieldSvcCfg, Q4FwdG4FieldSvcCfg, Q5FwdG4FieldSvcCfg, Q6FwdG4FieldSvcCfg, Q7FwdG4FieldSvcCfg, Q1HKickFwdG4FieldSvcCfg, Q1VKickFwdG4FieldSvcCfg, Q2HKickFwdG4FieldSvcCfg, Q2VKickFwdG4FieldSvcCfg, Q3HKickFwdG4FieldSvcCfg, Q3VKickFwdG4FieldSvcCfg, Q4VKickAFwdG4FieldSvcCfg, Q4HKickFwdG4FieldSvcCfg, Q4VKickBFwdG4FieldSvcCfg, Q5HKickFwdG4FieldSvcCfg, Q6VKickFwdG4FieldSvcCfg
11 """Return the TruthService config flagged by Sim.TruthStrategy"""
12 from Monopole.MonopoleConfig
import G4mplEqMagElectricFieldToolCfg
14 "G4mplEqMagElectricField" : G4mplEqMagElectricFieldToolCfg,
16 xCfg = stratmap[flags.Sim.G4EquationOfMotion]
17 return xCfg(flags, **kwargs)
23 kwargs.setdefault(
"IntegratorStepper", flags.Sim.G4Stepper)
25 kwargs.setdefault(
"UseTightMuonStepping",
False)
26 if flags.Sim.G4EquationOfMotion:
34 kwargs.setdefault(
"IntegratorStepper", flags.Sim.G4Stepper)
36 kwargs.setdefault(
"UseTightMuonStepping",
True)
37 if flags.Sim.G4EquationOfMotion:
45 kwargs.setdefault(
"IntegratorStepper",
"ClassicalRK4")
51 if 'FieldSvc' not in kwargs:
53 kwargs.setdefault(
"IntegratorStepper", flags.Sim.G4Stepper)
54 kwargs.setdefault(
'MuonOnlyField',
False)
55 if flags.Sim.G4EquationOfMotion:
62 kwargs.setdefault(
"LogicalVolumes", [
'BeamPipe::BeamPipe'])
64 kwargs.setdefault(
'DeltaIntersection', 0.00001)
65 kwargs.setdefault(
'DeltaOneStep', 0.0001)
66 kwargs.setdefault(
'MaximumEpsilonStep', 0.001)
67 kwargs.setdefault(
'MinimumEpsilonStep', 0.00001)
72 kwargs.setdefault(
"LogicalVolumes", [
'IDET::IDET'])
74 kwargs.setdefault(
'DeltaIntersection', 0.00001)
75 kwargs.setdefault(
'DeltaOneStep', 0.0001)
76 kwargs.setdefault(
'MaximumEpsilonStep', 0.001)
77 kwargs.setdefault(
'MinimumEpsilonStep', 0.00001)
82 kwargs.setdefault(
"LogicalVolumes", [
'ITK::ITK'])
84 kwargs.setdefault(
'DeltaIntersection', 0.00001)
85 kwargs.setdefault(
'DeltaOneStep', 0.0001)
86 kwargs.setdefault(
'MaximumEpsilonStep', 0.001)
87 kwargs.setdefault(
'MinimumEpsilonStep', 0.00001)
92 kwargs.setdefault(
"PhysicalVolumes", [
'LArBarrel'])
94 kwargs.setdefault(
'DeltaIntersection', 0.00000002)
95 kwargs.setdefault(
'DeltaOneStep', 0.000001)
96 kwargs.setdefault(
'MaximumEpsilonStep', 0.000001)
97 kwargs.setdefault(
'MinimumEpsilonStep', 0.0000009)
98 kwargs.setdefault(
'MuonOnlyField',
True)
102 kwargs.setdefault(
"LogicalVolumes", [
'MUONQ02::MUONQ02'])
104 kwargs.setdefault(
'DeltaIntersection', 0.00000002)
105 kwargs.setdefault(
'DeltaOneStep', 0.000001)
106 kwargs.setdefault(
'MaximumEpsilonStep', 0.000001)
107 kwargs.setdefault(
'MinimumEpsilonStep', 0.0000009)
114 kwargs.setdefault(
'DeltaIntersection', 1e-9)
115 kwargs.setdefault(
'DeltaOneStep', 1e-8)
116 kwargs.setdefault(
'MaximumEpsilonStep', 1e-8)
117 kwargs.setdefault(
'MinimumEpsilonStep', 1e-9)
122 kwargs.setdefault(
"MaximumStep", 1000.)
128 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q1FwdG4FieldSvcCfg(flags)).name)
129 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAA.1R1MagQ1'])
131 tool = result.popToolsAndMerge(acc)
132 result.setPrivateTools(tool)
138 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q2FwdG4FieldSvcCfg(flags)).name)
139 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXBA.2R1MagQ2a',
'FwdRegion::LQXBA.2R1MagQ2b'])
141 tool = result.popToolsAndMerge(acc)
142 result.setPrivateTools(tool)
148 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q3FwdG4FieldSvcCfg(flags)).name)
149 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAG.3R1MagQ3'])
151 tool = result.popToolsAndMerge(acc)
152 result.setPrivateTools(tool)
158 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
D1FwdG4FieldSvcCfg(flags)).name)
159 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::MBXW.A4R1MagD1a',
'FwdRegion::MBXW.B4R1MagD1b',
160 'FwdRegion::MBXW.C4R1MagD1c',
'FwdRegion::MBXW.D4R1MagD1d',
161 'FwdRegion::MBXW.E4R1MagD1e',
'FwdRegion::MBXW.F4R1MagD1f'])
163 tool = result.popToolsAndMerge(acc)
164 result.setPrivateTools(tool)
170 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
D2FwdG4FieldSvcCfg(flags)).name)
171 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LBRCD.4R1MagD2'])
173 tool = result.popToolsAndMerge(acc)
174 result.setPrivateTools(tool)
180 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q4FwdG4FieldSvcCfg(flags)).name)
181 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQYCH.4R1MagQ4'])
183 tool = result.popToolsAndMerge(acc)
184 result.setPrivateTools(tool)
190 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q5FwdG4FieldSvcCfg(flags)).name)
191 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQNDC.5R1MagQ5'])
193 tool = result.popToolsAndMerge(acc)
194 result.setPrivateTools(tool)
200 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q6FwdG4FieldSvcCfg(flags)).name)
201 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQNDD.6R1MagQ6'])
203 tool = result.popToolsAndMerge(acc)
204 result.setPrivateTools(tool)
210 kwargs.setdefault(
"FieldSvc", result.getPrimaryAndMerge(
Q7FwdG4FieldSvcCfg(flags)).name)
211 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQNFD.7R1MagQ7a',
'FwdRegion::LQNFD.7R1MagQ7b'])
213 tool = result.popToolsAndMerge(acc)
214 result.setPrivateTools(tool)
221 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAA.1R1MagQ1HKick'])
223 tool = result.popToolsAndMerge(acc)
224 result.setPrivateTools(tool)
231 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAA.1R1MagQ1VKick'])
233 tool = result.popToolsAndMerge(acc)
234 result.setPrivateTools(tool)
241 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXBA.2R1MagQ2HKick'])
243 tool = result.popToolsAndMerge(acc)
244 result.setPrivateTools(tool)
251 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXBA.2R1MagQ2VKick'])
253 tool = result.popToolsAndMerge(acc)
254 result.setPrivateTools(tool)
261 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAG.3R1MagQ3HKick'])
263 tool = result.popToolsAndMerge(acc)
264 result.setPrivateTools(tool)
271 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQXAG.3R1MagQ3VKick'])
273 tool = result.popToolsAndMerge(acc)
274 result.setPrivateTools(tool)
281 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQYCH.4R1MagQ4VKickA'])
283 tool = result.popToolsAndMerge(acc)
284 result.setPrivateTools(tool)
291 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQYCH.4R1MagQ4HKick'])
293 tool = result.popToolsAndMerge(acc)
294 result.setPrivateTools(tool)
301 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQYCH.4R1MagQ4VKickB'])
303 tool = result.popToolsAndMerge(acc)
304 result.setPrivateTools(tool)
311 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQNDC.5R1MagQ5HKick'])
313 tool = result.popToolsAndMerge(acc)
314 result.setPrivateTools(tool)
321 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::LQNDD.6R1MagQ6VKick'])
323 tool = result.popToolsAndMerge(acc)
324 result.setPrivateTools(tool)
329 kwargs.setdefault(
"LogicalVolumes", [
'FwdRegion::ForwardRegionGeoModel'])
334 kwargs.setdefault(
"MaximumStep", 1000.)