ATLAS Offline Software
Loading...
Searching...
No Matches
ActsGeantFollowing_jobOptions_ITk Namespace Reference

Functions

 defaultTestFlags (flags, args)
 printAndRun (accessor, flags, args)
 ITkCfg (flags)
 ActsGeantFollowerCfg (flags, name="ActsGeantFollowerTool", **kwargs)

Variables

 parser = ArgumentParser("ActsGeantFollowing_jobOption_ITk.py")
 default
 True
 action
 help
 type
 args = parser.parse_args()
 flags = initConfigFlags()
 acc = ITkCfg(flags)
dict kwargs = {}
str svcName = "ActsGeantFollowerTool"
 UserActionSvc

Function Documentation

◆ ActsGeantFollowerCfg()

ActsGeantFollowing_jobOptions_ITk.ActsGeantFollowerCfg ( flags,
name = "ActsGeantFollowerTool",
** kwargs )

Definition at line 110 of file ActsGeantFollowing_jobOptions_ITk.py.

110def ActsGeantFollowerCfg(flags, name="ActsGeantFollowerTool", **kwargs):
111
112 result = ComponentAccumulator()
113
114 from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
115 result.merge(TrackingGeometrySvcCfg(flags))
116
117 from ActsConfig.ActsGeometryConfig import NominalAlignmentCondAlgCfg
118 nomAli = NominalAlignmentCondAlgCfg(flags, OutputLevel=INFO)
119 result.merge(nomAli)
120
121 from ActsConfig.ActsGeometryConfig import ActsTrackingGeometrySvcCfg
122 tgSvc = ActsTrackingGeometrySvcCfg(flags, OutputLevel=INFO)
123 result.merge(tgSvc)
124
125 print('DEF WRITER : ')
126 from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
127 Actsextrapol = result.popToolsAndMerge(ActsExtrapolationToolCfg(flags,
128 InteractionMultiScatering = True,
129 InteractionEloss = True,
130 InteractionRecord=True,
131 OutputLevel=INFO))
132 result.addPublicTool(Actsextrapol)
133
134 from TrkConfig.AtlasExtrapolationEngineConfig import AtlasExtrapolationEngineCfg
135 AtlasExtrapolationEngine = result.getPrimaryAndMerge(AtlasExtrapolationEngineCfg(flags))
136
137
138 #Setup Helper
139 followingHelper = CompFactory.ActsGeantFollowerHelper("ActsGeantFollowerHelper",
140 **kwargs,
141 ExtrapolationEngine=AtlasExtrapolationEngine,
142 ActsExtrapolator=result.getPublicTool(Actsextrapol.name), # PublicToolHandle
143 ExtrapolateDirectly=False,
144 ExtrapolateIncrementally=True,
145 OutputLevel=INFO)
146 result.addPublicTool(followingHelper)
147
148 #Setting up the CA for the ActsGeantFollower
149 from ActsConfig.ActsGeantFollowingConfig import ActsGeantFollowerToolCfg
150 ActsGeantFollowerAction = result.popToolsAndMerge(ActsGeantFollowerToolCfg(flags))
151
152 #Retrieving the default action list
153 from G4AtlasServices.G4AtlasUserActionConfig import getDefaultActions
154 defaultActions = result.popToolsAndMerge(getDefaultActions(flags))
155
156 #Adding LengthIntegrator to defaults
157 actionList = (defaultActions + ActsGeantFollowerAction)
158
159 #Setting up UserActionsService
160 kwargs.setdefault("UserActionTools",actionList)
161 result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs))
162
163 return result
164
165
166# Argument parsing
void print(char *figname, TCanvas *c1)

◆ defaultTestFlags()

ActsGeantFollowing_jobOptions_ITk.defaultTestFlags ( flags,
args )

Definition at line 21 of file ActsGeantFollowing_jobOptions_ITk.py.

21def defaultTestFlags(flags, args):
22
23
24
25 flags.Input.isMC = True
26 flags.ITk.Geometry.AllLocal = True
27 detectors = [
28 "ITkPixel",
29 "ITkStrip",
30 "Bpipe"
31 ]
32
33 from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
34 setupDetectorFlags(flags, detectors, toggle_geometry=True)
35
36 from AthenaConfiguration.TestDefaults import defaultGeometryTags
37 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
38 flags.IOVDb.GlobalTag = "OFLCOND-SIM-00-00-00"
39 flags.GeoModel.Align.Dynamic = False
40 # flags.Acts.TrackingGeometry.MaterialSource = "Input"
41 # flags.Acts.TrackingGeometry.MaterialSource = "material-maps.json"
42
43 flags.Detector.GeometryCalo = False
44 flags.Detector.GeometryMuon = False
45
46 # # This should run serially for the moment.
47 # flags.Concurrency.NumThreads = 1
48 flags.Concurrency.NumConcurrentEvents = 1
49
50 flags.Input.Files = [args.inputevntfile]
51
52 flags.Output.HITSFileName = args.outputhitsfile
53
54 from SimulationConfig.SimEnums import BeamPipeSimMode, CalibrationRun, CavernBackground
55 flags.Sim.CalibrationRun = CalibrationRun.Off
56 flags.Sim.RecordStepInfo = False
57 flags.Sim.CavernBackground = CavernBackground.Signal
58 flags.Sim.ISFRun = False
59 flags.Sim.BeamPipeSimMode = BeamPipeSimMode.FastSim
60
61 flags.Input.RunNumbers = [284500]
62 flags.Input.OverrideRunNumber = True
63 flags.Input.LumiBlockNumbers = [1]
64

◆ ITkCfg()

ActsGeantFollowing_jobOptions_ITk.ITkCfg ( flags)

Definition at line 84 of file ActsGeantFollowing_jobOptions_ITk.py.

84def ITkCfg(flags):
85 acc = MainServicesCfg(flags)
86 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
87 acc.merge(PoolReadCfg(flags))
88
89 # add BeamEffectsAlg
90 from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
91 acc.merge(BeamEffectsAlgCfg(flags))
92
93 from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
94 itkPixel = ITkPixelReadoutGeometryCfg(flags)
95 acc.merge(itkPixel)
96
97 from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
98 itkStrip = ITkStripReadoutGeometryCfg(flags)
99 acc.merge(itkStrip)
100
101 from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
102 acc.merge(BeamPipeGeometryCfg(flags))
103
104 from AtlasGeoModel.GeoModelConfig import GeoModelCfg
105 gmsAcc = GeoModelCfg(flags)
106 acc.merge(gmsAcc)
107
108 return acc
109

◆ printAndRun()

ActsGeantFollowing_jobOptions_ITk.printAndRun ( accessor,
flags,
args )
debugging and execution

Definition at line 65 of file ActsGeantFollowing_jobOptions_ITk.py.

65def printAndRun(accessor, flags, args):
66 """debugging and execution"""
67 # Dump config
68 if args.verboseAccumulators:
69 accessor.printConfig(withDetails=True)
70 if args.verboseStoreGate:
71 accessor.getService("StoreGateSvc").Dump = True
72 flags.dump()
73
74 # Execute and finish
75 sc = accessor.run(maxEvents=args.maxEvents)
76
77 # Dump config summary
78 accessor.printConfig(withDetails=False)
79
80 # Success should be 0
81 return not sc.isSuccess()
82
83

Variable Documentation

◆ acc

ActsGeantFollowing_jobOptions_ITk.acc = ITkCfg(flags)

Definition at line 193 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ action

ActsGeantFollowing_jobOptions_ITk.action

Definition at line 168 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ args

ActsGeantFollowing_jobOptions_ITk.args = parser.parse_args()

Definition at line 185 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ default

ActsGeantFollowing_jobOptions_ITk.default

Definition at line 168 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ flags

ActsGeantFollowing_jobOptions_ITk.flags = initConfigFlags()

Definition at line 188 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ help

ActsGeantFollowing_jobOptions_ITk.help

Definition at line 169 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ kwargs

dict ActsGeantFollowing_jobOptions_ITk.kwargs = {}

Definition at line 194 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ parser

ActsGeantFollowing_jobOptions_ITk.parser = ArgumentParser("ActsGeantFollowing_jobOption_ITk.py")

Definition at line 167 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ svcName

str ActsGeantFollowing_jobOptions_ITk.svcName = "ActsGeantFollowerTool"

Definition at line 196 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ True

ActsGeantFollowing_jobOptions_ITk.True

Definition at line 168 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ type

ActsGeantFollowing_jobOptions_ITk.type

Definition at line 176 of file ActsGeantFollowing_jobOptions_ITk.py.

◆ UserActionSvc

ActsGeantFollowing_jobOptions_ITk.UserActionSvc

Definition at line 198 of file ActsGeantFollowing_jobOptions_ITk.py.