ATLAS Offline Software
Loading...
Searching...
No Matches
TileClusterMonitorAlgorithm Namespace Reference

Functions

 TileClusterMonitoringConfig (flags, **kwargs)

Detailed Description

@file TileClusterMonitorAlgorithm.py
@brief Python configuration of TileClusterMonitorAlgorithm algorithm for the Run III

Function Documentation

◆ TileClusterMonitoringConfig()

TileClusterMonitorAlgorithm.TileClusterMonitoringConfig ( flags,
** kwargs )
Function to configure TileClusterMonitorAlgorithm algorithm in the monitoring system.

Definition at line 8 of file TileClusterMonitorAlgorithm.py.

8def TileClusterMonitoringConfig(flags, **kwargs):
9
10 ''' Function to configure TileClusterMonitorAlgorithm algorithm in the monitoring system.'''
11
12 # Define one top-level monitoring algorithm. The new configuration
13 # framework uses a component accumulator.
14 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
15 result = ComponentAccumulator()
16
17 from TileMonitoring.TileTopoClusterConfig import TileTopoClusterCfg
18 result.merge( TileTopoClusterCfg(flags) )
19
20 # The following class will make a sequence, configure algorithms, and link
21 # them to GenericMonitoringTools
22 from AthenaMonitoring import AthMonitorCfgHelper
23 helper = AthMonitorCfgHelper(flags,'TileClusterMonitoring')
24
25 # Adding an TileCellMonitorAlgorithm algorithm to the helper
26 from AthenaConfiguration.ComponentFactory import CompFactory
27 tileClusterMonAlg = helper.addAlgorithm(CompFactory.TileClusterMonitorAlgorithm, 'TileClusterMonAlg')
28
29 tileClusterMonAlg.TriggerChain = ''
30
31 # from AthenaCommon.SystemOfUnits import MeV
32 #kwargs.setdefault('EnergyThreshold', 50.0 * MeV)
33
34 # L1Trigger Type Bits:
35 # bit0_RNDM, bit1_ZeroBias, bit2_L1Cal, bit3_Muon,
36 # bit4_RPC, bit5_FTK, bit6_CTP, bit7_Calib, AnyPhysTrig
37 kwargs.setdefault('fillHistogramsForL1Triggers', ['AnyPhysTrig', 'bit7_Calib'])
38 l1Triggers = kwargs['fillHistogramsForL1Triggers']
39
40 kwargs.setdefault('fillTimingHistograms', flags.Common.isOnline)
41 fillTimingHistograms = kwargs['fillTimingHistograms']
42
43 for k, v in kwargs.items():
44 setattr(tileClusterMonAlg, k, v)
45
46 run = str(flags.Input.RunNumbers[0])
47
48 # 1) Configure histogram with TileClusterMonAlg algorithm execution time
49 executeTimeGroup = helper.addGroup(tileClusterMonAlg, 'TileClusterMonExecuteTime', 'Tile/')
50 executeTimeGroup.defineHistogram('TIME_execute', path = 'Cluster', type='TH1F',
51 title = 'Time for execute TileClusterMonAlg algorithm;time [#mus]',
52 xbins = 100, xmin = 0, xmax = 1000)
53
54
55 from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
56
57
58 from TileMonitoring.TileMonitoringCfgHelper import addTileEtaPhiMapsArray
59
60 # ) Configure histograms with most energetic Tile tower position
61 addTileEtaPhiMapsArray(helper, tileClusterMonAlg, name = 'TileClusterEtaPhi', type='TH2D',
62 title = 'Most energetic Tile Cluster position', path = 'Tile/Cluster',
63 run = run, triggers = l1Triggers, perSample = False)
64
65 # ) Configure histograms with most energetic Tile tower position
66 addTileEtaPhiMapsArray(helper, tileClusterMonAlg, name = 'TileAllClusterEtaPhi', type='TH2D',
67 title = 'All Tile Cluster position', path = 'Tile/Cluster',
68 run = run, triggers = l1Triggers, perSample = False)
69
70 # ) Configure histograms with most energetic Tile tower position
71 addTileEtaPhiMapsArray(helper, tileClusterMonAlg, name = 'TileAllClusterEneEtaPhi', type='TProfile2D',
72 value = 'energy', title = 'All Tile Cluster everage energy [MeV]',
73 path = 'Tile/Cluster', run = run, triggers = l1Triggers, perSample = False)
74
75
76 # ) Configure histograms with position correlation of Tile cluster opposite to most energetic cluster
77 addTileEtaPhiMapsArray(helper, tileClusterMonAlg, name = 'TileClusterEtaPhiDiff', type='TH2D',
78 title = 'Position correlation of Tile Cluster opposite to most energetic cluster',
79 path = 'Tile/Cluster', run = run, triggers = l1Triggers, perSample = False,
80 etaTitle = '#Delta #eta', etabins = 21, etamin = -2.025, etamax = 2.025,
81 phiTitle = '#Delta #phi', phibins = Tile.MAX_DRAWER, phimin = 0.0, phimax = 6.4)
82
83
84 from TileMonitoring.TileMonitoringCfgHelper import addTile1DHistogramsArray
85
86 # ) Configure histograms with all Tile towers energy per partition
87 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterEnergy', xvalue = 'energy',
88 title = 'Energy in most energetic Tile Cluster [MeV]', path = 'Tile/Cluster',
89 xbins = 80, xmin = 0., xmax = 20000., type = 'TH1D', run = run,
90 triggers = l1Triggers, perPartition = True, perSample = False,
91 perGain = False, subDirectory = True, allPartitions = True)
92
93 # ) Configure histograms with Et in most energetic Tile tower per partition
94 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterEt', xvalue = 'et',
95 title = 'E_{T} [MeV] in most energetic Tile Cluster', path = 'Tile/Cluster',
96 xbins = 80, xmin = 0., xmax = 20000., type = 'TH1D', run = run,
97 triggers = l1Triggers, perPartition = False, perSample = False,
98 perGain = False, subDirectory = False, allPartitions = False)
99
100 # ) Configure histograms with all Tile towers energy per partition
101 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterNCells', xvalue = 'nCells',
102 title = 'Number of cells in most energetic Tile Cluster', path = 'Tile/Cluster',
103 xbins = 100, xmin = 0., xmax = 100., type = 'TH1D', run = run,
104 triggers = l1Triggers, perPartition = False, perSample = False,
105 perGain = False, subDirectory = False, allPartitions = False)
106
107
108 # ) Configure histograms with all Tile towers energy per partition
109 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileAllClusterEnergy', xvalue = 'energy',
110 title = 'All Tile Cluster Energy [MeV]', path = 'Tile/Cluster',
111 xbins = 80, xmin = 0., xmax = 20000., type = 'TH1D', run = run,
112 triggers = l1Triggers, perPartition = False, perSample = False,
113 perGain = False, subDirectory = False, allPartitions = False)
114
115 # ) Configure histograms with all Tile towers energy per partition
116 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileNClusters', xvalue = 'nClusters',
117 title = 'Number of Tile Clusters', path = 'Tile/Cluster',
118 xbins = 200, xmin = 0., xmax = 200., type = 'TH1D', run = run,
119 triggers = l1Triggers, perPartition = False, perSample = False,
120 perGain = False, subDirectory = False, allPartitions = False)
121
122 # ) Configure histograms with all Tile towers energy per partition
123 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterSumPx', xvalue = 'sumPx',
124 title = 'Tile Clusters SumPx [MeV]', path = 'Tile/Cluster',
125 xbins = 101, xmin = -10000., xmax = 10000., type = 'TH1D', run = run,
126 triggers = l1Triggers, perPartition = False, perSample = False,
127 perGain = False, subDirectory = False, allPartitions = False)
128
129 # ) Configure histograms with all Tile towers energy per partition
130 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterSumPy', xvalue = 'sumPy',
131 title = 'Tile Clusters SumPy [MeV]', path = 'Tile/Cluster',
132 xbins = 101, xmin = -10000., xmax = 10000., type = 'TH1D', run = run,
133 triggers = l1Triggers, perPartition = False, perSample = False,
134 perGain = False, subDirectory = False, allPartitions = False)
135
136 # ) Configure histograms with all Tile towers energy per partition
137 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterSumEt', xvalue = 'sumEt',
138 title = 'Tile Clusters SumEt [MeV]', path = 'Tile/Cluster',
139 xbins = 100, xmin = 0., xmax = 20000., type = 'TH1D', run = run,
140 triggers = l1Triggers, perPartition = False, perSample = False,
141 perGain = False, subDirectory = False, allPartitions = False)
142
143 # ) Configure histograms with all Tile towers energy per partition
144 timeDiffTitle = 'Tile time correlation of cluster opposite to most energetic cluster; Time difference [ns]'
145 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterTimeDiff', xvalue = 'timeDiff',
146 title = timeDiffTitle, path = 'Tile/Cluster', xbins = 200, xmin = -100., xmax = 100.,
147 type = 'TH1D', run = run, triggers = l1Triggers, perPartition = False, perSample = False,
148 perGain = False, subDirectory = False, allPartitions = False)
149
150 # ) Configure histograms with all Tile towers energy per partition
151 eneDiffTitle = 'Tile energy correlation of cluster opposite to most energetic cluster; Time energy [MeV]'
152 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TileClusterEneDiff', xvalue = 'energyDiff',
153 title = eneDiffTitle, path = 'Tile/Cluster', xbins = 200, xmin = -10000., xmax = 10000.,
154 type = 'TH1D', run = run, triggers = l1Triggers, perPartition = False, perSample = False,
155 perGain = False, subDirectory = False, allPartitions = False)
156
157
158 if fillTimingHistograms:
159 # ) Configure histograms with Tile partition time vs lumiBlock per partition
160 titlePartitionTime = 'Tile partition time vs luminosity block;LumiBlock;t[ns]'
161 addTile1DHistogramsArray(helper, tileClusterMonAlg, name = 'TilePartitionTimeLB', opt = 'kAddBinsDynamically',
162 xvalue = 'lumiBlock', value = 'time', title = titlePartitionTime, path = 'Tile/Cluster',
163 xbins = 1000, xmin = -0.5, xmax = 999.5, type='TProfile', run = run, triggers = [],
164 subDirectory = False, perPartition = True, perSample = False, perGain = False,
165 allPartitions = True, merge='merge')
166
167
168 accumalator = helper.result()
169 result.merge(accumalator)
170 return result
171