ATLAS Offline Software
Tools/HitAnalysis/python/PostIncludes.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 # Adding SiHitValidation for whichever parts of ITk are running
4 def ITkHitAnalysis(flags):
5  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6  from HitAnalysis.HitAnalysisConfig import ITkPixelHitAnalysisCfg, ITkStripHitAnalysisCfg, PLR_HitAnalysisCfg
7 
8  result = ComponentAccumulator()
9 
10  if flags.Detector.EnableITkPixel:
11  result.merge(ITkPixelHitAnalysisCfg(flags))
12 
13  if flags.Detector.EnableITkStrip:
14  result.merge(ITkStripHitAnalysisCfg(flags))
15 
16  if flags.Detector.EnablePLR:
17  result.merge(PLR_HitAnalysisCfg(flags))
18 
19  return result
20 
21 def HGTDHitAnalysis(flags):
22  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
23  from HitAnalysis.HitAnalysisConfig import HGTD_HitAnalysisCfg
24 
25  result = ComponentAccumulator()
26 
27  if flags.Detector.EnableHGTD:
28  result.merge(HGTD_HitAnalysisCfg(flags))
29 
30  return result
31 
32 
33 def IDHitAnalysis(flags):
34 
35  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
36  from HitAnalysis.HitAnalysisConfig import PixelHitAnalysisCfg, SCTHitAnalysisCfg, TRTHitAnalysisCfg
37  result = ComponentAccumulator()
38  if flags.Detector.EnablePixel:
39  result.merge(PixelHitAnalysisCfg(flags))
40  if flags.Detector.EnableSCT:
41  result.merge(SCTHitAnalysisCfg(flags))
42  if flags.Detector.EnableTRT:
43  result.merge(TRTHitAnalysisCfg(flags))
44 
45  result.getService("THistSvc").Output = []
46  if flags.Detector.EnablePixel or flags.Detector.EnableSCT:
47  result.getService("THistSvc").Output += [
48  "SiHitAnalysis DATAFILE='SiHitValid.root' OPT='RECREATE'"]
49  if flags.Detector.EnableTRT:
50  result.getService("THistSvc").Output += [
51  "TRTHitAnalysis DATAFILE='TRTHitValid.root' OPT='RECREATE'"]
52 
53  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HitAnalysisConfig.SCTHitAnalysisCfg
def SCTHitAnalysisCfg(flags, name='SCTHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:56
python.PostIncludes.ITkHitAnalysis
def ITkHitAnalysis(flags)
Definition: Tools/HitAnalysis/python/PostIncludes.py:4
python.HitAnalysisConfig.TRTHitAnalysisCfg
def TRTHitAnalysisCfg(flags, name='TRTHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:69
python.HitAnalysisConfig.PixelHitAnalysisCfg
def PixelHitAnalysisCfg(flags, name='PixelHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:43
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.HitAnalysisConfig.PLR_HitAnalysisCfg
def PLR_HitAnalysisCfg(flags, name='PLR_HitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:126
python.PostIncludes.HGTDHitAnalysis
def HGTDHitAnalysis(flags)
Definition: Tools/HitAnalysis/python/PostIncludes.py:21
python.HitAnalysisConfig.ITkPixelHitAnalysisCfg
def ITkPixelHitAnalysisCfg(flags, name='ITkPixelHitAnalysis', **kwargs)
Definition: HitAnalysisConfig.py:81
python.PostIncludes.IDHitAnalysis
def IDHitAnalysis(flags)
Definition: Tools/HitAnalysis/python/PostIncludes.py:33