13 from argparse
import ArgumentParser
16 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
17 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
18 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
19 from AthenaConfiguration.ComponentFactory
import CompFactory
25 flags.Input.isMC =
True
26 flags.ITk.Geometry.AllLocal =
True
33 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
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
43 flags.Detector.GeometryCalo =
False
44 flags.Detector.GeometryMuon =
False
48 flags.Concurrency.NumConcurrentEvents = 1
50 flags.Input.Files = [args.inputevntfile]
52 flags.Output.HITSFileName = args.outputhitsfile
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
61 flags.Input.RunNumbers = [284500]
62 flags.Input.OverrideRunNumber =
True
63 flags.Input.LumiBlockNumbers = [1]
66 """debugging and execution"""
68 if args.verboseAccumulators:
69 accessor.printConfig(withDetails=
True)
70 if args.verboseStoreGate:
71 accessor.getService(
"StoreGateSvc").Dump =
True
75 sc = accessor.run(maxEvents=args.maxEvents)
78 accessor.printConfig(withDetails=
False)
81 return not sc.isSuccess()
86 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
90 from BeamEffects.BeamEffectsAlgConfig
import BeamEffectsAlgCfg
93 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
97 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
101 from BeamPipeGeoModel.BeamPipeGMConfig
import BeamPipeGeometryCfg
104 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
114 from TrkConfig.AtlasTrackingGeometrySvcConfig
import TrackingGeometrySvcCfg
117 from ActsConfig.ActsGeometryConfig
import NominalAlignmentCondAlgCfg
118 nomAli = NominalAlignmentCondAlgCfg(flags, OutputLevel=INFO)
121 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometrySvcCfg
125 print(
'DEF WRITER : ')
126 from ActsConfig.ActsGeometryConfig
import ActsExtrapolationToolCfg
128 InteractionMultiScatering =
True,
129 InteractionEloss =
True,
130 InteractionRecord=
True,
132 result.addPublicTool(Actsextrapol)
134 from TrkConfig.AtlasExtrapolationEngineConfig
import AtlasExtrapolationEngineCfg
139 followingHelper = CompFactory.ActsGeantFollowerHelper(
"ActsGeantFollowerHelper",
141 ExtrapolationEngine=AtlasExtrapolationEngine,
142 ActsExtrapolator=result.getPublicTool(Actsextrapol.name),
143 ExtrapolateDirectly=
False,
144 ExtrapolateIncrementally=
True,
146 result.addPublicTool(followingHelper)
149 from ActsConfig.ActsGeantFollowingConfig
import ActsGeantFollowerToolCfg
153 from G4AtlasServices.G4AtlasUserActionConfig
import getDefaultActions
157 actionList = (defaultActions + ActsGeantFollowerAction)
160 kwargs.setdefault(
"UserActionTools",actionList)
161 result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs))
167 parser = ArgumentParser(
"ActsGeantFollowing_jobOption_ITk.py")
168 parser.add_argument(
"--simulate", default=
True, action=
"store_true",
169 help=
"Run Simulation")
170 parser.add_argument(
"-V",
"--verboseAccumulators", default=
False,
172 help=
"Print full details of the AlgSequence")
173 parser.add_argument(
"-S",
"--verboseStoreGate", default=
False,
175 help=
"Dump the StoreGate(s) each event iteration")
176 parser.add_argument(
"--maxEvents",default=-1, type=int,
177 help=
"The number of events to run. 0 skips execution")
178 parser.add_argument(
"--inputevntfile",
180 default=
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetSLHC_Example/inputs/pgun_2M_10GeV_geantinos_Eta6_v2_EVNT.root",
182 help=
"The input EVNT file to use")
183 parser.add_argument(
"--outputhitsfile",default=
"myHITS.pool.root", type=str,
184 help=
"The output HITS filename")
185 args = parser.parse_args()
196 svcName =
"ActsGeantFollowerTool"
198 kwargs.update(UserActionSvc=svcName)
200 from G4AtlasAlg.G4AtlasAlgConfig
import G4AtlasAlgCfg
203 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
204 from SimuJobTransforms.SimOutputConfig
import getStreamHITS_ItemList
208 with open(
"ITkTest.pkl",
"wb")
as f: