10 ''' Function to configure TileRODMonitorAlgorithm algorithm in the monitoring system.'''
14 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
17 from TileRecUtils.TileDQstatusConfig
import TileDQstatusAlgCfg
20 from TileGeoModel.TileGMConfig
import TileGMCfg
23 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
26 from TileConditions.TileBadChannelsConfig
import TileBadChannelsCondAlgCfg
29 kwargs.setdefault(
'CheckDCS', flags.Tile.useDCS)
30 if kwargs[
'CheckDCS']:
31 from TileConditions.TileDCSConfig
import TileDCSCondAlgCfg
34 from AthenaConfiguration.ComponentFactory
import CompFactory
36 kwargs.setdefault(
'fillRODFragmentSizeHistograms',
True)
37 fillRODFragmentSizeHistograms = kwargs[
'fillRODFragmentSizeHistograms']
38 if fillRODFragmentSizeHistograms:
39 result.addService(CompFactory.ROBDataProviderSvc())
43 from AthenaMonitoring
import AthMonitorCfgHelper
44 helper = AthMonitorCfgHelper(flags,
'TileRODMonitoring')
47 tileRODMonAlg = helper.addAlgorithm(CompFactory.TileRODMonitorAlgorithm,
'TileRODMonAlg')
52 kwargs.setdefault(
'fillHistogramsForL1Triggers', [
'AnyPhysTrig',
'bit7_Calib'])
53 l1Triggers = kwargs[
'fillHistogramsForL1Triggers']
55 kwargs.setdefault(
'EnergyThreshold', 300.)
56 energyThreshold = kwargs[
'EnergyThreshold']
58 kwargs.setdefault(
'TileRawChannelContainer', flags.Tile.RawChannelContainer)
59 kwargs.setdefault(
'NumberOfROBFragmets', 32)
60 nROBs = kwargs[
'NumberOfROBFragmets']
62 for k, v
in kwargs.items():
63 setattr(tileRODMonAlg, k, v)
65 run =
str(flags.Input.RunNumbers[0])
68 executeTimeGroup = helper.addGroup(tileRODMonAlg,
'TileRODMonExecuteTime',
'Tile/')
69 executeTimeGroup.defineHistogram(
'TIME_execute', path =
'ROD', type=
'TH1F',
70 title =
'Time for execute TileRODMonAlg algorithm;time [#ms]',
71 xbins = 100, xmin = 0, xmax = 100000)
74 from TileMonitoring.TileMonitoringCfgHelper
import addTile1DHistogramsArray
77 titleEnergyDiff =
'Relative difference between E_{DSP} and E_{OFFLINE}'
78 titleEnergyDiff +=
';(E_{DSP}- E_{OFFLINE})/E_{OFFLINE}'
80 xvalue =
'energyDiff', title = titleEnergyDiff, path =
'Tile/ROD',
81 xbins = 41, xmin = -0.205, xmax = 0.205, type =
'TH1D', run = run,
82 triggers = l1Triggers, perPartition =
True)
85 titleTimeDiff =
'Difference between t_{DSP} and t_{OFFLINE}'
86 titleTimeDiff +=
';t_{DSP}- t_{OFFLINE} [ns]'
88 xvalue =
'timeDiff', title = titleTimeDiff, path =
'Tile/ROD',
89 xbins = 101, xmin = -50.5, xmax = 50.5, type =
'TH1D', run = run,
90 triggers = l1Triggers, perPartition =
True)
93 titleTimeDiffVsTime =
'Difference between t_{DSP} and t_{OFFLINE}'
94 titleTimeDiffVsTime +=
';t_{OFFLINE} [ns];t_{DSP}- t_{OFFLINE} [ns]'
96 xvalue =
'time', value =
'timeDiff', title = titleTimeDiffVsTime,
97 path =
'Tile/ROD', xbins = 51, xmin = -25.5, xmax = 25.5,
98 type =
'TProfile', run = run, triggers = l1Triggers, perPartition =
True)
101 titleTimeDiffVsEnergy =
'Difference between t_{DSP} and t_{OFFLINE}'
102 titleTimeDiffVsEnergy +=
';E_{OFFLINE} [MeV];t_{DSP}- t_{OFFLINE}'
104 xvalue =
'energy', value =
'timeDiff', title = titleTimeDiffVsEnergy,
105 path =
'Tile/ROD', xbins = 75, xmin = energyThreshold, xmax = 15000.,
106 type =
'TProfile', run = run, triggers = l1Triggers, perPartition =
True)
109 from TileMonitoring.TileMonitoringCfgHelper
import addTile2DHistogramsArray
112 titleEnergyDiffVsTime =
'Relative difference between E_{DSP} and E_{OFFLINE}'
113 titleEnergyDiffVsTime +=
';t_{DSP} [ns];(E_{DSP}- E_{OFFLINE})/E_{OFFLINE}'
115 xvalue =
'time', yvalue =
'energyDiff',
116 title = titleEnergyDiffVsTime, path =
'Tile/ROD',
117 xbins = 51, xmin = -25.5, xmax = 25.5,
118 ybins = 30, ymin = -0.35, ymax = 0.1,
119 type =
'TH2D', run = run, triggers = l1Triggers, perPartition =
True)
122 titleEnergyDiffVsEnergy =
'Relative difference between E_{DSP} and E_{OFFLINE}'
123 titleEnergyDiffVsEnergy +=
';E_{OFFLINE} [MeV];(E_{DSP}- E_{OFFLINE})/E_{OFFLINE}'
125 xvalue =
'energy', yvalue =
'energyDiff',
126 title = titleEnergyDiffVsEnergy, path =
'Tile/ROD',
127 xbins = 75, xmin = energyThreshold, xmax = 15000.,
128 ybins = 82, ymin = -0.205, ymax = 0.205,
129 type =
'TH2D', run = run, triggers = l1Triggers, perPartition =
True)
132 from TileMonitoring.TileMonitoringCfgHelper
import addTileModuleChannelMapsArray
135 titleChanTime = (
'Tile DSP Channel Time (t_{DSP}) [ns], E_{ch} > %s MeV' % energyThreshold)
137 value =
'time', title = titleChanTime, path =
'Tile/ROD',
138 run = run, triggers = l1Triggers, separator =
'_')
141 if fillRODFragmentSizeHistograms:
143 titleAllRodFragSize =
'All Tile ROD fragments size vs luminosity block;LumiBlock;# words'
145 xvalue =
'lumiBlock', value =
'allRodFragsSize',
146 title = titleAllRodFragSize, path =
'Tile/ROD',
147 xbins = 1000, xmin = -0.5, xmax = 999.5,
148 type =
'TProfile', run = run, triggers = l1Triggers,
149 perPartition =
False, opt =
'kAddBinsDynamically', merge =
'merge')
151 from TileCalibBlobObjs.Classes
import TileCalibUtils
as Tile
152 from TileMonitoring.TileMonitoringCfgHelper
import getPartitionName
155 titleRodFragSize =
'Tile ROD fragment size [word]; Fragment;'
158 xvalue =
'fragment', yvalue =
'partition', value =
'rodFragSize',
159 title = titleRodFragSize, path =
'Tile/ROD',
160 xbins = nROBs, xmin = -0.5, xmax = nROBs - 0.5,
161 ybins = Tile.MAX_ROS - 1, ymin = 0.5, ymax = Tile.MAX_ROS - 0.5,
162 type =
'TProfile2D', run = run, triggers = l1Triggers, ylabels = partitionLabels)
165 accumalator = helper.result()
166 result.merge(accumalator)