ATLAS Offline Software
Functions | Variables
python.HITtoHIST_SIM_Skeleton Namespace Reference

Functions

def fromRunArgs (runArgs)
 

Variables

 jobPropertiesDisallowed
 

Function Documentation

◆ fromRunArgs()

def python.HITtoHIST_SIM_Skeleton.fromRunArgs (   runArgs)

Definition at line 12 of file HITtoHIST_SIM_Skeleton.py.

12 def fromRunArgs(runArgs):
13  from AthenaCommon.Logging import logging
14  log = logging.getLogger('SimValid_tf')
15  log.info('****************** STARTING VALIDATION *****************')
16 
17  log.info('**** Transformation run arguments')
18  log.info(str(runArgs))
19 
20  log.info('**** Setting-up configuration flags')
21  from AthenaConfiguration.AllConfigFlags import initConfigFlags
22  flags = initConfigFlags()
23 
24  commonRunArgsToFlags(runArgs, flags)
25 
26  if hasattr(runArgs, 'localgeo'):
27  flags.ITk.Geometry.AllLocal = runArgs.localgeo
28 
29  if hasattr(runArgs, 'inputHITSFile'):
30  flags.Input.Files = runArgs.inputHITSFile
31  else:
32  raise RuntimeError('No input HITS file defined')
33 
34  if hasattr(runArgs, 'outputHIST_SIMFile'):
35  flags.Output.HISTFileName = runArgs.outputHIST_SIMFile
36  else:
37  log.warning('No output file set')
38  flags.Output.HISTFileName = 'output.HIST_SIM.root'
39 
40  # Generate detector list and setup detector flags
41  from SimuJobTransforms.SimulationHelpers import getDetectorsFromRunArgs
42  detectors = getDetectorsFromRunArgs(flags, runArgs)
43  from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
44  setupDetectorFlags(flags, detectors, use_metadata=True, toggle_geometry=True, keep_beampipe=True)
45 
46  # Pre-include
47  processPreInclude(runArgs, flags)
48 
49  # Pre-exec
50  processPreExec(runArgs, flags)
51 
52  # To respect --athenaopts
53  flags.fillFromArgs()
54 
55  # Lock flags
56  flags.lock()
57 
58  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
59  cfg = MainServicesCfg(flags)
60 
61  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
62  cfg.merge(PoolReadCfg(flags))
63 
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
65 
66  # InnerDetector
67  if flags.Detector.EnablePixel:
68  cfg.merge(PixelHitAnalysisCfg(flags))
69 
70  if flags.Detector.EnableSCT:
71  cfg.merge(SCTHitAnalysisCfg(flags))
72 
73  if flags.Detector.EnableTRT:
74  cfg.merge(TRTHitAnalysisCfg(flags))
75 
76  # ITk
77  if flags.Detector.EnableITkPixel:
78  cfg.merge(ITkPixelHitAnalysisCfg(flags))
79 
80  if flags.Detector.EnableITkStrip:
81  cfg.merge(ITkStripHitAnalysisCfg(flags))
82 
83  if flags.Detector.EnableHGTD:
84  cfg.merge(HGTD_HitAnalysisCfg(flags))
85 
86  if flags.Detector.EnablePLR:
87  cfg.merge(PLR_HitAnalysisCfg(flags))
88 
89  # Calorimeter
90  if flags.Detector.EnableCalo:
91  cfg.merge(CaloHitAnalysisCfg(flags))
92 
93  # Muon System
94  if flags.Detector.EnableRPC:
95  cfg.merge(RPCHitAnalysisCfg(flags))
96 
97  if flags.Detector.EnableMDT:
98  cfg.merge(MDTHitAnalysisCfg(flags))
99 
100  if flags.Detector.EnableCSC:
101  cfg.merge(CSCHitAnalysisCfg(flags))
102 
103  if flags.Detector.EnableTGC:
104  cfg.merge(TGCHitAnalysisCfg(flags))
105 
106  if flags.Detector.EnableMM:
107  cfg.merge(MMHitAnalysisCfg(flags))
108 
109  if flags.Detector.EnablesTGC:
110  cfg.merge(sTGCHitAnalysisCfg(flags))
111 
112  # Forward
113  if flags.Detector.EnableALFA:
114  cfg.merge(ALFAHitAnalysisCfg(flags))
115 
116  if flags.Detector.EnableAFP:
117  cfg.merge(AFPHitAnalysisCfg(flags))
118 
119  if flags.Detector.EnableLucid:
120  cfg.merge(LucidHitAnalysisCfg(flags))
121 
122  if flags.Detector.EnableZDC:
123  cfg.merge(ZDCHitAnalysisCfg(flags))
124 
125  # Truth
126  if 'MuonEntryLayer' in flags.Input.Collections:
127  cfg.merge(TrackRecordAnalysisCfg(flags))
128  if 'TruthEvent' in flags.Input.Collections:
129  cfg.merge(TruthHitAnalysisCfg(flags))
130 
131  # Post-include
132  processPostInclude(runArgs, flags, cfg)
133 
134  # Post-exec
135  processPostExec(runArgs, flags, cfg)
136 
137  import time
138  tic = time.time()
139  # Run the final accumulator
140  sc = cfg.run()
141  log.info("Ran HITSMerge_tf in " + str(time.time()-tic) + " seconds")
142 
143  sys.exit(not sc.isSuccess())

Variable Documentation

◆ jobPropertiesDisallowed

python.HITtoHIST_SIM_Skeleton.jobPropertiesDisallowed

Definition at line 9 of file HITtoHIST_SIM_Skeleton.py.

python.HitAnalysisConfig.AFPHitAnalysisCfg
def AFPHitAnalysisCfg(flags, name='AFPHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:273
python.TransformUtils.processPreExec
def processPreExec(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:41
python.HitAnalysisConfig.SCTHitAnalysisCfg
def SCTHitAnalysisCfg(flags, name='SCTHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:56
python.TransformUtils.processPostExec
def processPostExec(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:50
python.HitAnalysisConfig.MMHitAnalysisCfg
def MMHitAnalysisCfg(flags, name='MMHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:240
python.TransformUtils.processPostInclude
def processPostInclude(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:69
python.TransformUtils.processPreInclude
def processPreInclude(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:62
python.HitAnalysisConfig.TRTHitAnalysisCfg
def TRTHitAnalysisCfg(flags, name='TRTHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:69
python.HitAnalysisConfig.TGCHitAnalysisCfg
def TGCHitAnalysisCfg(flags, name='TGCHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:229
python.HitAnalysisConfig.ALFAHitAnalysisCfg
def ALFAHitAnalysisCfg(flags, name='ALFAHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:263
python.HitAnalysisConfig.TruthHitAnalysisCfg
def TruthHitAnalysisCfg(flags, name='TruthHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:314
python.HitAnalysisConfig.PixelHitAnalysisCfg
def PixelHitAnalysisCfg(flags, name='PixelHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:43
python.HitAnalysisConfig.LucidHitAnalysisCfg
def LucidHitAnalysisCfg(flags, name='LucidHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:283
python.HitAnalysisConfig.ITkStripHitAnalysisCfg
def ITkStripHitAnalysisCfg(flags, name='ITkStripHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:95
python.HitAnalysisConfig.HGTD_HitAnalysisCfg
def HGTD_HitAnalysisCfg(flags, name='HGTD_HitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:109
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.HitAnalysisConfig.MDTHitAnalysisCfg
def MDTHitAnalysisCfg(flags, name='MDTHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:207
python.CommonRunArgsToFlags.commonRunArgsToFlags
def commonRunArgsToFlags(runArgs, configFlags)
Definition: CommonRunArgsToFlags.py:12
python.HitAnalysisConfig.sTGCHitAnalysisCfg
def sTGCHitAnalysisCfg(flags, name='sTGCHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:251
python.HITtoHIST_SIM_Skeleton.fromRunArgs
def fromRunArgs(runArgs)
Definition: HITtoHIST_SIM_Skeleton.py:12
python.HitAnalysisConfig.PLR_HitAnalysisCfg
def PLR_HitAnalysisCfg(flags, name='PLR_HitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:126
python.DetectorConfigFlags.setupDetectorFlags
def setupDetectorFlags(flags, custom_list=None, use_metadata=False, toggle_geometry=False, validate_only=False, keep_beampipe=False)
Definition: DetectorConfigFlags.py:289
python.HitAnalysisConfig.TrackRecordAnalysisCfg
def TrackRecordAnalysisCfg(flags, name='TrackRecordAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:304
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.HitAnalysisConfig.CaloHitAnalysisCfg
def CaloHitAnalysisCfg(flags, name='CaloHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:176
str
Definition: BTagTrackIpAccessor.cxx:11
python.HitAnalysisConfig.RPCHitAnalysisCfg
def RPCHitAnalysisCfg(flags, name='RPCHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:196
python.SimulationHelpers.getDetectorsFromRunArgs
def getDetectorsFromRunArgs(flags, runArgs)
Definition: SimulationHelpers.py:5
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.HitAnalysisConfig.ITkPixelHitAnalysisCfg
def ITkPixelHitAnalysisCfg(flags, name='ITkPixelHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:81
python.HitAnalysisConfig.CSCHitAnalysisCfg
def CSCHitAnalysisCfg(flags, name='CSCHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:218
python.HitAnalysisConfig.ZDCHitAnalysisCfg
def ZDCHitAnalysisCfg(flags, name='ZDCHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:293