ATLAS Offline Software
Functions
TileRawChannelNoiseMonitorAlgorithm Namespace Reference

Functions

def TileRawChannelNoiseMonitoringConfig (flags, **kwargs)
 

Function Documentation

◆ TileRawChannelNoiseMonitoringConfig()

def TileRawChannelNoiseMonitorAlgorithm.TileRawChannelNoiseMonitoringConfig (   flags,
**  kwargs 
)
Function to configure TileRawChannelNoiseMonitorAlgorithm algorithm in the monitoring system.

Definition at line 8 of file TileRawChannelNoiseMonitorAlgorithm.py.

8 def TileRawChannelNoiseMonitoringConfig(flags, **kwargs):
9 
10  ''' Function to configure TileRawChannelNoiseMonitorAlgorithm 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 TileRecUtils.TileDQstatusConfig import TileDQstatusAlgCfg
18  result.merge( TileDQstatusAlgCfg(flags) )
19 
20  from TileGeoModel.TileGMConfig import TileGMCfg
21  result.merge(TileGMCfg(flags))
22 
23  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
24  result.merge( TileCablingSvcCfg(flags) )
25 
26  from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg
27  result.merge( TileBadChannelsCondAlgCfg(flags, **kwargs) )
28 
29  from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
30  result.merge( TileEMScaleCondAlgCfg(flags) )
31 
32  kwargs.setdefault('CheckDCS', flags.Tile.useDCS)
33  if kwargs['CheckDCS']:
34  from TileConditions.TileDCSConfig import TileDCSCondAlgCfg
35  result.merge( TileDCSCondAlgCfg(flags) )
36 
37  #kwargs.setdefault('TriggerChain', 'HLT_noalg_cosmiccalo_L1RD1_EMPTY') #FIXME
38  kwargs.setdefault('TriggerTypes', [0x82])
39  kwargs.setdefault('Gain', 1)
40  kwargs.setdefault('TileRawChannelContainer', flags.Tile.RawChannelContainer)
41  kwargs.setdefault('ignoreDisconnectedChannels', flags.Common.isOnline)
42 
43  # The following class will make a sequence, configure algorithms, and link
44  # them to GenericMonitoringTools
45  from AthenaMonitoring import AthMonitorCfgHelper
46  helper = AthMonitorCfgHelper(flags,'TileRawChanNoiseMonitoring')
47 
48  # Adding an TileCellMonitorAlgorithm algorithm to the helper
49  from AthenaConfiguration.ComponentFactory import CompFactory
50  TileRawChannelNoiseMonitorAlgorithm = CompFactory.TileRawChannelNoiseMonitorAlgorithm
51  tileRawChanNoiseMonAlg = helper.addAlgorithm(TileRawChannelNoiseMonitorAlgorithm, 'TileRawChanNoiseMonAlg')
52 
53  for k, v in kwargs.items():
54  setattr(tileRawChanNoiseMonAlg, k, v)
55 
56  run = str(flags.Input.RunNumbers[0])
57 
58  # 1) Configure histogram with TileRawChanNoiseMonAlg algorithm execution time
59  executeTimeGroup = helper.addGroup(tileRawChanNoiseMonAlg, 'TileRawChanNoiseMonExecuteTime', 'Tile/')
60  executeTimeGroup.defineHistogram('TIME_execute', path = 'RawChannelNoise', type='TH1F',
61  title = 'Time for execute TileRawChanNoiseMonAlg algorithm;time [#mus]',
62  xbins = 100, xmin = 0, xmax = 100000)
63 
64 
65  from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
66 
67  from TileMonitoring.TileMonitoringCfgHelper import getPartitionName, getCellName, getGainName
68 
69  # 2) Configure histograms with Tile raw channel amplitude per channel
70  gainName = getGainName(kwargs['Gain'])
71  dimensions = [int(Tile.MAX_ROS) - 1, int(Tile.MAX_DRAWER), int(Tile.MAX_CHAN)]
72  chanAmpArray = helper.addArray(dimensions, tileRawChanNoiseMonAlg,
73  'TileRawChannelNoise', topPath = 'Tile/RawChannelNoise')
74  for postfix, tool in chanAmpArray.Tools.items():
75  ros, module, channel = [int(x) for x in postfix.split('_')[1:]]
76 
77  partition = getPartitionName(ros + 1)
78  moduleName = Tile.getDrawerString(ros + 1, module)
79  cellName = getCellName(partition, channel)
80 
81  title = 'Run %s %s: Tile cell %s / channel %s amplitude (%s);Amplitude [ADC]'
82  title = title % (run, moduleName, cellName, str(channel), gainName)
83  name = 'amplitude;TileRawChannelNoise_%s_%s_ch_%s_%s' % (moduleName, cellName, str(channel), gainName)
84  fullPath = '{}/{}'.format(partition, moduleName)
85 
86  tool.defineHistogram(name, title = title, path = fullPath, type = 'TH1F',
87  xbins = 81, xmin = -20.25, xmax = 20.25)
88 
89  accumalator = helper.result()
90  result.merge(accumalator)
91  return result
92 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TileRawChannelNoiseMonitorAlgorithm.TileRawChannelNoiseMonitoringConfig
def TileRawChannelNoiseMonitoringConfig(flags, **kwargs)
Definition: TileRawChannelNoiseMonitorAlgorithm.py:8
TileDQstatusConfig.TileDQstatusAlgCfg
def TileDQstatusAlgCfg(flags, **kwargs)
Definition: TileDQstatusConfig.py:31
python.TileBadChannelsConfig.TileBadChannelsCondAlgCfg
def TileBadChannelsCondAlgCfg(flags, **kwargs)
Definition: TileBadChannelsConfig.py:10
TileMonitoringCfgHelper.getPartitionName
def getPartitionName(ros)
Definition: TileMonitoringCfgHelper.py:40
python.TileEMScaleConfig.TileEMScaleCondAlgCfg
def TileEMScaleCondAlgCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:10
python.TileDCSConfig.TileDCSCondAlgCfg
def TileDCSCondAlgCfg(flags, **kwargs)
Definition: TileDCSConfig.py:8
TileMonitoringCfgHelper.getGainName
def getGainName(gain)
Definition: TileMonitoringCfgHelper.py:50
TileMonitoringCfgHelper.getCellName
def getCellName(partition, channel)
Definition: TileMonitoringCfgHelper.py:29
str
Definition: BTagTrackIpAccessor.cxx:11
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7