Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions | Variables
TileMonitoringCfgHelper Namespace Reference

Functions

def getCellName (partition, channel)
 
def getChannelsForCell (partition, cellName)
 
def getPartitionName (ros)
 
def getGainName (gain)
 
def getSampleName (sample)
 
def getTileHistogramName (name, separator='_', **kwargs)
 
def getTileHistogramTitle (title, **kwargs)
 
def getTileHistogramPath (path, **kwargs)
 
def getModuleLabels (partition)
 
def getCellChannelLabels (partition)
 
def getLabels (labels, partition='')
 
def getCellNameTMDB (partition, channel)
 
def getCellChannelTMDB_Labels (partition)
 
def getLegacyChannelForDemonstrator (useDemoCabling, partition, drawer, channel)
 
def addValueVsModuleAndChannelMaps (group, name, title, path, subDirectory=False, type='TH2D', value='', trigger='', run='')
 
def _getDimensions (triggers=[], perPartition=False, perSample=False, perGain=False, allPartitions=False)
 
def _parsePostfix (postfix, triggers=[], perPartition=False, perSample=False, perGain=False)
 
def addTile2DHistogramsArray (helper, algorithm, name='', xvalue='', yvalue='', value='', title='', path='', weight='', xbins=0, xmin=0., xmax=0., ybins=0, ymin=0., ymax=0., type='TH2D', run='', triggers=[], xlabels=(), ylabels=(), opt='', subDirectory=False, perPartition=False, perSample=False, perGain=False, allPartitions=False, separator='_', merge=None)
 
def addTileModuleChannelMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 
def addTileModuleCorrelionMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, allPartitions=False, separator='_')
 
def addTileModulePartitionMapsArray (helper, algorithm, name, title, path, weight='', type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 
def addTileModuleDigitizerMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 
def addTileEtaPhiMapsArray (helper, algorithm, name, title, path, weight='', type='TH2D', value='', run='', triggers=[], perSample=True, perGain=False, separator='_', etaTitle='#eta', etabins=21, etamin=-2.025, etamax=2.025, phiTitle='#phi', phibins=Tile.MAX_DRAWER, phimin=-3.15, phimax=3.15)
 
def addTile1DHistogramsArray (helper, algorithm, name='', xvalue='', value='', title='', path='', weight='', xbins=0, xmin=0., xmax=0., type='TH1D', run='', triggers=[], subDirectory=False, perPartition=True, perSample=False, opt='', perGain=False, xlabels=(), allPartitions=False, separator='_', merge=None)
 
def addTileModuleArray (helper, algorithm, name, title, path, type='TH1D', value='', subDirectory=False, triggers=[], run='', separator='_')
 
def addTileTMDB2DScatterHistogramsArray (helper, algorithm, name='', xvalue='', yvalue='', xbins=0, xmin=0, xmax=0, title='', path='', type='TH2D', run='')
 
def addTileTMDB_2DHistogramsArray (helper, algorithm, name='', value='', title='', path='', type='TH2D', run='')
 
def addTileTMDB_1DHistogramsArray (helper, algorithm, name='', xvalue='', value='', title='', path='', xbins=0, xmin=0., xmax=0., type='TH1D', run='', perModule=False, isCorr=False)
 
def addTileChannelHistogramsArray (helper, algorithm, name, title, path, xvalue, xbins, xmin, xmax, type='TH1D', yvalue=None, ybins=None, ymin=None, ymax=None, run='', value='', aliasSuffix='')
 

Variables

 _cellNameEB
 
 _cellNameLB
 
 _partitionName
 
 _gainName
 
 _sampleName
 
 _cellNameTMDB_LB
 
 _cellNameTMDB_EB
 

Function Documentation

◆ _getDimensions()

def TileMonitoringCfgHelper._getDimensions (   triggers = [],
  perPartition = False,
  perSample = False,
  perGain = False,
  allPartitions = False 
)
private

Definition at line 280 of file TileMonitoringCfgHelper.py.

280 def _getDimensions(triggers = [], perPartition = False, perSample = False, perGain = False, allPartitions = False):
281 
282  dimensions = []
283  if perPartition:
284  dimensions += [int(Tile.MAX_ROS)] if allPartitions else [int(Tile.MAX_ROS - 1)]
285  if perSample:
286  dimensions += [len(_sampleName)]
287  if perGain:
288  dimensions += [int(Tile.MAX_GAIN)]
289  if triggers:
290  dimensions += [len(triggers)]
291 
292  return dimensions
293 
294 

◆ _parsePostfix()

def TileMonitoringCfgHelper._parsePostfix (   postfix,
  triggers = [],
  perPartition = False,
  perSample = False,
  perGain = False 
)
private

Definition at line 295 of file TileMonitoringCfgHelper.py.

295 def _parsePostfix(postfix, triggers = [], perPartition = False, perSample = False, perGain = False):
296 
297  kwargs = {}
298  elements = postfix.split('_')
299 
300  if triggers:
301  kwargs['trigger'] = triggers[int(elements.pop())]
302  if perGain:
303  kwargs['gain'] = getGainName(elements.pop())
304  if perSample:
305  kwargs['sample'] = getSampleName(elements.pop())
306  if perPartition:
307  kwargs['ros'] = int(elements.pop()) + 1
308  kwargs['partition'] = getPartitionName(kwargs['ros'])
309 
310  return kwargs
311 

◆ addTile1DHistogramsArray()

def TileMonitoringCfgHelper.addTile1DHistogramsArray (   helper,
  algorithm,
  name = '',
  xvalue = '',
  value = '',
  title = '',
  path = '',
  weight = '',
  xbins = 0,
  xmin = 0.,
  xmax = 0.,
  type = 'TH1D',
  run = '',
  triggers = [],
  subDirectory = False,
  perPartition = True,
  perSample = False,
  opt = '',
  perGain = False,
  xlabels = (),
  allPartitions = False,
  separator = '_',
  merge = None 
)
This function configures 1D histograms with Tile monitored value per L1 trigger, partition, sample, gain.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + sample + trigger
    xvalue    -- Name of monitored value for x axis
    value     -- Name of monitored value (needed for TProfile)
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + sample + title
    path      -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type      -- Type of histogram (TH1D, TProfile)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    perPartition -- Configure histograms per partition (if True partition name will be put into the title)
    perSample -- Configure histograms per sample (if True sample name will be put into the title)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    xlabels    -- List of bin labels
    allPartitions  -- Configure additional histogram with information from all partitions
    separator -- Given it will be used as separtor between name and trigger
    merge     -- Whether to use a different histogram merging algorithm (must be "merge" for opt=kAddBinsDynamically)

Definition at line 548 of file TileMonitoringCfgHelper.py.

548 def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = '', title = '', path = '',
549  weight = '', xbins = 0, xmin = 0., xmax = 0., type = 'TH1D', run = '', triggers = [],
550  subDirectory = False, perPartition = True, perSample = False, opt = '',
551  perGain = False, xlabels = (), allPartitions = False, separator = '_', merge = None ):
552  '''
553  This function configures 1D histograms with Tile monitored value per L1 trigger, partition, sample, gain.
554 
555  Arguments:
556  helper -- Helper
557  algorithm -- Monitoring algorithm
558  name -- Name of histogram, actual name is constructed dynamicaly like:
559  name + partition + sample + trigger
560  xvalue -- Name of monitored value for x axis
561  value -- Name of monitored value (needed for TProfile)
562  title -- Title of histogram, actual title is constructed dynamicaly like:
563  run + trigger + partion + sample + title
564  path -- Path in file for histogram (relative to the path of given group)
565  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
566  type -- Type of histogram (TH1D, TProfile)
567  run -- Run number (given it will be put into the title)
568  triggers -- Name of triggers (given it will be put into title and name of histogram)
569  perPartition -- Configure histograms per partition (if True partition name will be put into the title)
570  perSample -- Configure histograms per sample (if True sample name will be put into the title)
571  perGain -- Configure histograms per gain (if True gain name will be put into the title)
572  xlabels -- List of bin labels
573  allPartitions -- Configure additional histogram with information from all partitions
574  separator -- Given it will be used as separtor between name and trigger
575  merge -- Whether to use a different histogram merging algorithm (must be "merge" for opt=kAddBinsDynamically)
576  '''
577 
578  dimensions = _getDimensions(triggers = triggers, perPartition = perPartition, perSample = perSample,
579  perGain = perGain, allPartitions = allPartitions)
580 
581  array = helper.addArray(dimensions, algorithm, name, topPath = path)
582  for postfix, tool in array.Tools.items():
583 
584  kwargs = _parsePostfix(postfix, triggers = triggers, perPartition = perPartition,
585  perSample = perSample, perGain = perGain)
586 
587  partition = kwargs['partition'] if 'partition' in kwargs else ''
588  nxlabels = getLabels(xlabels, partition)
589 
590  fullName = xvalue + (',' + value if 'Profile' in type else '') + ';'
591  fullName += getTileHistogramName(name = name,separator = separator, **kwargs)
592 
593  subPath = getTileHistogramPath(path = '', subDirectory = subDirectory, **kwargs)
594  fullTitle = getTileHistogramTitle(title = title, run = run, **kwargs)
595 
596  tool.defineHistogram( fullName, path = subPath, weight = weight, type = type, title = fullTitle,
597  xlabels = nxlabels, xbins = xbins, xmin = xmin, xmax = xmax, opt = opt, merge = merge)
598 
599  return array
600 
601 
602 
603 

◆ addTile2DHistogramsArray()

def TileMonitoringCfgHelper.addTile2DHistogramsArray (   helper,
  algorithm,
  name = '',
  xvalue = '',
  yvalue = '',
  value = '',
  title = '',
  path = '',
  weight = '',
  xbins = 0,
  xmin = 0.,
  xmax = 0.,
  ybins = 0,
  ymin = 0.,
  ymax = 0.,
  type = 'TH2D',
  run = '',
  triggers = [],
  xlabels = (),
  ylabels = (),
  opt = '',
  subDirectory = False,
  perPartition = False,
  perSample = False,
  perGain = False,
  allPartitions = False,
  separator = '_',
  merge = None 
)
This function configures 2D histograms with Tile monitored value per L1 trigger, partition, sample, gain.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + sample + gain + trigger
    xvalue    -- Name of monitored value for x axis
    yvalue    -- Name of monitored value for y axis
    value     -- Name of monitored value for profile (needed for TProfile2D)
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + sample + title
    path      -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type      -- Type of histogram (TH2D, TProfile2D)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    xlabels   -- List of bin labels for x axis,  "modules" and "channels" have special meaning,
                    in this case corresponding labels will be generated dynamicaly
    ylabels   -- List of bin labels for y axis,  "modules" and "channels" have special meaning,
                    in this case corresponding labels will be generated dynamicaly
    perPartition -- Configure histograms per partition (if True partition name will be put into the title)
    perSample -- Configure histograms per sample (if True sample name will be put into the title)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    allPartitions  -- Configure additional histogram with information from all partitions
    separator -- Given it will be used as separtor between name and trigger
    merge     -- Whether to use a different histogram merging algorithm (must be "merge" for opt=kAddBinsDynamically)

Definition at line 312 of file TileMonitoringCfgHelper.py.

312 def addTile2DHistogramsArray(helper, algorithm, name = '', xvalue = '', yvalue = '', value = '',
313  title = '', path = '', weight = '', xbins = 0, xmin = 0., xmax = 0.,
314  ybins = 0, ymin = 0., ymax = 0., type = 'TH2D', run = '', triggers = [],
315  xlabels = (), ylabels = (), opt = '', subDirectory = False, perPartition = False,
316  perSample = False, perGain = False, allPartitions = False, separator = '_', merge = None ):
317  '''
318  This function configures 2D histograms with Tile monitored value per L1 trigger, partition, sample, gain.
319 
320  Arguments:
321  helper -- Helper
322  algorithm -- Monitoring algorithm
323  name -- Name of histogram, actual name is constructed dynamicaly like:
324  name + partition + sample + gain + trigger
325  xvalue -- Name of monitored value for x axis
326  yvalue -- Name of monitored value for y axis
327  value -- Name of monitored value for profile (needed for TProfile2D)
328  title -- Title of histogram, actual title is constructed dynamicaly like:
329  run + trigger + partion + sample + title
330  path -- Path in file for histogram (relative to the path of given group)
331  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
332  type -- Type of histogram (TH2D, TProfile2D)
333  run -- Run number (given it will be put into the title)
334  triggers -- Name of triggers (given it will be put into title and name of histogram)
335  xlabels -- List of bin labels for x axis, "modules" and "channels" have special meaning,
336  in this case corresponding labels will be generated dynamicaly
337  ylabels -- List of bin labels for y axis, "modules" and "channels" have special meaning,
338  in this case corresponding labels will be generated dynamicaly
339  perPartition -- Configure histograms per partition (if True partition name will be put into the title)
340  perSample -- Configure histograms per sample (if True sample name will be put into the title)
341  perGain -- Configure histograms per gain (if True gain name will be put into the title)
342  allPartitions -- Configure additional histogram with information from all partitions
343  separator -- Given it will be used as separtor between name and trigger
344  merge -- Whether to use a different histogram merging algorithm (must be "merge" for opt=kAddBinsDynamically)
345  '''
346 
347  import builtins
348 
349  dimensions = _getDimensions(triggers = triggers, perPartition = perPartition, perSample = perSample,
350  perGain = perGain, allPartitions = allPartitions)
351 
352  array = helper.addArray(dimensions, algorithm, name, topPath = path)
353  for postfix, tool in array.Tools.items():
354 
355  kwargs = _parsePostfix(postfix, triggers = triggers, perPartition = perPartition,
356  perSample = perSample, perGain = perGain)
357 
358  partition = kwargs['partition'] if 'partition' in kwargs else ''
359 
360  nxlabels = getLabels(xlabels, partition)
361  nylabels = getLabels(ylabels, partition)
362 
363  fullName = xvalue + ',' + yvalue + (',' + value if 'Profile' in type else '') + ';'
364  fullName += getTileHistogramName(name = name,separator = separator, **kwargs)
365 
366  subPath = getTileHistogramPath(path = '', subDirectory = subDirectory, **kwargs)
367 
368  gain = kwargs.get('gain', None)
369  gainTitle = title.get(gain, title) if gain and builtins.type(title) is dict else title
370  partitionTitle = gainTitle[partition] if builtins.type(gainTitle) is dict else gainTitle
371  fullTitle = getTileHistogramTitle(title = partitionTitle, run = run, **kwargs)
372 
373  tool.defineHistogram( fullName, path = subPath, type = type, title = fullTitle,
374  xlabels = nxlabels, ylabels = nylabels,
375  xbins = xbins, xmin = xmin, xmax = xmax,
376  ybins = ybins, ymin = ymin, ymax = ymax,
377  weight = weight, opt = opt, merge = merge)
378 
379  return array
380 
381 

◆ addTileChannelHistogramsArray()

def TileMonitoringCfgHelper.addTileChannelHistogramsArray (   helper,
  algorithm,
  name,
  title,
  path,
  xvalue,
  xbins,
  xmin,
  xmax,
  type = 'TH1D',
  yvalue = None,
  ybins = None,
  ymin = None,
  ymax = None,
  run = '',
  value = '',
  aliasSuffix = '' 
)
This function configures 1D histograms with Tile monitored value per module, channel, gain.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                name + mudule + channel + gain
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                run + module + channel + gain + title
    path      -- Path in file for histogram (relative to the path of given group)
    xvalue    -- Name of monitored value for x axis
    yvalue    -- Name of monitored value for y axis
    type      -- Type of histogram (TH1D, TProfile, TH2D)
    value     -- Name of monitored value (needed for TProfile)
    run       -- Run number (given it will be put into the title)
    xlabels    -- List of bin labels

Definition at line 729 of file TileMonitoringCfgHelper.py.

729 def addTileChannelHistogramsArray(helper, algorithm, name, title, path,
730  xvalue, xbins, xmin, xmax, type='TH1D',
731  yvalue=None, ybins=None, ymin=None, ymax=None,
732  run='', value='', aliasSuffix=''):
733  '''
734  This function configures 1D histograms with Tile monitored value per module, channel, gain.
735 
736  Arguments:
737  helper -- Helper
738  algorithm -- Monitoring algorithm
739  name -- Name of histogram, actual name is constructed dynamicaly like:
740  name + mudule + channel + gain
741  title -- Title of histogram, actual title is constructed dynamicaly like:
742  run + module + channel + gain + title
743  path -- Path in file for histogram (relative to the path of given group)
744  xvalue -- Name of monitored value for x axis
745  yvalue -- Name of monitored value for y axis
746  type -- Type of histogram (TH1D, TProfile, TH2D)
747  value -- Name of monitored value (needed for TProfile)
748  run -- Run number (given it will be put into the title)
749  xlabels -- List of bin labels
750  '''
751 
752  import builtins
753  dimensions = [int(Tile.MAX_ROS) - 1, int(Tile.MAX_DRAWER)]
754  array = helper.addArray(dimensions, algorithm, name, topPath = path)
755 
756  for postfix, tool in array.Tools.items():
757  ros, module = [int(x) for x in postfix.split('_')[1:]]
758  moduleName = Tile.getDrawerString(ros + 1, module)
759  fullPath = moduleName
760 
761  for channel in range(0, int(Tile.MAX_CHAN)):
762  channelName = f'0{channel}' if channel < 10 else str(channel)
763  for gain in range(0, Tile.MAX_GAIN):
764  gainName = {0 : 'low', 1 : 'high'}[gain]
765  nameSuffix = aliasSuffix if aliasSuffix else xvalue
766  fullName = f'{xvalue}_{channel}_{gain}'
767  fullName += f',{yvalue}_{channel}_{gain}' if yvalue else ""
768  fullName += f',{value}_{channel}_{gain};' if 'Profile' in type else ';'
769  fullName += f'{moduleName}_ch_{channelName}_{gainName[:2]}_{nameSuffix}'
770  fullTitle = f'Run {run} {moduleName} Channel {channelName} {gainName} gain: {title}'
771 
772  xbinsInGain = xbins[gain] if builtins.type(xbins) is list else xbins
773  xminInGain = xmin[gain] if builtins.type(xmin) is list else xmin
774  xmaxInGain = xmax[gain] if builtins.type(xmax) is list else xmax
775 
776  ybinsInGain = ybins[gain] if builtins.type(ybins) is list else ybins
777  yminInGain = ymin[gain] if builtins.type(ymin) is list else ymin
778  ymaxInGain = ymax[gain] if builtins.type(ymax) is list else ymax
779 
780  tool.defineHistogram(fullName, title = fullTitle, path = fullPath, type = type,
781  xbins = xbinsInGain, xmin = xminInGain, xmax = xmaxInGain,
782  ybins = ybinsInGain, ymin = yminInGain, ymax = ymaxInGain)

◆ addTileEtaPhiMapsArray()

def TileMonitoringCfgHelper.addTileEtaPhiMapsArray (   helper,
  algorithm,
  name,
  title,
  path,
  weight = '',
  type = 'TH2D',
  value = '',
  run = '',
  triggers = [],
  perSample = True,
  perGain = False,
  separator = '_',
  etaTitle = '#eta',
  etabins = 21,
  etamin = -2.025,
  etamax = 2.025,
  phiTitle = '#phi',
  phibins = Tile.MAX_DRAWER,
  phimin = -3.15,
  phimax = 3.15 
)
This function configures 2D histograms (maps) with Tile monitored value vs eta and phi.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name    -- Name of histogram, actual name is constructed dynamicaly like:
                    name + sample + gain + trigger
    title   -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + sample + gain + title
    path    -- Path in file for histogram (relative to the path of given group)
    type    -- Type of histogram (TH2D, TProfile2D)
    value   -- Name of monitored value (needed for TProfile2D)
    run     -- Run number (given it will be put into the title)
    triggers -- Name of trigger (given it will be put into title and name of histogram)
    perSample -- Configure histograms per sample (if True sample name will be put into the title)
    perGain -- Configure histograms per gain (if True gain name will be put into the title)
    separator -- Given it will be used as separtor between name, gain, and trigger

Definition at line 513 of file TileMonitoringCfgHelper.py.

513 def addTileEtaPhiMapsArray(helper, algorithm, name, title, path, weight = '', type = 'TH2D', value = '',
514  run = '', triggers = [], perSample = True, perGain = False, separator = '_',
515  etaTitle= '#eta', etabins = 21, etamin = -2.025, etamax = 2.025,
516  phiTitle = '#phi', phibins = Tile.MAX_DRAWER, phimin = -3.15, phimax = 3.15):
517  '''
518  This function configures 2D histograms (maps) with Tile monitored value vs eta and phi.
519 
520  Arguments:
521  helper -- Helper
522  algorithm -- Monitoring algorithm
523  name -- Name of histogram, actual name is constructed dynamicaly like:
524  name + sample + gain + trigger
525  title -- Title of histogram, actual title is constructed dynamicaly like:
526  run + trigger + sample + gain + title
527  path -- Path in file for histogram (relative to the path of given group)
528  type -- Type of histogram (TH2D, TProfile2D)
529  value -- Name of monitored value (needed for TProfile2D)
530  run -- Run number (given it will be put into the title)
531  triggers -- Name of trigger (given it will be put into title and name of histogram)
532  perSample -- Configure histograms per sample (if True sample name will be put into the title)
533  perGain -- Configure histograms per gain (if True gain name will be put into the title)
534  separator -- Given it will be used as separtor between name, gain, and trigger
535  '''
536 
537  return addTile2DHistogramsArray(helper, algorithm, name = name,
538  title = title + ';' + etaTitle + ';' + phiTitle,
539  path = path, weight = weight, type = type,
540  xvalue = 'eta', yvalue = 'phi', value = value,
541  xbins = etabins, xmin = etamin, xmax = etamax,
542  ybins = phibins, ymin = phimin, ymax = phimax,
543  run = run, triggers = triggers, perGain = perGain,
544  perSample = perSample, separator = separator)
545 
546 
547 

◆ addTileModuleArray()

def TileMonitoringCfgHelper.addTileModuleArray (   helper,
  algorithm,
  name,
  title,
  path,
  type = 'TH1D',
  value = '',
  subDirectory = False,
  triggers = [],
  run = '',
  separator = '_' 
)
This function configures 1D histograms with Tile monitored value vs module per partition.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name    -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + trigger
    title   -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + title
    path    -- Path in file for histogram (relative to the path of given group)
    type    -- Type of histogram (TH1D, TProfile)
    value   -- Name of monitored value (needed for TProfile)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    run     -- Run number (given it will be put into the title)
    separator -- Given it will be used as separtor between name and trigger

Definition at line 604 of file TileMonitoringCfgHelper.py.

604 def addTileModuleArray(helper, algorithm, name, title, path,
605  type = 'TH1D', value = '', subDirectory = False,
606  triggers = [], run = '', separator = '_'):
607  '''
608  This function configures 1D histograms with Tile monitored value vs module per partition.
609 
610  Arguments:
611  helper -- Helper
612  algorithm -- Monitoring algorithm
613  name -- Name of histogram, actual name is constructed dynamicaly like:
614  name + partition + trigger
615  title -- Title of histogram, actual title is constructed dynamicaly like:
616  run + trigger + partion + title
617  path -- Path in file for histogram (relative to the path of given group)
618  type -- Type of histogram (TH1D, TProfile)
619  value -- Name of monitored value (needed for TProfile)
620  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
621  run -- Run number (given it will be put into the title)
622  separator -- Given it will be used as separtor between name and trigger
623  '''
624 
625  return addTile1DHistogramsArray(helper = helper, algorithm = algorithm, name = name, type = type,
626  xvalue = 'module', value = value, title = title, path = path,
627  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
628  run = run, triggers = triggers, subDirectory = subDirectory,
629  xlabels = ('modules'), perPartition = True, separator = separator )
630 
631 

◆ addTileModuleChannelMapsArray()

def TileMonitoringCfgHelper.addTileModuleChannelMapsArray (   helper,
  algorithm,
  name,
  title,
  path,
  weight = '',
  subDirectory = False,
  type = 'TH2D',
  value = '',
  run = '',
  triggers = [],
  perGain = False,
  separator = '_' 
)
This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partition.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + gain + trigger
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + gain + title
    path      -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type      -- Type of histogram (TH2D, TProfile2D)
    value     -- Name of monitored value (needed for TProfile2D)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    separator -- Given it will be used as separtor between name, gain, and trigger

Definition at line 382 of file TileMonitoringCfgHelper.py.

382 def addTileModuleChannelMapsArray(helper, algorithm, name, title, path, weight = '',
383  subDirectory = False, type = 'TH2D', value = '',
384  run = '', triggers = [], perGain = False, separator = '_'):
385  '''
386  This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partition.
387 
388  Arguments:
389  helper -- Helper
390  algorithm -- Monitoring algorithm
391  name -- Name of histogram, actual name is constructed dynamicaly like:
392  name + partition + gain + trigger
393  title -- Title of histogram, actual title is constructed dynamicaly like:
394  run + trigger + partion + gain + title
395  path -- Path in file for histogram (relative to the path of given group)
396  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
397  type -- Type of histogram (TH2D, TProfile2D)
398  value -- Name of monitored value (needed for TProfile2D)
399  run -- Run number (given it will be put into the title)
400  triggers -- Name of triggers (given it will be put into title and name of histogram)
401  perGain -- Configure histograms per gain (if True gain name will be put into the title)
402  separator -- Given it will be used as separtor between name, gain, and trigger
403  '''
404 
405  return addTile2DHistogramsArray(helper, algorithm, name = name, title = title, path = path, weight = weight,
406  xvalue = 'module', yvalue = 'channel', value = value, type = type,
407  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
408  ybins = Tile.MAX_CHAN, ymin = -0.5, ymax = Tile.MAX_CHAN - 0.5,
409  run = run, xlabels = ('modules'), ylabels = ('channels'),
410  triggers = triggers, subDirectory = subDirectory, perGain = perGain,
411  perPartition = True, separator = separator)
412 
413 

◆ addTileModuleCorrelionMapsArray()

def TileMonitoringCfgHelper.addTileModuleCorrelionMapsArray (   helper,
  algorithm,
  name,
  title,
  path,
  weight = '',
  subDirectory = False,
  type = 'TH2D',
  value = '',
  run = '',
  triggers = [],
  perGain = False,
  allPartitions = False,
  separator = '_' 
)
This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partition.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + gain + trigger
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + gain + title
    path      -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type      -- Type of histogram (TH2D, TProfile2D)
    value     -- Name of monitored value (needed for TProfile2D)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    allPartitions  -- Configure additional histogram with information from all partitions
    separator -- Given it will be used as separtor between name, gain, and trigger

Definition at line 414 of file TileMonitoringCfgHelper.py.

414 def addTileModuleCorrelionMapsArray(helper, algorithm, name, title, path, weight = '',
415  subDirectory = False, type = 'TH2D', value = '', run = '',
416  triggers = [], perGain = False, allPartitions = False, separator = '_'):
417  '''
418  This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partition.
419 
420  Arguments:
421  helper -- Helper
422  algorithm -- Monitoring algorithm
423  name -- Name of histogram, actual name is constructed dynamicaly like:
424  name + partition + gain + trigger
425  title -- Title of histogram, actual title is constructed dynamicaly like:
426  run + trigger + partion + gain + title
427  path -- Path in file for histogram (relative to the path of given group)
428  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
429  type -- Type of histogram (TH2D, TProfile2D)
430  value -- Name of monitored value (needed for TProfile2D)
431  run -- Run number (given it will be put into the title)
432  triggers -- Name of triggers (given it will be put into title and name of histogram)
433  perGain -- Configure histograms per gain (if True gain name will be put into the title)
434  allPartitions -- Configure additional histogram with information from all partitions
435  separator -- Given it will be used as separtor between name, gain, and trigger
436  '''
437 
438  return addTile2DHistogramsArray(helper, algorithm, name = name, title = title, path = path, weight = weight,
439  xvalue = 'firstModule', yvalue = 'secondModule', value = value,
440  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
441  ybins = Tile.MAX_DRAWER, ymin = -0.5, ymax = Tile.MAX_DRAWER - 0.5,
442  run = run, xlabels = ('modules'), ylabels = ('modules'), type = type,
443  triggers = triggers, subDirectory = subDirectory, perGain = perGain,
444  perPartition = True, allPartitions = allPartitions, separator = separator)
445 
446 
447 

◆ addTileModuleDigitizerMapsArray()

def TileMonitoringCfgHelper.addTileModuleDigitizerMapsArray (   helper,
  algorithm,
  name,
  title,
  path,
  weight = '',
  subDirectory = False,
  type = 'TH2D',
  value = '',
  run = '',
  triggers = [],
  perGain = False,
  separator = '_' 
)
This function configures 2D histograms (maps) with Tile monitored value vs module and digitizer per partition.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + gain + trigger
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + gain + title
    path      -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type      -- Type of histogram (TH2D, TProfile2D)
    value     -- Name of monitored value (needed for TProfile2D)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    separator -- Given it will be used as separtor between name, gain, and trigger

Definition at line 481 of file TileMonitoringCfgHelper.py.

481 def addTileModuleDigitizerMapsArray(helper, algorithm, name, title, path, weight = '',
482  subDirectory = False, type = 'TH2D', value = '',
483  run = '', triggers = [], perGain = False, separator = '_'):
484  '''
485  This function configures 2D histograms (maps) with Tile monitored value vs module and digitizer per partition.
486 
487  Arguments:
488  helper -- Helper
489  algorithm -- Monitoring algorithm
490  name -- Name of histogram, actual name is constructed dynamicaly like:
491  name + partition + gain + trigger
492  title -- Title of histogram, actual title is constructed dynamicaly like:
493  run + trigger + partion + gain + title
494  path -- Path in file for histogram (relative to the path of given group)
495  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
496  type -- Type of histogram (TH2D, TProfile2D)
497  value -- Name of monitored value (needed for TProfile2D)
498  run -- Run number (given it will be put into the title)
499  triggers -- Name of triggers (given it will be put into title and name of histogram)
500  perGain -- Configure histograms per gain (if True gain name will be put into the title)
501  separator -- Given it will be used as separtor between name, gain, and trigger
502  '''
503 
504  return addTile2DHistogramsArray(helper, algorithm, name = name, title = title + ';;Digitizer', path = path,
505  weight = weight, xvalue = 'module', yvalue = 'digitizer', value = value,
506  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
507  ybins = 8, ymin = 0.5, ymax = 8.5, run = run, xlabels = ('modules'),
508  ylabels = (), triggers = triggers, type = type,subDirectory = subDirectory,
509  perGain = perGain, perPartition = True, separator = separator)
510 
511 
512 

◆ addTileModulePartitionMapsArray()

def TileMonitoringCfgHelper.addTileModulePartitionMapsArray (   helper,
  algorithm,
  name,
  title,
  path,
  weight = '',
  type = 'TH2D',
  value = '',
  run = '',
  triggers = [],
  perGain = False,
  separator = '_' 
)
This function configures 2D histograms (maps) with Tile monitored value vs module and partition.

Arguments:
    helper    -- Helper
    algorithm -- Monitoring algorithm
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name + partition + gain + trigger
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    run + trigger + partion + gain + title
    path      -- Path in file for histogram (relative to the path of given group)
    type      -- Type of histogram (TH2D, TProfile2D)
    value     -- Name of monitored value (needed for TProfile2D)
    run       -- Run number (given it will be put into the title)
    triggers  -- Name of triggers (given it will be put into title and name of histogram)
    perGain   -- Configure histograms per gain (if True gain name will be put into the title)
    separator -- Given it will be used as separtor between name, gain, and trigger

Definition at line 448 of file TileMonitoringCfgHelper.py.

448 def addTileModulePartitionMapsArray(helper, algorithm, name, title, path, weight = '',
449  type = 'TH2D', value = '', run = '', triggers = [],
450  perGain = False, separator = '_'):
451  '''
452  This function configures 2D histograms (maps) with Tile monitored value vs module and partition.
453 
454  Arguments:
455  helper -- Helper
456  algorithm -- Monitoring algorithm
457  name -- Name of histogram, actual name is constructed dynamicaly like:
458  name + partition + gain + trigger
459  title -- Title of histogram, actual title is constructed dynamicaly like:
460  run + trigger + partion + gain + title
461  path -- Path in file for histogram (relative to the path of given group)
462  type -- Type of histogram (TH2D, TProfile2D)
463  value -- Name of monitored value (needed for TProfile2D)
464  run -- Run number (given it will be put into the title)
465  triggers -- Name of triggers (given it will be put into title and name of histogram)
466  perGain -- Configure histograms per gain (if True gain name will be put into the title)
467  separator -- Given it will be used as separtor between name, gain, and trigger
468  '''
469 
470  return addTile2DHistogramsArray(helper, algorithm, name = name, title = title + ';Module;Partition',
471  path = path, weight = weight, run = run, type = type,
472  xvalue = 'module', yvalue = 'partition', value = value,
473  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
474  ybins = Tile.MAX_ROS - 1, ymin = -0.5, ymax = Tile.MAX_ROS - 1.5,
475  xlabels = [str(module) for module in range(1, Tile.MAX_DRAWER + 1)],
476  ylabels = [getPartitionName(ros) for ros in range(1, Tile.MAX_ROS)],
477  triggers = triggers, perGain = perGain, separator = separator)
478 
479 
480 

◆ addTileTMDB2DScatterHistogramsArray()

def TileMonitoringCfgHelper.addTileTMDB2DScatterHistogramsArray (   helper,
  algorithm,
  name = '',
  xvalue = '',
  yvalue = '',
  xbins = 0,
  xmin = 0,
  xmax = 0,
  title = '',
  path = '',
  type = 'TH2D',
  run = '' 
)

Definition at line 632 of file TileMonitoringCfgHelper.py.

632 def addTileTMDB2DScatterHistogramsArray(helper, algorithm, name = '', xvalue = '', yvalue = '',
633  xbins = 0, xmin = 0, xmax = 0,
634  title = '', path = '', type = 'TH2D', run = ''):
635  for ros in range(1, Tile.MAX_ROS):
636  partition = getPartitionName(ros)
637  baseName = "{}_{}".format(name, partition)
638  nChannels = len(_cellNameTMDB_LB) if partition.startswith('L') else len(_cellNameTMDB_EB)
639 
640  dimensions = [int(Tile.MAX_DRAWER), nChannels, nChannels]
641  array = helper.addArray(dimensions, algorithm, baseName, topPath = path)
642  for postfix, tool in array.Tools.items():
643  elements = postfix.split('_')
644 
645  channel1 = int(elements.pop())
646  channel2 = int(elements.pop())
647  cell1 = getCellNameTMDB(partition, channel1)
648  cell2 = getCellNameTMDB(partition, channel2)
649 
650  module = '{}'.format(int(elements.pop()) + 1).rjust(2,'0')
651 
652  fullName = '{},{};{}{}_{}_{}'.format(xvalue, yvalue,
653  baseName, module, cell1, cell2)
654  hist_path = partition + module
655 
656  moduleOrPartition = 'Module ' + partition + module + partition
657  fullTitle = 'Run {} {} TMDB {}x{}: {};{};{}'.format(run, moduleOrPartition, cell1, cell2, title, cell1, cell2)
658 
659  tool.defineHistogram(fullName, path = hist_path, type = type, title = fullTitle,
660  xbins = xbins, xmin = xmin, xmax = xmax,
661  ybins = xbins, ymin = xmin, ymax = xmax)
662 
663 

◆ addTileTMDB_1DHistogramsArray()

def TileMonitoringCfgHelper.addTileTMDB_1DHistogramsArray (   helper,
  algorithm,
  name = '',
  xvalue = '',
  value = '',
  title = '',
  path = '',
  xbins = 0,
  xmin = 0.,
  xmax = 0.,
  type = 'TH1D',
  run = '',
  perModule = False,
  isCorr = False 
)

Definition at line 685 of file TileMonitoringCfgHelper.py.

685 def addTileTMDB_1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = '', title = '',
686  path = '', xbins = 0, xmin = 0., xmax = 0., type = 'TH1D', run = '',
687  perModule = False, isCorr=False):
688 
689  for ros in range(1, Tile.MAX_ROS):
690  partition = getPartitionName(ros)
691  baseName = "{}_{}".format(name, partition)
692  nChannels = len(_cellNameTMDB_LB) if partition.startswith('L') else len(_cellNameTMDB_EB)
693  if not isCorr:
694  dimensions = [int(Tile.MAX_DRAWER), nChannels] if perModule else [nChannels]
695  else:
696  dimensions = [int(Tile.MAX_DRAWER), nChannels, nChannels]
697 
698  array = helper.addArray(dimensions, algorithm, baseName, topPath = path)
699  for postfix, tool in array.Tools.items():
700  elements = postfix.split('_')
701  if not isCorr:
702  channel = int(elements.pop())
703  cell = getCellNameTMDB(partition, channel)
704  module = '{}'.format(int(elements.pop()) + 1).rjust(2,'0') if perModule else ''
705 
706  fullName = '{}{};{}{}_{}'.format(xvalue, (',' + value if 'Profile' in type else ''),
707  baseName, (module if perModule else ''), cell)
708 
709  moduleOrPartition = 'Module ' + partition + module if perModule else 'Partition ' + partition
710  fullTitle = 'Run {} {} TMDB {}: {}'.format(run, moduleOrPartition, cell, title)
711  else:
712  channel1 = int(elements.pop())
713  channel2 = int(elements.pop())
714  cell1 = getCellNameTMDB(partition, channel1)
715  cell2 = getCellNameTMDB(partition, channel2)
716 
717  module = '{}'.format(int(elements.pop()) + 1).rjust(2,'0') if perModule else ''
718 
719  fullName = '{}{};{}{}_{}_{}'.format(xvalue, (',' + value if 'Profile' in type else ''),
720  baseName, (module if perModule else ''), cell1, cell2)
721 
722  moduleOrPartition = 'Module ' + partition + module if perModule else 'Partition ' + partition
723  fullTitle = 'Run {} {} TMDB {}x{}: {}'.format(run, moduleOrPartition, cell1, cell2, title)
724 
725  tool.defineHistogram(fullName, path = '', type = type, title = fullTitle,
726  xbins = xbins, xmin = xmin, xmax = xmax)
727 
728 

◆ addTileTMDB_2DHistogramsArray()

def TileMonitoringCfgHelper.addTileTMDB_2DHistogramsArray (   helper,
  algorithm,
  name = '',
  value = '',
  title = '',
  path = '',
  type = 'TH2D',
  run = '' 
)

Definition at line 664 of file TileMonitoringCfgHelper.py.

664 def addTileTMDB_2DHistogramsArray(helper, algorithm, name = '', value = '',
665  title = '', path = '', type = 'TH2D', run = ''):
666  array = helper.addArray([int(Tile.MAX_ROS - 1)], algorithm, name, topPath = path)
667  for postfix, tool in array.Tools.items():
668  ros = int(postfix.split('_').pop()) + 1
669 
670  partition = getPartitionName(ros)
671  nxlabels = getModuleLabels(partition)
672  nylabels = getCellChannelTMDB_Labels(partition)
673  ybins = len(nylabels)
674 
675  fullName = 'module,channel' + (',' + value if 'Profile' in type else '') + ';'
676  fullName += getTileHistogramName(name, partition = partition)
677 
678  fullTitle = getTileHistogramTitle(title, run = run, partition = partition)
679 
680  tool.defineHistogram( fullName, path = '', type = type, title = fullTitle,
681  xlabels = nxlabels, ylabels = nylabels,
682  xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5,
683  ybins = ybins, ymin = -0.5, ymax = ybins - 0.5)
684 

◆ addValueVsModuleAndChannelMaps()

def TileMonitoringCfgHelper.addValueVsModuleAndChannelMaps (   group,
  name,
  title,
  path,
  subDirectory = False,
  type = 'TH2D',
  value = '',
  trigger = '',
  run = '' 
)
This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partion.

Arguments:
    group   -- Group (technically, a GenericMonitoringTool instance)
    name    -- Name of histogram (actual name is constructed dynamicaly like: name + partition + trigger)
    title   -- Title of histogram (actual title is constructed dynamicaly like: run + trigger + partion + title)
    path    -- Path in file for histogram (relative to the path of given group)
    subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
    type    -- Type of histogram (TH2D, TProfile2D)
    value   -- Name of monitored value (needed for TProfile2D)
    trigger -- Name of trigger (given it will be put into title and name of histogram)
    run     -- Run number (given it will be put into the title)

Definition at line 233 of file TileMonitoringCfgHelper.py.

233 def addValueVsModuleAndChannelMaps(group, name, title, path, subDirectory = False, type = 'TH2D', value = '', trigger = '', run = ''):
234  '''
235  This function configures 2D histograms (maps) with Tile monitored value vs module and channel per partion.
236 
237  Arguments:
238  group -- Group (technically, a GenericMonitoringTool instance)
239  name -- Name of histogram (actual name is constructed dynamicaly like: name + partition + trigger)
240  title -- Title of histogram (actual title is constructed dynamicaly like: run + trigger + partion + title)
241  path -- Path in file for histogram (relative to the path of given group)
242  subDirectory -- Put the configured histograms into sub directory named like partion (True, False)
243  type -- Type of histogram (TH2D, TProfile2D)
244  value -- Name of monitored value (needed for TProfile2D)
245  trigger -- Name of trigger (given it will be put into title and name of histogram)
246  run -- Run number (given it will be put into the title)
247  '''
248 
249  for ros in range(1, Tile.MAX_ROS):
250  partition = getPartitionName(ros)
251  xlabels = []
252  ylabels = []
253  for module in range(1, Tile.MAX_DRAWER + 1): # modules start from 1
254  label = partition + '0' + str(module) if module < 10 else partition + str(module)
255  xlabels.append(label)
256 
257  for channel in range(0, Tile.MAX_CHAN):
258  cellName = getCellName(partition, channel)
259  label = cellName + '_' + 'ch' + str(channel) if cellName else 'ch' + str(channel)
260  ylabels.append(label)
261 
262  fullName = 'module' + partition + ',channel' + partition
263  if 'Profile' in type:
264  fullName += (',' + value + partition)
265  fullName += ';' + name + partition + trigger
266 
267  fullPath = path + '/' + partition if subDirectory else path
268 
269  fullTitle = 'Partition ' + partition + ': ' + title
270  if trigger:
271  fullTitle = 'Trigger ' + trigger + ' ' + fullTitle
272  if run:
273  fullTitle = 'Run ' + run + ' ' + fullTitle
274 
275  group.defineHistogram( fullName, path = fullPath, type = type, title = fullTitle,
276  xbins = 64, xmin = 0.5, xmax = 64.5, ybins = 48, ymin = -0.5, ymax = 47.5,
277  xlabels = xlabels, ylabels = ylabels )
278 
279 

◆ getCellChannelLabels()

def TileMonitoringCfgHelper.getCellChannelLabels (   partition)
This function returns list of Tile cell names with channes for given partition.

Arguments:
    partition -- Tile partition name (LBA, LBC, EBA, EBC)

Definition at line 169 of file TileMonitoringCfgHelper.py.

169 def getCellChannelLabels(partition):
170  '''
171  This function returns list of Tile cell names with channes for given partition.
172 
173  Arguments:
174  partition -- Tile partition name (LBA, LBC, EBA, EBC)
175  '''
176 
177  labels = []
178  for channel in range(0, Tile.MAX_CHAN):
179  cellName = getCellName(partition, channel)
180  label = cellName + '_' + 'ch' + str(channel) if cellName else 'ch' + str(channel)
181  labels.append(label)
182  return labels
183 
184 

◆ getCellChannelTMDB_Labels()

def TileMonitoringCfgHelper.getCellChannelTMDB_Labels (   partition)

Definition at line 209 of file TileMonitoringCfgHelper.py.

209 def getCellChannelTMDB_Labels(partition):
210  return _cellNameTMDB_LB if partition.startswith('L') else _cellNameTMDB_EB
211 
212 

◆ getCellName()

def TileMonitoringCfgHelper.getCellName (   partition,
  channel 
)
This function returns name of Tile cell for given partition and channel.

Arguments:
    partition -- Tile partition name (LBA, LBC, EBA, EBC)
    channel   -- Tile channel number ([0..47])

Definition at line 29 of file TileMonitoringCfgHelper.py.

29 def getCellName(partition, channel):
30  '''
31  This function returns name of Tile cell for given partition and channel.
32 
33  Arguments:
34  partition -- Tile partition name (LBA, LBC, EBA, EBC)
35  channel -- Tile channel number ([0..47])
36  '''
37  return _cellNameLB[channel] if partition.startswith('L') else _cellNameEB[channel]
38 
39 

◆ getCellNameTMDB()

def TileMonitoringCfgHelper.getCellNameTMDB (   partition,
  channel 
)

Definition at line 206 of file TileMonitoringCfgHelper.py.

206 def getCellNameTMDB(partition, channel):
207  return _cellNameTMDB_LB[channel] if partition.startswith('L') else _cellNameTMDB_EB[channel]
208 

◆ getChannelsForCell()

def TileMonitoringCfgHelper.getChannelsForCell (   partition,
  cellName 
)
This function returns channel numbers of Tile cell for given partition and cell.

Arguments:
    partition -- Tile partition name (LBA, LBC, EBA, EBC)
    cellName  -- Tile cell name (A1, B1, ...)

Definition at line 40 of file TileMonitoringCfgHelper.py.

40 def getChannelsForCell(partition, cellName):
41  '''
42  This function returns channel numbers of Tile cell for given partition and cell.
43 
44  Arguments:
45  partition -- Tile partition name (LBA, LBC, EBA, EBC)
46  cellName -- Tile cell name (A1, B1, ...)
47  '''
48  cellNames = _cellNameLB if partition.startswith('L') else _cellNameEB
49  return [channel for channel, cell in enumerate(cellNames) if cell == cellName]
50 
51 

◆ getGainName()

def TileMonitoringCfgHelper.getGainName (   gain)
This function returns name of Tile gain name

Arguments:
    gain -- Tile gain ([0,1])

Definition at line 62 of file TileMonitoringCfgHelper.py.

62 def getGainName(gain):
63  '''
64  This function returns name of Tile gain name
65 
66  Arguments:
67  gain -- Tile gain ([0,1])
68  '''
69  return _gainName[int(gain)]
70 
71 

◆ getLabels()

def TileMonitoringCfgHelper.getLabels (   labels,
  partition = '' 
)
This function returns list of labels for Tile histograms.

This function returns list of Tile module or channel names for given partition
in the case of input labels is modules or channels. Otherwise it returns given labels.

Arguments:
    labels    --  List of labels, "modules" and "channels" have special meaning,
                  in this case corresponding labels will be generated dynamicaly
    partition -- Tile partition name (LBA, LBC, EBA, EBC)

Definition at line 185 of file TileMonitoringCfgHelper.py.

185 def getLabels(labels, partition = ''):
186  '''
187  This function returns list of labels for Tile histograms.
188 
189  This function returns list of Tile module or channel names for given partition
190  in the case of input labels is modules or channels. Otherwise it returns given labels.
191 
192  Arguments:
193  labels -- List of labels, "modules" and "channels" have special meaning,
194  in this case corresponding labels will be generated dynamicaly
195  partition -- Tile partition name (LBA, LBC, EBA, EBC)
196  '''
197 
198  if 'modules' in labels:
199  labels = getModuleLabels(partition)
200  elif 'channels' in labels:
201  labels = getCellChannelLabels(partition)
202 
203  return labels
204 
205 

◆ getLegacyChannelForDemonstrator()

def TileMonitoringCfgHelper.getLegacyChannelForDemonstrator (   useDemoCabling,
  partition,
  drawer,
  channel 
)
Function to get legacy channel number from Tile Demonatrator 

Definition at line 213 of file TileMonitoringCfgHelper.py.

213 def getLegacyChannelForDemonstrator(useDemoCabling, partition, drawer, channel):
214  ''' Function to get legacy channel number from Tile Demonatrator '''
215 
216  legacyChannel = channel
217  if (useDemoCabling == 2015 and partition == 'EBC' and drawer == 1):
218  demo2legacy = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
219  26, 25, 24, 29, 31, 32, 27, 28, 30, 35, 34, 33, 38, 37, 43, 44, 41, 40, 39, 36, 42, 47, 46, 45]
220  legacyChannel = demo2legacy[channel]
221  elif useDemoCabling >= 2016 and useDemoCabling <= 2019 and partition == 'LBC' and (drawer == 1 or drawer > 2):
222  demo2legacy = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
223  26, 25, 24, 29, 28, 27, 32, 31, 30, 35, 34, 33, 38, 37, 36, 41, 40, 39, 44, 43, 42, 47, 46, 45]
224  legacyChannel = demo2legacy[channel]
225  elif useDemoCabling >= 2018 and partition == 'EBC' and drawer >= 2:
226  demo2legacyEB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
227  31, 32, 30, 35, 33, 34, 38, 37, 41, 40, 39, 36, 26, 25, 24, 29, 28, 27, 44, 43, 42, 47, 46, 45]
228  legacyChannel = demo2legacyEB[channel]
229 
230  return legacyChannel
231 
232 

◆ getModuleLabels()

def TileMonitoringCfgHelper.getModuleLabels (   partition)
This function returns list of Tile module names for given partition.

Arguments:
    partition -- Tile partition name (LBA, LBC, EBA, EBC)

Definition at line 152 of file TileMonitoringCfgHelper.py.

152 def getModuleLabels(partition):
153  '''
154  This function returns list of Tile module names for given partition.
155 
156  Arguments:
157  partition -- Tile partition name (LBA, LBC, EBA, EBC)
158  '''
159 
160  if partition == 'AllPart':
161  labels = [str(module) for module in range(1, Tile.MAX_DRAWER + 1)]
162  else:
163  ros = {'LBA' : 1, 'LBC' : 2, 'EBA' : 3, 'EBC' : 4}
164  labels = [Tile.getDrawerString(ros[partition], module) for module in range(0, Tile.MAX_DRAWER)]
165 
166  return labels
167 
168 

◆ getPartitionName()

def TileMonitoringCfgHelper.getPartitionName (   ros)
This function returns name of Tile partition for given ROS.

Arguments:
    ros -- Tile ROS ([0..5])

Definition at line 52 of file TileMonitoringCfgHelper.py.

52 def getPartitionName(ros):
53  '''
54  This function returns name of Tile partition for given ROS.
55 
56  Arguments:
57  ros -- Tile ROS ([0..5])
58  '''
59  return _partitionName[ros]
60 
61 

◆ getSampleName()

def TileMonitoringCfgHelper.getSampleName (   sample)
This function returns name of Tile sample name

Arguments:
    sample -- Tile sample ([0..4])

Definition at line 72 of file TileMonitoringCfgHelper.py.

72 def getSampleName(sample):
73  '''
74  This function returns name of Tile sample name
75 
76  Arguments:
77  sample -- Tile sample ([0..4])
78  '''
79  return _sampleName[int(sample)]
80 
81 

◆ getTileHistogramName()

def TileMonitoringCfgHelper.getTileHistogramName (   name,
  separator = '_',
**  kwargs 
)
This function returns name of Tile histogram.

Arguments:
    name      -- Name of histogram, actual name is constructed dynamicaly like:
                    name [+ partition] [+ sample] [+gain] [+ trigger]
    separator -- Separtor between name, partition, sample, gain, and trigger

Definition at line 82 of file TileMonitoringCfgHelper.py.

82 def getTileHistogramName(name, separator = '_', **kwargs):
83  '''
84  This function returns name of Tile histogram.
85 
86  Arguments:
87  name -- Name of histogram, actual name is constructed dynamicaly like:
88  name [+ partition] [+ sample] [+gain] [+ trigger]
89  separator -- Separtor between name, partition, sample, gain, and trigger
90  '''
91 
92  partition = kwargs.get('partition', '')
93  trigger = kwargs.get('trigger', '')
94  sample = kwargs.get('sample', '')
95  gain = kwargs.get('gain', '')
96 
97  fullName = name
98  fullName += separator + partition if partition else ''
99  fullName += separator + sample if sample else ''
100  fullName += separator + gain if gain else ''
101  fullName += separator + trigger if trigger else ''
102 
103  return fullName
104 
105 

◆ getTileHistogramPath()

def TileMonitoringCfgHelper.getTileHistogramPath (   path,
**  kwargs 
)
This function returns path of Tile histogram.

Arguments:
    path -- Path of histogram, actual path is constructed dynamicaly like:
                path [+ trigger] [+ partition]

Definition at line 132 of file TileMonitoringCfgHelper.py.

132 def getTileHistogramPath(path, **kwargs):
133  '''
134  This function returns path of Tile histogram.
135 
136  Arguments:
137  path -- Path of histogram, actual path is constructed dynamicaly like:
138  path [+ trigger] [+ partition]
139  '''
140 
141  partition = kwargs.get('partition', '')
142  trigger = kwargs.get('trigger', '')
143  subDirectory = kwargs.get('subDirectory', False)
144 
145  fullPath = path + '/' + trigger if trigger else path
146  fullPath += '/' + partition if partition and subDirectory else ''
147 
148  return fullPath
149 
150 
151 

◆ getTileHistogramTitle()

def TileMonitoringCfgHelper.getTileHistogramTitle (   title,
**  kwargs 
)
This function returns title of Tile histogram.

Arguments:
    title     -- Title of histogram, actual title is constructed dynamicaly like:
                    [run +] [trigger +] [partion +] [sample +] [gain +] title

Definition at line 106 of file TileMonitoringCfgHelper.py.

106 def getTileHistogramTitle(title, **kwargs):
107  '''
108  This function returns title of Tile histogram.
109 
110  Arguments:
111  title -- Title of histogram, actual title is constructed dynamicaly like:
112  [run +] [trigger +] [partion +] [sample +] [gain +] title
113  '''
114 
115  partition = kwargs.get('partition', '')
116  trigger = kwargs.get('trigger', '')
117  sample = kwargs.get('sample', '')
118  gain = kwargs.get('gain', '')
119  run = kwargs.get('run', '')
120 
121  fullTitle = 'Partition ' + partition if partition else ''
122  fullTitle += ' Tile Cell ' + sample + ' ' if sample else ''
123  fullTitle += ' ' + gain if gain else ''
124  fullTitle += ': ' + title
125 
126  fullTitle = 'Trigger ' + trigger + ' ' + fullTitle if trigger else fullTitle
127  fullTitle = 'Run ' + run + ' ' + fullTitle if run else fullTitle
128 
129  return fullTitle
130 
131 

Variable Documentation

◆ _cellNameEB

TileMonitoringCfgHelper._cellNameEB
private

Definition at line 10 of file TileMonitoringCfgHelper.py.

◆ _cellNameLB

TileMonitoringCfgHelper._cellNameLB
private

Definition at line 16 of file TileMonitoringCfgHelper.py.

◆ _cellNameTMDB_EB

TileMonitoringCfgHelper._cellNameTMDB_EB
private

Definition at line 27 of file TileMonitoringCfgHelper.py.

◆ _cellNameTMDB_LB

TileMonitoringCfgHelper._cellNameTMDB_LB
private

Definition at line 26 of file TileMonitoringCfgHelper.py.

◆ _gainName

TileMonitoringCfgHelper._gainName
private

Definition at line 23 of file TileMonitoringCfgHelper.py.

◆ _partitionName

TileMonitoringCfgHelper._partitionName
private

Definition at line 22 of file TileMonitoringCfgHelper.py.

◆ _sampleName

TileMonitoringCfgHelper._sampleName
private

Definition at line 24 of file TileMonitoringCfgHelper.py.

TileMonitoringCfgHelper.addValueVsModuleAndChannelMaps
def addValueVsModuleAndChannelMaps(group, name, title, path, subDirectory=False, type='TH2D', value='', trigger='', run='')
Definition: TileMonitoringCfgHelper.py:233
TileMonitoringCfgHelper.addTileModuleChannelMapsArray
def addTileModuleChannelMapsArray(helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
Definition: TileMonitoringCfgHelper.py:382
vtune_athena.format
format
Definition: vtune_athena.py:14
TileMonitoringCfgHelper.getCellChannelLabels
def getCellChannelLabels(partition)
Definition: TileMonitoringCfgHelper.py:169
TileMonitoringCfgHelper.addTileModuleDigitizerMapsArray
def addTileModuleDigitizerMapsArray(helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
Definition: TileMonitoringCfgHelper.py:481
TileMonitoringCfgHelper.addTile2DHistogramsArray
def addTile2DHistogramsArray(helper, algorithm, name='', xvalue='', yvalue='', value='', title='', path='', weight='', xbins=0, xmin=0., xmax=0., ybins=0, ymin=0., ymax=0., type='TH2D', run='', triggers=[], xlabels=(), ylabels=(), opt='', subDirectory=False, perPartition=False, perSample=False, perGain=False, allPartitions=False, separator='_', merge=None)
Definition: TileMonitoringCfgHelper.py:312
TileMonitoringCfgHelper.getSampleName
def getSampleName(sample)
Definition: TileMonitoringCfgHelper.py:72
TileMonitoringCfgHelper._getDimensions
def _getDimensions(triggers=[], perPartition=False, perSample=False, perGain=False, allPartitions=False)
Definition: TileMonitoringCfgHelper.py:280
TileMonitoringCfgHelper.getLegacyChannelForDemonstrator
def getLegacyChannelForDemonstrator(useDemoCabling, partition, drawer, channel)
Definition: TileMonitoringCfgHelper.py:213
TileMonitoringCfgHelper.getTileHistogramPath
def getTileHistogramPath(path, **kwargs)
Definition: TileMonitoringCfgHelper.py:132
TileMonitoringCfgHelper._parsePostfix
def _parsePostfix(postfix, triggers=[], perPartition=False, perSample=False, perGain=False)
Definition: TileMonitoringCfgHelper.py:295
TileMonitoringCfgHelper.getTileHistogramName
def getTileHistogramName(name, separator='_', **kwargs)
Definition: TileMonitoringCfgHelper.py:82
TileMonitoringCfgHelper.addTile1DHistogramsArray
def addTile1DHistogramsArray(helper, algorithm, name='', xvalue='', value='', title='', path='', weight='', xbins=0, xmin=0., xmax=0., type='TH1D', run='', triggers=[], subDirectory=False, perPartition=True, perSample=False, opt='', perGain=False, xlabels=(), allPartitions=False, separator='_', merge=None)
Definition: TileMonitoringCfgHelper.py:548
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TileMonitoringCfgHelper.addTileEtaPhiMapsArray
def addTileEtaPhiMapsArray(helper, algorithm, name, title, path, weight='', type='TH2D', value='', run='', triggers=[], perSample=True, perGain=False, separator='_', etaTitle='#eta', etabins=21, etamin=-2.025, etamax=2.025, phiTitle='#phi', phibins=Tile.MAX_DRAWER, phimin=-3.15, phimax=3.15)
Definition: TileMonitoringCfgHelper.py:513
TileMonitoringCfgHelper.addTileModuleCorrelionMapsArray
def addTileModuleCorrelionMapsArray(helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, allPartitions=False, separator='_')
Definition: TileMonitoringCfgHelper.py:414
TileMonitoringCfgHelper.getPartitionName
def getPartitionName(ros)
Definition: TileMonitoringCfgHelper.py:52
TileMonitoringCfgHelper.getTileHistogramTitle
def getTileHistogramTitle(title, **kwargs)
Definition: TileMonitoringCfgHelper.py:106
TileMonitoringCfgHelper.getModuleLabels
def getModuleLabels(partition)
Definition: TileMonitoringCfgHelper.py:152
TileMonitoringCfgHelper.addTileTMDB_1DHistogramsArray
def addTileTMDB_1DHistogramsArray(helper, algorithm, name='', xvalue='', value='', title='', path='', xbins=0, xmin=0., xmax=0., type='TH1D', run='', perModule=False, isCorr=False)
Definition: TileMonitoringCfgHelper.py:685
TileMonitoringCfgHelper.getChannelsForCell
def getChannelsForCell(partition, cellName)
Definition: TileMonitoringCfgHelper.py:40
TileMonitoringCfgHelper.addTileTMDB2DScatterHistogramsArray
def addTileTMDB2DScatterHistogramsArray(helper, algorithm, name='', xvalue='', yvalue='', xbins=0, xmin=0, xmax=0, title='', path='', type='TH2D', run='')
Definition: TileMonitoringCfgHelper.py:632
TileMonitoringCfgHelper.getCellChannelTMDB_Labels
def getCellChannelTMDB_Labels(partition)
Definition: TileMonitoringCfgHelper.py:209
TileMonitoringCfgHelper.addTileChannelHistogramsArray
def addTileChannelHistogramsArray(helper, algorithm, name, title, path, xvalue, xbins, xmin, xmax, type='TH1D', yvalue=None, ybins=None, ymin=None, ymax=None, run='', value='', aliasSuffix='')
Definition: TileMonitoringCfgHelper.py:729
TileMonitoringCfgHelper.getGainName
def getGainName(gain)
Definition: TileMonitoringCfgHelper.py:62
TileMonitoringCfgHelper.getCellName
def getCellName(partition, channel)
Definition: TileMonitoringCfgHelper.py:29
TileMonitoringCfgHelper.addTileModulePartitionMapsArray
def addTileModulePartitionMapsArray(helper, algorithm, name, title, path, weight='', type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
Definition: TileMonitoringCfgHelper.py:448
str
Definition: BTagTrackIpAccessor.cxx:11
TileMonitoringCfgHelper.addTileTMDB_2DHistogramsArray
def addTileTMDB_2DHistogramsArray(helper, algorithm, name='', value='', title='', path='', type='TH2D', run='')
Definition: TileMonitoringCfgHelper.py:664
TileMonitoringCfgHelper.getCellNameTMDB
def getCellNameTMDB(partition, channel)
Definition: TileMonitoringCfgHelper.py:206
TileMonitoringCfgHelper.getLabels
def getLabels(labels, partition='')
Definition: TileMonitoringCfgHelper.py:185
TileMonitoringCfgHelper.addTileModuleArray
def addTileModuleArray(helper, algorithm, name, title, path, type='TH1D', value='', subDirectory=False, triggers=[], run='', separator='_')
Definition: TileMonitoringCfgHelper.py:604