13 from AthenaCommon.Logging
import logging
14 log = logging.getLogger(
'SimValid_tf')
15 log.info(
'****************** STARTING VALIDATION *****************')
17 log.info(
'**** Transformation run arguments')
18 log.info(
str(runArgs))
20 log.info(
'**** Setting-up configuration flags')
21 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
26 if hasattr(runArgs,
'localgeo'):
27 flags.ITk.Geometry.AllLocal = runArgs.localgeo
29 if hasattr(runArgs,
'inputHITSFile'):
30 flags.Input.Files = runArgs.inputHITSFile
32 raise RuntimeError(
'No input HITS file defined')
34 if hasattr(runArgs,
'outputHIST_SIMFile'):
35 flags.Output.HISTFileName = runArgs.outputHIST_SIMFile
37 log.warning(
'No output file set')
38 flags.Output.HISTFileName =
'output.HIST_SIM.root'
41 from SimuJobTransforms.SimulationHelpers
import getDetectorsFromRunArgs
43 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
44 setupDetectorFlags(flags, detectors, use_metadata=
True, toggle_geometry=
True, keep_beampipe=
True)
58 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
61 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
64 from HitAnalysis.HitAnalysisConfig
import PixelHitAnalysisCfg, SCTHitAnalysisCfg, TRTHitAnalysisCfg, ITkPixelHitAnalysisCfg, ITkStripHitAnalysisCfg, HGTD_HitAnalysisCfg, PLR_HitAnalysisCfg, CaloHitAnalysisCfg, RPCHitAnalysisCfg, MDTHitAnalysisCfg, CSCHitAnalysisCfg, TGCHitAnalysisCfg, MMHitAnalysisCfg, sTGCHitAnalysisCfg, ALFAHitAnalysisCfg, AFPHitAnalysisCfg, LucidHitAnalysisCfg, ZDCHitAnalysisCfg, TrackRecordAnalysisCfg, TruthHitAnalysisCfg
67 if flags.Detector.EnablePixel:
70 if flags.Detector.EnableSCT:
73 if flags.Detector.EnableTRT:
77 if flags.Detector.EnableITkPixel:
80 if flags.Detector.EnableITkStrip:
83 if flags.Detector.EnableHGTD:
86 if flags.Detector.EnablePLR:
90 if flags.Detector.EnableCalo:
94 if flags.Detector.EnableRPC:
97 if flags.Detector.EnableMDT:
100 if flags.Detector.EnableCSC:
103 if flags.Detector.EnableTGC:
106 if flags.Detector.EnableMM:
109 if flags.Detector.EnablesTGC:
113 if flags.Detector.EnableALFA:
116 if flags.Detector.EnableAFP:
119 if flags.Detector.EnableLucid:
122 if flags.Detector.EnableZDC:
126 if 'MuonEntryLayer' in flags.Input.Collections:
128 if 'TruthEvent' in flags.Input.Collections:
141 log.info(
"Ran HITSMerge_tf in " +
str(time.time()-tic) +
" seconds")
143 sys.exit(
not sc.isSuccess())