ATLAS Offline Software
Loading...
Searching...
No Matches
python.Geant4MSFollowing Namespace Reference

Functions

 setupArgParser ()
 MSCfg (flags)
 ExtrapolationToolCfg (flags, args)
 GeantFollowerMSCfg (flags, args, name="GeantFollowerMSSvc", **kwargs)

Variables

 args = setupArgParser().parse_args()
 flags = initConfigFlags()
 Files
 HITSFileName
 AtlasVersion
 GlobalTag
 isMC
 Dynamic
 NumThreads
 NumConcurrentEvents
 SkipEvents
 ProductionStep
 doAlign
 TightMuonStepping
list detectors = ["Muon","ID","Bpipe", "Calo"]
 toggle_geometry
 evaluate
 acc = MSCfg(flags)
 GeantFollowerMSTool = acc.getPrimaryAndMerge(GeantFollowerMSToolCfg(flags))
 withDetails
 maxEvents

Function Documentation

◆ ExtrapolationToolCfg()

python.Geant4MSFollowing.ExtrapolationToolCfg ( flags,
args )

Definition at line 75 of file Geant4MSFollowing.py.

75def ExtrapolationToolCfg(flags, args):
76
77 acc = ComponentAccumulator()
78
79 # the layer material inspector
80 LayerMaterialInspector = CompFactory.Trk.LayerMaterialInspector("LayerMaterialInspector",
81 OutputLevel=INFO)
82 acc.addPublicTool(LayerMaterialInspector)
83
84 # the tracking volume displayer
85 TrackingVolumeDisplayer = CompFactory.Trk.TrackingVolumeDisplayer("TrackingVolumeDisplayer",
86 TrackingVolumeOutputFile='TrackingVolumes.C',
87 LayerOutputFile='Layers.C',
88 SurfaceOutputFile='Surfaces.C')
89 acc.addPublicTool(TrackingVolumeDisplayer)
90
91 # PROPAGATOR DEFAULTS
92 TestPropagators = []
93 TestPropagator = CompFactory.Trk.RungeKuttaPropagator("TestPropagator")
94 acc.addPublicTool(TestPropagator)
95 TestPropagators += [TestPropagator]
96
97 from TrkConfig.TrkExSTEP_PropagatorConfig import AtlasSTEP_PropagatorCfg
98 TestSTEP_Propagator = acc.popToolsAndMerge(AtlasSTEP_PropagatorCfg(flags, name="TestSTEP_Propagator", DetailedEloss=True))
99 TestPropagators += [TestSTEP_Propagator]
100
101 TestSTEP_Propagator.Straggling = False
102
103 if args.myPDG == 998 :
104 TestSTEP_Propagator.MultipleScattering = False
105 TestSTEP_Propagator.EnergyLoss = False
106
107 # UPDATOR DEFAULTS
108 TestUpdators = []
109
110 TestMaterialEffectsUpdator = CompFactory.Trk.MaterialEffectsUpdator("TestMaterialEffectsUpdator")
111 acc.addPublicTool(TestMaterialEffectsUpdator)
112 if args.myPDG == 998 :
113 TestMaterialEffectsUpdator.EnergyLoss = False
114 TestMaterialEffectsUpdator.MultipleScattering = False
115
116 TestUpdators += [TestMaterialEffectsUpdator]
117
118 TestMaterialEffectsUpdatorLandau = CompFactory.Trk.MaterialEffectsUpdator("TestMaterialEffectsUpdatorLandau",
119 LandauMode=True)
120 acc.addPublicTool(TestMaterialEffectsUpdatorLandau)
121
122 if args.myPDG == 998 :
123 TestMaterialEffectsUpdatorLandau.EnergyLoss = False
124 TestMaterialEffectsUpdatorLandau.MultipleScattering = False
125
126
127
128 # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY)
129 TestNavigator = CompFactory.Trk.Navigator("TestNavigator",
130 TrackingGeometrySvc="Trk::TrackingGeometrySvc/AtlasTrackingGeometrySvc")
131 acc.addPublicTool(TestNavigator)
132
133 # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
134
135 TestSubPropagators = []
136 TestSubUpdators = []
137
138 # -------------------- set it depending on the geometry ----------------------------------------------------
139 # default for Global is (Rk,Mat)
140 TestSubPropagators += [ TestPropagator.name ]
141 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
142
143 # default for ID is (Rk,Mat)
144 TestSubPropagators += [ TestPropagator.name ]
145 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
146
147 # default for Beam pipe is (Rk,Mat) // sometimes the STEP is used
148 TestSubPropagators += [ TestPropagator.name ]
149 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
150
151 # default for Calo is (STEP,Mat) // sometimes MatLandau is used
152 TestSubPropagators += [ TestSTEP_Propagator.name ]
153 #TestSubPropagators += [ TestPropagator.name ] #Switch to RK
154 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
155
156 # default for MS is (STEP,Mat)
157 TestSubPropagators += [ TestSTEP_Propagator.name ]
158 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
159
160 # default for Cavern is (Rk,Mat)
161 TestSubPropagators += [ TestPropagator.name ]
162 TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
163 # ----------------------------------------------------------------------------------------------------------
164
165 AtlasEnergyLossUpdator = CompFactory.Trk.EnergyLossUpdator("AtlasEnergyLossUpdator",
166 DetailedEloss=True)
167 acc.addPublicTool(AtlasEnergyLossUpdator)
168
169 # AtlasELossUpdater = acc.popToolsAndMerge(TC.AtlasEnergyLossUpdatorCfg(flags))
170 # AtlasEnergyLossUpdater = AtlasELossUpdater
171
172 # from TrkConfig.AtlasExtrapolatorToolsConfig as TC
173 # AtlasEnergyLossUpdator = acc.popToolsAndMerge(AtlasEnergyLossUpdatorCfg(flags, name="AtlasEnergyLossUpdator", DetailedEloss=True) )
174
175 # call the base class constructor
176 TestExtrapolator = CompFactory.Trk.Extrapolator("TestExtrapolator",
177 Navigator = TestNavigator,
178 MaterialEffectsUpdators = TestUpdators,
179 STEP_Propagator = TestSTEP_Propagator.name,
180 Propagators = TestPropagators,
181 SubPropagators = TestSubPropagators,
182 SubMEUpdators = TestSubUpdators,
183 EnergyLossUpdater = AtlasEnergyLossUpdator
184 )
185 acc.addPublicTool(TestExtrapolator, primary=True)
186 # acc.setPrivateTools(TestExtrapolator)
187
188 return acc
189
190

◆ GeantFollowerMSCfg()

python.Geant4MSFollowing.GeantFollowerMSCfg ( flags,
args,
name = "GeantFollowerMSSvc",
** kwargs )

Definition at line 191 of file Geant4MSFollowing.py.

191def GeantFollowerMSCfg(flags, args, name="GeantFollowerMSSvc", **kwargs):
192
193 result = ComponentAccumulator()
194# from TrkConfig.AtlasExtrapolatorConfig import MuonExtrapolatorCfg
195# extrapolator = result.getPrimaryAndMerge(MuonExtrapolatorCfg(flags))
196 extrapolator = result.getPrimaryAndMerge(ExtrapolationToolCfg(flags,args))
197 result.addPublicTool(extrapolator)
198
199 #Setup Helper
200 followingHelper = CompFactory.Trk.GeantFollowerMSHelper("GeantFollowerMSHelper",
201 Extrapolator= extrapolator,
202 ExtrapolateDirectly=False,
203 ExtrapolateIncrementally=False,
204 SpeedUp=True,
205 UseCovMatrix=True,
206 OutputLevel=INFO)
207 result.addPublicTool(followingHelper, primary = True)
208
209 #Setting up the CA for the GeantFollowerMS
210 from G4AtlasServices.G4AtlasUserActionConfig import getDefaultActions
211 kwargs.setdefault("UserActionTools", result.popToolsAndMerge(getDefaultActions(flags)))
212 result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs))
213 return result
214
215

◆ MSCfg()

python.Geant4MSFollowing.MSCfg ( flags)

Definition at line 49 of file Geant4MSFollowing.py.

49def MSCfg(flags):
50 # Setup main services
51 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
52 acc = MainServicesCfg(flags)
53 acc.getService("MessageSvc").debugLimit = 1000000
54
55 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56 acc.merge(PoolReadCfg(flags))
57
58 from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
59 acc.merge(BeamSpotCondAlgCfg(flags))
60
61 from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
62 acc.merge(BeamEffectsAlgCfg(flags))
63
64 from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
65 acc.merge(BeamPipeGeometryCfg(flags))
66
67 from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
68 acc.merge(TrackingGeometryCondAlgCfg(flags))
69
70 from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
71 acc.merge(TrackingGeometrySvcCfg(flags))
72
73 return acc
74

◆ setupArgParser()

python.Geant4MSFollowing.setupArgParser ( )

Definition at line 17 of file Geant4MSFollowing.py.

17def setupArgParser():
18 from argparse import ArgumentParser
19 parser = ArgumentParser()
20 parser.add_argument("--inputEVNTFile",
21 default="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/EVGEN_ParticleGun_FourMuon_Pt10to500.root",
22 type=str,
23 help="The input EVNT file to use")
24 parser.add_argument("--outputHITSFile",
25 default="myHITS.pool.root",
26 type=str,
27 help="The output HITS filename")
28 parser.add_argument("--geometryTag",
29 default="ATLAS-R3S-2021-03-02-00",
30 type=str,
31 help="The geometry tag to use")
32 parser.add_argument("--globalTag",
33 default="OFLCOND-MC21-SDR-RUN3-09",
34 type=str,
35 help="The global tag to use")
36 parser.add_argument("--myPDG",
37 default=998,
38 type=int,
39 help="PDG for particle gun sim. 998 = Charged Geantino 999 = neutral Geantino, 13 = Muon")
40 parser.add_argument("--maxEvents",
41 default=10000,
42 type = int,
43 help="Maximum number of events to run on.")
44 parser.add_argument("--skipEvents", help="Number of events to skip", type = int , default =0)
45
46 return parser
47
48

Variable Documentation

◆ acc

python.Geant4MSFollowing.acc = MSCfg(flags)

Definition at line 245 of file Geant4MSFollowing.py.

◆ args

python.Geant4MSFollowing.args = setupArgParser().parse_args()

Definition at line 219 of file Geant4MSFollowing.py.

◆ AtlasVersion

python.Geant4MSFollowing.AtlasVersion

Definition at line 224 of file Geant4MSFollowing.py.

◆ detectors

python.Geant4MSFollowing.detectors = ["Muon","ID","Bpipe", "Calo"]

Definition at line 238 of file Geant4MSFollowing.py.

◆ doAlign

python.Geant4MSFollowing.doAlign

Definition at line 233 of file Geant4MSFollowing.py.

◆ Dynamic

python.Geant4MSFollowing.Dynamic

Definition at line 227 of file Geant4MSFollowing.py.

◆ evaluate

python.Geant4MSFollowing.evaluate

Definition at line 242 of file Geant4MSFollowing.py.

◆ Files

python.Geant4MSFollowing.Files

Definition at line 222 of file Geant4MSFollowing.py.

◆ flags

python.Geant4MSFollowing.flags = initConfigFlags()

Definition at line 221 of file Geant4MSFollowing.py.

◆ GeantFollowerMSTool

python.Geant4MSFollowing.GeantFollowerMSTool = acc.getPrimaryAndMerge(GeantFollowerMSToolCfg(flags))

Definition at line 251 of file Geant4MSFollowing.py.

◆ GlobalTag

python.Geant4MSFollowing.GlobalTag

Definition at line 225 of file Geant4MSFollowing.py.

◆ HITSFileName

python.Geant4MSFollowing.HITSFileName

Definition at line 223 of file Geant4MSFollowing.py.

◆ isMC

python.Geant4MSFollowing.isMC

Definition at line 226 of file Geant4MSFollowing.py.

◆ maxEvents

python.Geant4MSFollowing.maxEvents

Definition at line 261 of file Geant4MSFollowing.py.

◆ NumConcurrentEvents

python.Geant4MSFollowing.NumConcurrentEvents

Definition at line 229 of file Geant4MSFollowing.py.

◆ NumThreads

python.Geant4MSFollowing.NumThreads

Definition at line 228 of file Geant4MSFollowing.py.

◆ ProductionStep

python.Geant4MSFollowing.ProductionStep

Definition at line 232 of file Geant4MSFollowing.py.

◆ SkipEvents

python.Geant4MSFollowing.SkipEvents

Definition at line 230 of file Geant4MSFollowing.py.

◆ TightMuonStepping

python.Geant4MSFollowing.TightMuonStepping

Definition at line 234 of file Geant4MSFollowing.py.

◆ toggle_geometry

python.Geant4MSFollowing.toggle_geometry

Definition at line 239 of file Geant4MSFollowing.py.

◆ withDetails

python.Geant4MSFollowing.withDetails

Definition at line 260 of file Geant4MSFollowing.py.