336 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
337 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
340 FinalDataPrepTrackChainxAODTracksKeyPrefix=
"FPGADataPrep"
344 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
345 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
349 flags.Detector.EnableCalo =
False
352 flags.Tracking.ITkMainPass.doAthenaToActsSpacePoint=
True
353 flags.Tracking.ITkMainPass.doAthenaToActsCluster=
True
355 flags.Acts.doRotCorrection =
False
359 flags.Detector.EnableITkPixel=
True
360 flags.Detector.EnableITkStrip=
True
362 flags.Tracking.ITkMainPass.doActsSeed=
True
363 flags.Tracking.ITkMainPass.doActsTrack =
False
364 flags.Tracking.doITkFastTracking=
False
368 from InDetTrackPerfMon.InDetTrackPerfMonFlags
import initializeIDTPMConfigFlags, initializeIDTPMTrkAnaConfigFlags
371 flags.PhysVal.IDTPM.outputFilePrefix =
"myIDTPM_CA"
372 flags.PhysVal.IDTPM.plotsDefFileList =
"InDetTrackPerfMon/PlotsDefFileList_default.txt"
373 flags.PhysVal.IDTPM.plotsCommonValuesFile =
"InDetTrackPerfMon/PlotsDefCommonValues.json"
374 flags.PhysVal.OutputFileName = flags.PhysVal.IDTPM.outputFilePrefix +
'.HIST.root'
375 flags.Output.doWriteAOD_IDTPM =
True
376 flags.Output.AOD_IDTPMFileName = flags.PhysVal.IDTPM.outputFilePrefix +
'.AOD_IDTPM.pool.root'
377 flags.PhysVal.IDTPM.trkAnaCfgFile =
"InDetTrackPerfMon/EFTrkAnaConfig_example.json"
381 flags.PhysVal.IDTPM.TrkAnaEF.TrigTrkKey = f
"{FinalDataPrepTrackChainxAODTracksKeyPrefix}TrackParticles"
382 flags.PhysVal.IDTPM.TrkAnaDoubleRatio.TrigTrkKey = f
"{FinalDataPrepTrackChainxAODTracksKeyPrefix}TrackParticles"
384 flags.PhysVal.doExample =
False
386 flags.Concurrency.NumThreads=1
387 flags.Scheduler.ShowDataDeps=
True
388 flags.Debug.DumpEvtStore=
False
391 if isinstance(flags.Trigger.FPGATrackSim.wrapperFileName, str):
392 log.info(
"wrapperFile is string, converting to list")
393 flags.Trigger.FPGATrackSim.wrapperFileName = [flags.Trigger.FPGATrackSim.wrapperFileName]
394 flags.Input.Files =
lambda f: [f.Trigger.FPGATrackSim.wrapperFileName]
397 flags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Tracking.MainPass", keepOriginal=
True)
398 flags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Tracking.ITkMainPass", keepOriginal=
True)
402 acc.addService(CompFactory.THistSvc(Output = [f
"EXPERT DATAFILE='{flags.Trigger.FPGATrackSim.outputMonitorFile}', OPT='RECREATE'"]))
403 acc.addService(CompFactory.THistSvc(Output = [
"FPGATRACKSIMOUTPUT DATAFILE='dataprep.root', OPT='RECREATE'"]))
406 if not flags.Trigger.FPGATrackSim.wrapperFileName:
407 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
411 from xAODTruthCnv.xAODTruthCnvConfig
import GEN_AOD2xAODCfg
414 from JetRecConfig.JetRecoSteering
import addTruthPileupJetsToOutputCfg
417 if flags.Detector.EnableCalo:
418 from CaloRec.CaloRecoConfig
import CaloRecoCfg
421 if not flags.Reco.EnableTrackOverlay:
422 from InDetConfig.TrackRecoConfig
import InDetTrackRecoCfg
425 if flags.Trigger.FPGATrackSim.connectToToITkTracking:
426 from InDetConfig.ITkTrackRecoConfig
import ITkTrackRecoCfg
432 if flags.Trigger.FPGATrackSim.doEDMConversion:
433 acc.merge(
FPGAConversionAlgCfg(flags, name =
'FPGAConversionAlg_1st', stage =
'_1st', doActsTrk=
False, doSP = flags.Trigger.FPGATrackSim.spacePoints))
434 if flags.Trigger.FPGATrackSim.convertUnmappedHits: acc.merge(
FPGAConversionAlgCfg(flags, name =
'FPGAConversionAlgUnmapped_1st', stage =
'Unmapped_1st', doClusters =
False))
436 if flags.Trigger.FPGATrackSim.connectToToITkTracking:
439 if flags.Trigger.FPGATrackSim.writeToAOD:
441 if flags.Trigger.FPGATrackSim.spacePoints : acc.merge(
WriteToAOD(flags,
443 finalTrackParticles=f
"{FinalDataPrepTrackChainxAODTracksKeyPrefix}TrackParticles"))
446 from FPGATrackSimReporting.FPGATrackSimReportingConfig
import FPGATrackSimReportingCfg
450 from InDetTrackPerfMon.InDetTrackPerfMonConfig
import InDetTrackPerfMonCfg
453 acc.store(
open(
'AnalysisConfig.pkl',
'wb'))
455 statusCode = acc.run(flags.Exec.MaxEvents)
456 assert statusCode.isSuccess()
is True,
"Application execution did not succeed"