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

Functions

 TileDigitsFlxMonitoringConfig (flags, fragIDs=[0x201, 0x402], topPath='TestBeam', **kwargs)

Detailed Description

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

Function Documentation

◆ TileDigitsFlxMonitoringConfig()

TileDigitsFlxMonitorAlgorithm.TileDigitsFlxMonitoringConfig ( flags,
fragIDs = [0x201, 0x402],
topPath = 'TestBeam',
** kwargs )
Function to configures TileDigitsFlxMonAlg algorithms in the monitoring system.

Definition at line 10 of file TileDigitsFlxMonitorAlgorithm.py.

10def TileDigitsFlxMonitoringConfig(flags, fragIDs=[0x201, 0x402], topPath='TestBeam', **kwargs):
11 '''Function to configures TileDigitsFlxMonAlg algorithms in the monitoring system.'''
12
13 kwargs.setdefault('TileDigitsContainerLegacy', 'TileDigitsCnt')
14 kwargs.setdefault('TileDigitsContainerFlx', 'TileDigitsFlxCnt')
15 kwargs.setdefault('FirstSample', 0)
16 kwargs.setdefault('LastSample', 15)
17 kwargs.setdefault('FelixOffset', 0)
18 kwargs.setdefault('FelixScale', 4)
19
20 felixScale = kwargs['FelixScale']
21
22 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
23 result = ComponentAccumulator()
24
25 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
26 result.merge( TileCablingSvcCfg(flags) )
27
28 from AthenaMonitoring import AthMonitorCfgHelper
29 helper = AthMonitorCfgHelper(flags, 'TileDigitsFlxMonitoring')
30
31 from AthenaConfiguration.ComponentFactory import CompFactory
32 TileDigitsFlxMonitorAlgorithm = CompFactory.TileDigitsFlxMonitorAlgorithm
33 tileDigitsFlxMonAlg = helper.addAlgorithm(TileDigitsFlxMonitorAlgorithm, 'TileDigitsFlxMonAlg')
34 tileDigitsFlxMonAlg.TriggerChain = ''
35
36 for k, v in kwargs.items():
37 setattr(tileDigitsFlxMonAlg, k, v)
38
39 # Configure histogram with TileDigitsFlxMonAlg algorithm execution time
40 executeTimeGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileDigitsFlxMonExecuteTime', f'{topPath}/Felix')
41 executeTimeGroup.defineHistogram('TIME_execute', path = 'Digits', type='TH1F',
42 title = 'Time for execute TileDigitsFlxMonAlg algorithm;time [#mus]',
43 xbins = 300, xmin = 0, xmax = 300000)
44
45 runNumber = flags.Input.RunNumbers[0]
46 from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
47
48 modules = []
49 if fragIDs:
50 for fragID in fragIDs:
51 ros = fragID >> 8
52 drawer = fragID & 0x3F
53 modules += [Tile.getDrawerString(ros, drawer)]
54 else:
55 for ros in range(1, Tile.MAX_ROS):
56 for drawer in range(0, Tile.MAX_DRAWER):
57 modules += [Tile.getDrawerString(ros, drawer)]
58
59 channelHFNGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileFlxMonHFN', f'{topPath}/Felix/Digits')
60 for moduleName in modules:
61 for gainName in ['HG', 'LG']:
62 title = f'Run {runNumber} {moduleName} {gainName}: Mean RMS in event (HFN)-FELIX;Channel;HFN'
63 name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_HFN;{moduleName}_HFN_{gainName}'
64 path = moduleName
65 channelHFNGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
66 xbins = 48, xmin = -0.5, xmax = 47.5)
67
68 channelPedGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileFlxMonPed', f'{topPath}/Felix/Digits')
69 for moduleName in modules:
70 for gainName in ['HG', 'LG']:
71 title = f'Run {runNumber} {moduleName} {gainName}: Pedestal, sample[0]-FELIX;Channel;ADC'
72 name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_Pedestal;{moduleName}_Pedestal_{gainName}'
73 path = moduleName
74 channelPedGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
75 xbins = 48, xmin = -0.5, xmax = 47.5)
76
77 channelHFNGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileLegacyMonHFN', f'{topPath}/Legacy/Digits')
78 for moduleName in modules:
79 for gainName in ['HG', 'LG']:
80 title = f'Run {runNumber} {moduleName} {gainName}: Mean RMS in event (HFN);Channel;HFN'
81 name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_HFN;{moduleName}_HFN_{gainName}'
82 path = moduleName
83 channelHFNGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
84 xbins = 48, xmin = -0.5, xmax = 47.5)
85
86 channelPedGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileLegacyMonPed', f'{topPath}/Legacy/Digits')
87 for moduleName in modules:
88 for gainName in ['HG', 'LG']:
89 title = f'Run {runNumber} {moduleName} {gainName}: Pedestal, sample[0];Channel;ADC'
90 name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_Pedestal;{moduleName}_Pedestal_{gainName}'
91 path = moduleName
92 channelPedGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
93 xbins = 48, xmin = -0.5, xmax = 47.5)
94
95 channelSamplesFlxGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileFlxMonSamples', f'{topPath}/Felix/Digits')
96 for moduleName in modules:
97 for channel in range(0, Tile.MAX_CHAN):
98 for gainName in ['HG', 'LG']:
99 title = (f'Run {runNumber} {moduleName} channel {channel} {gainName}: Samples-FELIX;Sample [ADC];N')
100 name = f'{moduleName}_ch_{str(channel)}_{gainName}_samples'
101 path = moduleName
102 channelSamplesFlxGroup.defineHistogram(name, title = title, path = path, type = 'TH1F',
103 xbins = 4096, xmin = -0.5, xmax = 4095.5)
104
105
106 channelSamplesLegacyGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileLegacyMonSamples', f'{topPath}/Legacy/Digits')
107 for moduleName in modules:
108 for channel in range(0, Tile.MAX_CHAN):
109 for gainName in ['HG', 'LG']:
110 title = (f'Run {runNumber} {moduleName} channel {channel} {gainName}: Samples;Sample [ADC];N')
111 name = f'{moduleName}_ch_{str(channel)}_{gainName}_samples'
112 path = moduleName
113 channelSamplesLegacyGroup.defineHistogram(name, title = title, path = path, type = 'TH1F',
114 xbins = 1024, xmin = -0.5, xmax = 1023.5)
115
116 channelAllSamplesDiffGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileChannelAllSamplesDiff', f'{topPath}/Compare/Digits')
117 for moduleName in modules:
118 for channel in range(0, Tile.MAX_CHAN):
119 for gainName in ['HG', 'LG']:
120 title = (f'Run {runNumber} {moduleName} channel {channel} {gainName}: Samples difference (FELIX-Legacy*{felixScale});Sample [ADC];N')
121 name = f'{moduleName}_ch_{str(channel)}_{gainName}_samples_diff'
122 path = moduleName
123 channelAllSamplesDiffGroup.defineHistogram(name, title = title, path = path, type = 'TH1F',
124 xbins = 200, xmin = -100, xmax = 100)
125
126 moduleAllSamplesGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileModuleAllSamplesDiff', f'{topPath}/Compare/Digits')
127 for moduleName in modules:
128 for gainName in ['HG', 'LG']:
129 title = (f'Run {runNumber} {moduleName} {gainName}: All channels samples difference (FELIX-Legacy*{felixScale});Sample [ADC];N')
130 name = f'{moduleName}_{gainName}_samples_diff;{moduleName}_{gainName}_all_channels_samples_diff'
131 path = moduleName
132 moduleAllSamplesGroup.defineHistogram(name, title = title, path = path, type = 'TH1F',
133 xbins = 200, xmin = -100, xmax = 100)
134
135 moduleSamplesDiffGroup = helper.addGroup(tileDigitsFlxMonAlg, 'TileModuleSamplesDiff', f'{topPath}/Compare/Digits')
136 for moduleName in modules:
137 for gainName in ['HG', 'LG']:
138 title = f'Run {runNumber} {moduleName} {gainName}: Samples difference (FELIX-Legacy*{felixScale});Channel;ADC'
139 name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_samples_diff;{moduleName}_{gainName}_samples_diff'
140 path = moduleName
141 moduleSamplesDiffGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
142 xbins = 48, xmin = -0.5, xmax = 47.5)
143
144
145 accumalator = helper.result()
146 result.merge(accumalator)
147 return result
148
149