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

Functions

 getCellName (partition, channel)
 getChannelsForCell (partition, cellName)
 getPartitionName (ros)
 getGainName (gain)
 getSampleName (sample)
 getTileHistogramName (name, separator='_', **kwargs)
 getTileHistogramTitle (title, **kwargs)
 getTileHistogramPath (path, **kwargs)
 getModuleLabels (partition)
 getCellChannelLabels (partition)
 getLabels (labels, partition='')
 getCellNameTMDB (partition, channel)
 getCellChannelTMDB_Labels (partition)
 getLegacyChannelForDemonstrator (useDemoCabling, partition, drawer, channel)
 addValueVsModuleAndChannelMaps (group, name, title, path, subDirectory=False, type='TH2D', value='', trigger='', run='')
 _getDimensions (triggers=[], perPartition=False, perSample=False, perGain=False, allPartitions=False)
 _parsePostfix (postfix, triggers=[], perPartition=False, perSample=False, perGain=False)
 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)
 addTileModuleChannelMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 addTileModuleCorrelionMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, allPartitions=False, separator='_')
 addTileModulePartitionMapsArray (helper, algorithm, name, title, path, weight='', type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 addTileModuleDigitizerMapsArray (helper, algorithm, name, title, path, weight='', subDirectory=False, type='TH2D', value='', run='', triggers=[], perGain=False, separator='_')
 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)
 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)
 addTileModuleArray (helper, algorithm, name, title, path, type='TH1D', value='', subDirectory=False, triggers=[], run='', separator='_')
 addTileTMDB2DScatterHistogramsArray (helper, algorithm, name='', xvalue='', yvalue='', xbins=0, xmin=0, xmax=0, title='', path='', type='TH2D', run='')
 addTileTMDB_2DHistogramsArray (helper, algorithm, name='', value='', title='', path='', type='TH2D', run='')
 addTileTMDB_1DHistogramsArray (helper, algorithm, name='', xvalue='', value='', title='', path='', xbins=0, xmin=0., xmax=0., type='TH1D', run='', perModule=False, isCorr=False)
 addTileChannelHistogramsArray (helper, algorithm, name, title, path, xvalue, xbins, xmin, xmax, type='TH1D', yvalue=None, ybins=None, ymin=None, ymax=None, run='', value='', aliasSuffix='')

Variables

list _cellNameEB
list _cellNameLB
dict _partitionName = {0: 'AUX', 1 : 'LBA', 2 : 'LBC', 3 : 'EBA', 4 : 'EBC', 5 : 'AllPart'}
dict _gainName = {0 : 'LG', 1 : 'HG'}
dict _sampleName = {0 : 'SampA', 1 : 'SampB', 2 : 'SampD', 3 : 'SampE', 4 : 'AllSamp'}
list _cellNameTMDB_LB = ["D0", "D1L", "D1R", "D2R", "D2L", "D3L", "D3R", ""]
list _cellNameTMDB_EB = ["D5L", "D5R", "D6L", "D6R"]

Detailed Description

@file TileMonitoringHelper.py
@brief Helper functions for Run 3 Tile monitoring algorithm configuration

Function Documentation

◆ _getDimensions()

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

Definition at line 280 of file TileMonitoringCfgHelper.py.

280def _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()

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

Definition at line 295 of file TileMonitoringCfgHelper.py.

295def _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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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.

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()

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

Definition at line 664 of file TileMonitoringCfgHelper.py.

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()

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.

233def 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()

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.

169def 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()

TileMonitoringCfgHelper.getCellChannelTMDB_Labels ( partition)

Definition at line 209 of file TileMonitoringCfgHelper.py.

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

◆ getCellName()

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.

29def 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()

TileMonitoringCfgHelper.getCellNameTMDB ( partition,
channel )

Definition at line 206 of file TileMonitoringCfgHelper.py.

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

◆ getChannelsForCell()

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.

40def 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()

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.

62def 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()

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.

185def 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()

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

Definition at line 213 of file TileMonitoringCfgHelper.py.

213def 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()

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.

152def 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()

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.

52def 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()

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.

72def 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()

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.

82def 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()

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.

132def 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()

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.

106def 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

list TileMonitoringCfgHelper._cellNameEB
protected
Initial value:
1= ['E3', 'E4', 'D4', 'D4', 'C10', 'C10', 'A12', 'A12', 'B11', 'B11', 'A13', 'A13',
2 'E1', 'E2', 'B12', 'B12', 'D5', 'D5', 'E3*', 'E4*', 'A14', 'A14', 'B13', 'B13',
3 '', '', '', '', '', '', 'B14', 'A15', 'A15', '', '', 'B14',
4 'B15', 'D6', 'D6', 'B15', 'A16', 'A16', '', '', '', '', '', '']

Definition at line 10 of file TileMonitoringCfgHelper.py.

◆ _cellNameLB

list TileMonitoringCfgHelper._cellNameLB
protected
Initial value:
1= ['D0', 'A1', 'B1', 'B1', 'A1', 'A2', 'B2', 'B2', 'A2', 'A3', 'A3', 'B3',
2 'B3', 'D1', 'D1', 'A4', 'B4', 'B4', 'A4', 'A5', 'A5', 'B5', 'B5', 'A6',
3 'D2', 'D2', 'A6', 'B6', 'B6', 'A7', '', '', 'A7', 'B7', 'B7', 'A8',
4 'A9', 'A9', 'A8', 'B8', 'B8', 'D3', 'B9', '', 'D3', 'A10', 'A10', 'B9']

Definition at line 16 of file TileMonitoringCfgHelper.py.

◆ _cellNameTMDB_EB

list TileMonitoringCfgHelper._cellNameTMDB_EB = ["D5L", "D5R", "D6L", "D6R"]
protected

Definition at line 27 of file TileMonitoringCfgHelper.py.

◆ _cellNameTMDB_LB

list TileMonitoringCfgHelper._cellNameTMDB_LB = ["D0", "D1L", "D1R", "D2R", "D2L", "D3L", "D3R", ""]
protected

Definition at line 26 of file TileMonitoringCfgHelper.py.

◆ _gainName

dict TileMonitoringCfgHelper._gainName = {0 : 'LG', 1 : 'HG'}
protected

Definition at line 23 of file TileMonitoringCfgHelper.py.

◆ _partitionName

dict TileMonitoringCfgHelper._partitionName = {0: 'AUX', 1 : 'LBA', 2 : 'LBC', 3 : 'EBA', 4 : 'EBC', 5 : 'AllPart'}
protected

Definition at line 22 of file TileMonitoringCfgHelper.py.

◆ _sampleName

dict TileMonitoringCfgHelper._sampleName = {0 : 'SampA', 1 : 'SampB', 2 : 'SampD', 3 : 'SampE', 4 : 'AllSamp'}
protected

Definition at line 24 of file TileMonitoringCfgHelper.py.