ATLAS Offline Software
Loading...
Searching...
No Matches
RecoPT_NewConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def LArMonitoringConfig(ConfigFlags,CONFIG,STREAM,RunType=1):
7
8 acc=ComponentAccumulator()
9
10 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
11 acc.merge(LArGMCfg(ConfigFlags))
12
13 LArRawDataReadingAlg=CompFactory.LArRawDataReadingAlg
14 acc.addEventAlgo(LArRawDataReadingAlg())
15
16 from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
17 acc.merge(LArFebErrorSummaryMakerCfg(ConfigFlags))
18
19 if "LArMon" in CONFIG:
20
21 from LArMonitoring.LArFEBMonAlg import LArFEBMonConfig
22 acc.merge(LArFEBMonConfig(ConfigFlags))
23
24 from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
25 acc.merge(LArRawChannelBuilderAlgCfg(ConfigFlags))
26
27 if STREAM == 'NONE': # coverage only in NoTrigSel
28 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
29 acc.merge(CaloNoiseCondAlgCfg(ConfigFlags,"electronicNoise"))
30 from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg
31 acc.merge(LArBadChannelCfg(ConfigFlags))
32 from LArMonitoring.LArCoverageAlg import LArCoverageConfig
33 acc.merge(LArCoverageConfig(ConfigFlags))
34
35
36 # adding NoisyRO monitoring, needs CaloCells
37 from LArCellRec.LArCellBuilderConfig import LArCellBuilderCfg,LArCellCorrectorCfg
38 larCellBuilder = acc.popToolsAndMerge(LArCellBuilderCfg(ConfigFlags))
39 larCellCorrectors = acc.popToolsAndMerge(LArCellCorrectorCfg(ConfigFlags))
40 cellFinalizer = CompFactory.CaloCellContainerFinalizerTool()
41 cellMakerTools=[larCellBuilder,cellFinalizer]+larCellCorrectors
42 cellAlgo=CompFactory.CaloCellMaker(CaloCellMakerToolNames=cellMakerTools,
43 CaloCellsOutputName="AllCalo")
44
45 acc.addEventAlgo(cellAlgo,primary=True)
46
47 from LArCellRec.LArNoisyROSummaryConfig import LArNoisyROSummaryCfg
48 acc.merge(LArNoisyROSummaryCfg(ConfigFlags))
49
50 from LArMonitoring.LArNoisyROMonAlg import LArNoisyROMonConfig
51 acc.merge(LArNoisyROMonConfig(ConfigFlags))
52
53 from LArMonitoring.LArDigitMonAlg import LArDigitMonConfig
54 acc.merge(LArDigitMonConfig(ConfigFlags))
55
56 from LArMonitoring.LArRawChannelMonAlg import LArRawChannelMonConfig
57 acc.merge(LArRawChannelMonConfig(ConfigFlags))
58
59 if 'Main' == STREAM or 'express' == STREAM or 'L1Topo' == STREAM or 'HardProbes' == STREAM or 'MinBias' == STREAM or 'NONE' == STREAM:
60
61 # and cluster collision time, but need to run the clustering
62 from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
63 acc.merge(LArRawChannelBuilderAlgCfg(ConfigFlags))
64 from LArCellRec.LArCellBuilderConfig import LArCellBuilderCfg,LArCellCorrectorCfg
65 larCellBuilder = acc.popToolsAndMerge(LArCellBuilderCfg(ConfigFlags))
66 larCellCorrectors = acc.popToolsAndMerge(LArCellCorrectorCfg(ConfigFlags))
67 cellFinalizer = CompFactory.CaloCellContainerFinalizerTool()
68 cellMakerTools=[larCellBuilder,cellFinalizer]+larCellCorrectors
69 cellAlgo=CompFactory.CaloCellMaker(CaloCellMakerToolNames=cellMakerTools,
70 CaloCellsOutputName="AllCalo")
71 acc.addEventAlgo(cellAlgo,primary=True)
72
73 from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
74 acc.merge(CaloTopoClusterCfg(ConfigFlags,clustersname="CaloTopoClusters"))
75
76 egammaTopoClusterCopier = CompFactory.egammaTopoClusterCopier(
77 name='egammaLArCopier',InputTopoCollection="CaloTopoClusters",
78 OutputTopoCollection="egammaClusters",
79 #OutputTopoCollectionShallow="tmp_egammaClusters",
80 )
81 acc.addEventAlgo(egammaTopoClusterCopier)
82
83 from LArMonitoring.LArCollisionTimeMonAlg import LArCollisionTimeMonConfig
84 acc.merge(LArCollisionTimeMonConfig(ConfigFlags))
85
86 if 'ZeroBias' == STREAM or 'CosmicCalo' == STREAM:
87
88 #include noise correlation
89 from LArMonitoring.LArNoiseCorrelationMonAlg import LArNoiseCorrelationMonConfig
90 acc.merge(LArNoiseCorrelationMonConfig(ConfigFlags))
91
92 #FIXME: broken for the moment, uncomment once it is fixed
93 #if 'ZeroBias' == STREAM or 'CosmicCalo' == STREAM or 'NONE' == STREAM:
94 # #cosmics
95 # from LArMonitoring.LArCosmicsMonAlg import LArCosmicsMonConfig
96 # acc.merge(LArCosmicsMonConfig(ConfigFlags))
97
98 return acc
99
100 if "DSPMon" in CONFIG:
101
102 from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
103 acc.merge(LArRawChannelBuilderAlgCfg(ConfigFlags))
104
105 from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg
106 acc.merge(LArBadChannelCfg(ConfigFlags))
107
108 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
109 acc.merge(CaloNoiseCondAlgCfg(ConfigFlags,"totalNoise"))
110
111 from LArMonitoring.LArFEBMonAlg import LArFEBMonConfig
112 acc.merge(LArFEBMonConfig(ConfigFlags))
113
114 if RunType != 0:
115 from LArMonitoring.LArRODMonAlg import LArRODMonConfig
116 acc.merge(LArRODMonConfig(ConfigFlags))
117
118 return acc
119
120 if "CaloMon" in CONFIG:
121
122 from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
123 acc.merge(LArRawChannelBuilderAlgCfg(ConfigFlags))
124 from LArCellRec.LArCellBuilderConfig import LArCellBuilderCfg,LArCellCorrectorCfg
125 larCellBuilder = acc.popToolsAndMerge(LArCellBuilderCfg(ConfigFlags))
126 larCellCorrectors = acc.popToolsAndMerge(LArCellCorrectorCfg(ConfigFlags))
127 cellFinalizer = CompFactory.CaloCellContainerFinalizerTool()
128 cellMakerTools=[larCellBuilder,cellFinalizer]+larCellCorrectors
129 cellAlgo=CompFactory.CaloCellMaker(CaloCellMakerToolNames=cellMakerTools,
130 CaloCellsOutputName="AllCalo")
131
132 acc.addEventAlgo(cellAlgo,primary=True)
133
134 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
135 acc.merge(CaloNoiseCondAlgCfg(ConfigFlags,"electronicNoise"))
136
137 from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg
138 acc.merge(LArBadChannelCfg(ConfigFlags))
139
140 from CaloMonitoring.LArCellMonAlg import LArCellMonConfig
141 acc.merge(LArCellMonConfig(ConfigFlags))
142
143 # and clustering
144 from LArCellRec.LArCellBuilderConfig import LArCellBuilderCfg,LArCellCorrectorCfg
145 larCellBuilder = acc.popToolsAndMerge(LArCellBuilderCfg(ConfigFlags))
146 larCellCorrectors = acc.popToolsAndMerge(LArCellCorrectorCfg(ConfigFlags))
147 cellFinalizer = CompFactory.CaloCellContainerFinalizerTool()
148 cellMakerTools=[larCellBuilder,cellFinalizer]+larCellCorrectors
149 cellAlgo=CompFactory.CaloCellMaker(CaloCellMakerToolNames=cellMakerTools,
150 CaloCellsOutputName="AllCalo")
151 acc.addEventAlgo(cellAlgo,primary=True)
152
153 from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
154 acc.merge(CaloTopoClusterCfg(ConfigFlags,clustersname="CaloTopoClusters"))
155
156 egammaTopoClusterCopier = CompFactory.egammaTopoClusterCopier(
157 name='egammaLArCopier',InputTopoCollection="CaloTopoClusters",
158 OutputTopoCollection="egammaClusters",
159 #OutputTopoCollectionShallow="tmp_egammaClusters",
160 )
161 acc.addEventAlgo(egammaTopoClusterCopier)
162
163 from JetInputsMonitoring.ClusterMonitorAlgorithm import ClusterMonitoringConfig
164 acc.merge(ClusterMonitoringConfig(ConfigFlags))
165
166 from AthenaCommon.CFElements import findAlgorithm
167 mons=acc.getSequence("AthMonSeq_ClusterAthMonitorCfg")
168 a=findAlgorithm(mons,"ClusterMonAlg")
169 a.CaloTopoClusterContainer="CaloTopoClusters"
170
171 return acc
172
173 if "SCMon" in CONFIG:
174
175 from LArMonitoring.LArSuperCellMonAlg import LArSuperCellMonConfig
176 acc.merge(LArSuperCellMonConfig(ConfigFlags))
177
178 return acc
LArMonitoringConfig(ConfigFlags, CONFIG, STREAM, RunType=1)