ATLAS Offline Software
Functions
TileRawChannelFlxMonitorAlgorithm Namespace Reference

Functions

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

Function Documentation

◆ TileRawChannelFlxMonitoringConfig()

def TileRawChannelFlxMonitorAlgorithm.TileRawChannelFlxMonitoringConfig (   flags,
  fragIDs = [0x201, 0x402],
  topPath = 'TestBeam',
**  kwargs 
)
Function to configures TileRawChannelFlxMonAlg algorithms in the monitoring system.

Definition at line 10 of file TileRawChannelFlxMonitorAlgorithm.py.

10 def TileRawChannelFlxMonitoringConfig(flags, fragIDs=[0x201, 0x402], topPath='TestBeam', **kwargs):
11  '''Function to configures TileRawChannelFlxMonAlg algorithms in the monitoring system.'''
12 
13  kwargs.setdefault('TileRawChannelContainerLegacy', 'TileRawChannelFit')
14  kwargs.setdefault('TileRawChannelContainerFlx', 'TileRawChannelFlxFit')
15  kwargs.setdefault('FelixScale', 4)
16 
17  felixScale = kwargs['FelixScale']
18 
19  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
20  result = ComponentAccumulator()
21 
22  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
23  result.merge( TileCablingSvcCfg(flags) )
24 
25  from AthenaMonitoring import AthMonitorCfgHelper
26  helper = AthMonitorCfgHelper(flags, 'TileRawChannelFlxMonitoring')
27 
28  from AthenaConfiguration.ComponentFactory import CompFactory
29  TileRawChannelFlxMonitorAlgorithm = CompFactory.TileRawChannelFlxMonitorAlgorithm
30  tileRawChannelFlxMonAlg = helper.addAlgorithm(TileRawChannelFlxMonitorAlgorithm, 'TileRawChannelFlxMonAlg')
31  tileRawChannelFlxMonAlg.TriggerChain = ''
32 
33  for k, v in kwargs.items():
34  setattr(tileRawChannelFlxMonAlg, k, v)
35 
36  # Configure histogram with TileRawChannelFlxMonAlg algorithm execution time
37  executeTimeGroup = helper.addGroup(tileRawChannelFlxMonAlg, 'TileRawChannelFlxMonExecuteTime', f'{topPath}/Felix')
38  executeTimeGroup.defineHistogram('TIME_execute', path = 'RawChannel', type='TH1F',
39  title = 'Time for execute TileRawChannelFlxMonAlg algorithm;time [#mus]',
40  xbins = 300, xmin = 0, xmax = 300000)
41 
42  runNumber = flags.Input.RunNumbers[0]
43  from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
44 
45  modules = []
46  if fragIDs:
47  for fragID in fragIDs:
48  ros = fragID >> 8
49  drawer = fragID & 0x3F
50  modules += [Tile.getDrawerString(ros, drawer)]
51  else:
52  for ros in range(1, Tile.MAX_ROS):
53  for drawer in range(0, Tile.MAX_DRAWER):
54  modules += [Tile.getDrawerString(ros, drawer)]
55 
56  channelLegacyGroup = helper.addGroup(tileRawChannelFlxMonAlg, 'TileRawChannelAmpLegacy', f'{topPath}/Legacy/RawChannel')
57  for moduleName in modules:
58  for gainName in ['HG', 'LG']:
59  title = f'Run {str(runNumber)} {moduleName} {gainName}: Amplitude (Legacy);Channel;Amplitude'
60  name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_amplitude;{moduleName}_{gainName}_amplitude_legacy'
61  path = moduleName
62  channelLegacyGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
63  xbins = 48, xmin = -0.5, xmax = 47.5)
64 
65  channelFelixGroup = helper.addGroup(tileRawChannelFlxMonAlg, 'TileRawChannelAmpFlx', f'{topPath}/Felix/RawChannel')
66  for moduleName in modules:
67  for gainName in ['HG', 'LG']:
68  title = f'Run {str(runNumber)} {moduleName} {gainName}: Amplitude (FELIX);Channel;Amplitude'
69  name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_amplitude;{moduleName}_{gainName}_amplitude_felix'
70  path = moduleName
71  channelFelixGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
72  xbins = 48, xmin = -0.5, xmax = 47.5)
73 
74  channelCompareGroup = helper.addGroup(tileRawChannelFlxMonAlg, 'TileRawChannelAmpDiff', f'{topPath}/Compare/RawChannel')
75  for moduleName in modules:
76  for gainName in ['HG', 'LG']:
77  title = f'Run {str(runNumber)} {moduleName} {gainName}: Amplitude difference (FELIX-Legacy*{felixScale});Channel;Amplitude difference [ADC]'
78  name = f'{moduleName}_{gainName}_channel,{moduleName}_{gainName}_amplitude_diff;{moduleName}_{gainName}_amplitude_diff'
79  path = moduleName
80  channelCompareGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
81  xbins = 48, xmin = -0.5, xmax = 47.5)
82 
83  channelCompareVsLegacyGroup = helper.addGroup(tileRawChannelFlxMonAlg, 'TileRawChannelAmpDiffVsLegacy', f'{topPath}/Compare/RawChannel')
84  for moduleName in modules:
85  for gainName in ['HG', 'LG']:
86  title = f'Run {str(runNumber)} {moduleName} {gainName}: Amplitude difference (FELIX-Legacy*{felixScale});Amplitude (Legacy) [ADC];Amplitude difference [ADC]'
87  name = f'{moduleName}_{gainName}_amplitude,{moduleName}_{gainName}_amplitude_diff;{moduleName}_{gainName}_amplitude_diff_vs_legacy'
88  path = moduleName
89  channelCompareVsLegacyGroup.defineHistogram(name, title = title, path = path, type = 'TProfile',
90  xbins = 1024, xmin = -0.5, xmax = 1023.5)
91 
92  accumalator = helper.result()
93  result.merge(accumalator)
94  return result
95 
96 
97 
TileRawChannelFlxMonitorAlgorithm.TileRawChannelFlxMonitoringConfig
def TileRawChannelFlxMonitoringConfig(flags, fragIDs=[0x201, 0x402], topPath='TestBeam', **kwargs)
Definition: TileRawChannelFlxMonitorAlgorithm.py:10
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11