ATLAS Offline Software
Classes | Functions | Variables
TileCellBuilderTestConfig Namespace Reference

Classes

class  PrepareDataAlg
 
class  TestAlg
 
class  TileFragHash
 

Functions

def add_pedestal (offs_addr, offs)
 
def exp_merge (base, d)
 
def filter_e (base, thresh)
 
def TileBadChannelsCfg (flags, badChannels, chans=[], lines='')
 
def maketool (name, badChannels, **kw)
 
def TileRawChannelBuilderTestCfg (flags)
 

Variables

 hits_0
 
 exp_cells_0
 
 exp_mbts_0
 
 exp_e4_0
 
 hits_1
 
 exp_cells_1
 
 hits_2
 
 exp_cells_2
 
 exp_cells_3
 
 exp_mbts_3
 
 exp_cells_4
 
 exp_cells_5
 
 exp_cells_6
 
 exp_cells_7
 
 exp_mbts_7
 
 exp_cells_8
 
 exp_cells_10
 
 baddefs
 
 BAD_LOW
 
 BAD_HIGH
 
 BAD_BOTH
 
 BADTIMING
 
 badChannelsLines
 
 flags
 
 Files
 
 ConditionsRunNumber
 
 OverrideRunNumber
 
 GlobalTag
 
 RunType
 
 MaxEvents
 
 cfg
 
 disableBeamSpot
 
 withDetails
 
 sc
 

Function Documentation

◆ add_pedestal()

def TileCellBuilderTestConfig.add_pedestal (   offs_addr,
  offs 
)

Definition at line 79 of file TileCellBuilderTestConfig.py.

79 def add_pedestal (offs_addr, offs):
80  out = []
81  for icoll, colldata in hits_0:
82  colldata_out = []
83  for addr, data in colldata:
84  if addr == offs_addr:
85  data = data[:]
86  data[3] += offs
87  colldata_out.append ([addr, data])
88  out.append ([icoll, colldata_out])
89  return out
90 
91 

◆ exp_merge()

def TileCellBuilderTestConfig.exp_merge (   base,
  d 
)

Definition at line 131 of file TileCellBuilderTestConfig.py.

131 def exp_merge (base, d):
132  new = base.copy()
133  new.update (d)
134  return new
135 
136 
137 # Underflow.

◆ filter_e()

def TileCellBuilderTestConfig.filter_e (   base,
  thresh 
)

Definition at line 180 of file TileCellBuilderTestConfig.py.

180 def filter_e (base, thresh):
181  out = {}
182  for addr, l in base.items():
183  if l[0] >= thresh or l[1] >= thresh:
184  out[addr] = l
185  return out
186 
187 # EThreshold

◆ maketool()

def TileCellBuilderTestConfig.maketool (   name,
  badChannels,
**  kw 
)

Definition at line 627 of file TileCellBuilderTestConfig.py.

627 def maketool (name, badChannels, **kw):
628  TileCellBuilder = CompFactory.TileCellBuilder
629  return TileCellBuilder(name, TileBadChannels=badChannels, **kw)
630 
631 

◆ TileBadChannelsCfg()

def TileCellBuilderTestConfig.TileBadChannelsCfg (   flags,
  badChannels,
  chans = [],
  lines = '' 
)
chans: [(sec, side, mod, tow, samp, pmt), [DATA0, DATA1, DATA2]]
We'd like to specify cells using offline addressing, but the bad cell
file uses online addressing.  We can convert, but that requires
idhelpers, etc, that aren't available until after initialization.
So we pass in both representations; in finalize(), we'll check
that they match and print out the correct bad cell lines
if they do not.

  File data line format:
   frag channel dummy adcStatus0 adcStatus1 chnStatus
   chnStatus + adcStatusN are given to TileBchDecoder.
   Offline problem masks:
          chn                         adc
    0     GeneralMaskChannel          GeneralMaskAdc
    1     NoPmt                       AdcDead
    2     NoHV                        StuckBit
    3     WrongHV                     DataCorruption
    4     NoLaser                     VeryLargeHfNoise
    5     BadLaser                    NoData
    6     NoCesium                    WrongDspConfig
    7     BadCesium                   LargeHfNoise
    8     NoTiming                    CorrelatedNoise
    9     BadTiming                   LargeLfNoise
   10     TrigGeneralMask             NoCis
   11     TrigNoGain                  BadCis
   12     TrigHalfGain                SevereStuckBit
   13     TrigNoisy                   SevereDataCorruption
   14     Emergency                   IgnoredByDQV
   15     HVReadoutPb
   16     BrokenClearFibre
   17     IgnoreCs
   18     UnstableCs


   Online problem masks:
          chn                         adc
    0     IgnoredInDsp                OnlineGeneralMaskAdc
    1     IgnoredInHlt
    2     DisableForL1
    3     TrigGeneralMask
    4     TrigNoGain
    5     TrigHalfGain
    6     TrigNoisy
    7     OnlineBadTiming

Definition at line 540 of file TileCellBuilderTestConfig.py.

540 def TileBadChannelsCfg(flags, badChannels, chans=[], lines=''):
541 
542  """
543 
544  chans: [(sec, side, mod, tow, samp, pmt), [DATA0, DATA1, DATA2]]
545  We'd like to specify cells using offline addressing, but the bad cell
546  file uses online addressing. We can convert, but that requires
547  idhelpers, etc, that aren't available until after initialization.
548  So we pass in both representations; in finalize(), we'll check
549  that they match and print out the correct bad cell lines
550  if they do not.
551 
552  File data line format:
553  frag channel dummy adcStatus0 adcStatus1 chnStatus
554  chnStatus + adcStatusN are given to TileBchDecoder.
555  Offline problem masks:
556  chn adc
557  0 GeneralMaskChannel GeneralMaskAdc
558  1 NoPmt AdcDead
559  2 NoHV StuckBit
560  3 WrongHV DataCorruption
561  4 NoLaser VeryLargeHfNoise
562  5 BadLaser NoData
563  6 NoCesium WrongDspConfig
564  7 BadCesium LargeHfNoise
565  8 NoTiming CorrelatedNoise
566  9 BadTiming LargeLfNoise
567  10 TrigGeneralMask NoCis
568  11 TrigNoGain BadCis
569  12 TrigHalfGain SevereStuckBit
570  13 TrigNoisy SevereDataCorruption
571  14 Emergency IgnoredByDQV
572  15 HVReadoutPb
573  16 BrokenClearFibre
574  17 IgnoreCs
575  18 UnstableCs
576 
577 
578  Online problem masks:
579  chn adc
580  0 IgnoredInDsp OnlineGeneralMaskAdc
581  1 IgnoredInHlt
582  2 DisableForL1
583  3 TrigGeneralMask
584  4 TrigNoGain
585  5 TrigHalfGain
586  6 TrigNoisy
587  7 OnlineBadTiming
588  """
589 
590  if not chans:
591  TileBchList = 'TileNoBad.oflBch'
592  else:
593  TileBchList = badChannels + '.bch'
594  f = open (TileBchList, 'w')
595  print ('OBJVERSION 0', file=f)
596  print ('0x000 0 0 0 0 0', file=f)
597  f.write (lines)
598  f.close()
599  baddefs[badChannels] = (chans, lines)
600 
601 
602  TileCondProxyFileBch = CompFactory.getComp("TileCondProxyFile<TileCalibDrawerBch>")
603  onlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OnlBch', Source=TileBchList)
604  offlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OflBch', Source='TileNoBad.oflBch')
605 
606  TileBadChannelsCondAlg = CompFactory.TileBadChannelsCondAlg
607  badChannelsCondAlg = TileBadChannelsCondAlg(name=f'{badChannels}_CondAlg',
608  OnlBchProxy=onlineBadChannelsProxy,
609  OflBchProxy=offlineBadChannelsProxy,
610  TileBadChannels=badChannels)
611 
612  acc = ComponentAccumulator()
613  acc.addCondAlgo(badChannelsCondAlg)
614 
615  return acc
616 
617 

◆ TileRawChannelBuilderTestCfg()

def TileCellBuilderTestConfig.TileRawChannelBuilderTestCfg (   flags)

Definition at line 632 of file TileCellBuilderTestConfig.py.

633 
634  acc = ComponentAccumulator()
635 
636  from TileGeoModel.TileGMConfig import TileGMCfg
637  acc.merge( TileGMCfg(flags) )
638 
639  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
640  acc.merge(LArGMCfg(flags))
641 
642  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
643  acc.merge( TileCablingSvcCfg(flags) )
644 
645  from TileConditions.TileInfoLoaderConfig import TileInfoLoaderCfg
646  acc.merge( TileInfoLoaderCfg(flags) )
647 
648  from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
649  acc.merge( TileEMScaleCondAlgCfg(flags) )
650 
651  from TileConditions.TileTimingConfig import TileTimingCondAlgCfg
652  acc.merge( TileTimingCondAlgCfg(flags) )
653 
654  from TileConditions.TileSampleNoiseConfig import TileSampleNoiseCondAlgCfg
655  acc.merge( TileSampleNoiseCondAlgCfg(flags) )
656 
657  bc1 = 'tilecellbuilder_bc1'
658  acc.merge( TileBadChannelsCfg(flags, bc1) )
659 
660  bc2 = 'tilecellbuilder_bc2'
661  acc.merge( TileBadChannelsCfg(flags, bc2,
662  [[(3, 1, 18, 8, 2, 0), BAD_HIGH],
663  [(2, 1, 18, 9, 1, 0), BAD_LOW],
664  [(2, 1, 18, 12, 0, 1), BAD_BOTH],
665  [(2, 1, 18, 11, 0, 0), BADTIMING],
666  [(4, 1, 0, 1, 0, 0), BAD_BOTH],
667  [(4, 1, 6, 1, 0, 0), BADTIMING],
668  ], badChannelsLines) )
669 
670 
671  TileRawChannelNoiseFilter = CompFactory.TileRawChannelNoiseFilter
672  noisefilter = TileRawChannelNoiseFilter('noisefilter')
673 
674  acc.addPublicTool( maketool ('tool1', bc1) )
675  acc.addPublicTool( maketool ('tool2', bc2) )
676  acc.addPublicTool( maketool ('tool5', bc1, fakeCrackCells=True) )
677  acc.addPublicTool( maketool ('tool6', bc1, EThreshold=300) )
678  acc.addPublicTool( maketool ('tool7', bc1, correctAmplitude=True, correctTime=True) )
679  acc.addPublicTool( maketool ('tool8', bc1, NoiseFilterTools=[noisefilter]) )
680  acc.addPublicTool( maketool ('tool9', bc1, TileDSPRawChannelContainer='TileRawChannelCntDsp') )
681  acc.addPublicTool( maketool ('tool10', bc1, TileDSPRawChannelContainer = 'TileRawChannelCntDsp',
682  correctTime=True, correctAmplitude=True) )
683  acc.addPublicTool( maketool ('tool11', bc1, TileDSPRawChannelContainer='TileRawChannelCntDsp',
684  NoiseFilterTools=[noisefilter]) )
685 
686  acc.addEventAlgo( PrepareDataAlg('prepalg1') )
687  prepalg1 = acc.getEventAlgo('prepalg1')
688 
689  from TileRecUtils.TileDQstatusConfig import TileDQstatusAlgCfg
690  acc.merge(TileDQstatusAlgCfg(flags, name='dqstat1',
691  TileRawChannelContainer='TRCDQ',
692  TileDigitsContainer=''))
693 
694 
695  acc.addEventAlgo( TestAlg('testalg1', prepalg1) )
696 
697  return acc
698 
699 
700 

Variable Documentation

◆ BAD_BOTH

TileCellBuilderTestConfig.BAD_BOTH

Definition at line 537 of file TileCellBuilderTestConfig.py.

◆ BAD_HIGH

TileCellBuilderTestConfig.BAD_HIGH

Definition at line 536 of file TileCellBuilderTestConfig.py.

◆ BAD_LOW

TileCellBuilderTestConfig.BAD_LOW

Definition at line 535 of file TileCellBuilderTestConfig.py.

◆ badChannelsLines

TileCellBuilderTestConfig.badChannelsLines

Definition at line 618 of file TileCellBuilderTestConfig.py.

◆ baddefs

TileCellBuilderTestConfig.baddefs

Definition at line 534 of file TileCellBuilderTestConfig.py.

◆ BADTIMING

TileCellBuilderTestConfig.BADTIMING

Definition at line 538 of file TileCellBuilderTestConfig.py.

◆ cfg

TileCellBuilderTestConfig.cfg

Definition at line 723 of file TileCellBuilderTestConfig.py.

◆ ConditionsRunNumber

TileCellBuilderTestConfig.ConditionsRunNumber

Definition at line 713 of file TileCellBuilderTestConfig.py.

◆ disableBeamSpot

TileCellBuilderTestConfig.disableBeamSpot

Definition at line 730 of file TileCellBuilderTestConfig.py.

◆ exp_cells_0

TileCellBuilderTestConfig.exp_cells_0

Definition at line 92 of file TileCellBuilderTestConfig.py.

◆ exp_cells_1

TileCellBuilderTestConfig.exp_cells_1

Definition at line 139 of file TileCellBuilderTestConfig.py.

◆ exp_cells_10

TileCellBuilderTestConfig.exp_cells_10

Definition at line 217 of file TileCellBuilderTestConfig.py.

◆ exp_cells_2

TileCellBuilderTestConfig.exp_cells_2

Definition at line 145 of file TileCellBuilderTestConfig.py.

◆ exp_cells_3

TileCellBuilderTestConfig.exp_cells_3

Definition at line 150 of file TileCellBuilderTestConfig.py.

◆ exp_cells_4

TileCellBuilderTestConfig.exp_cells_4

Definition at line 161 of file TileCellBuilderTestConfig.py.

◆ exp_cells_5

TileCellBuilderTestConfig.exp_cells_5

Definition at line 171 of file TileCellBuilderTestConfig.py.

◆ exp_cells_6

TileCellBuilderTestConfig.exp_cells_6

Definition at line 188 of file TileCellBuilderTestConfig.py.

◆ exp_cells_7

TileCellBuilderTestConfig.exp_cells_7

Definition at line 193 of file TileCellBuilderTestConfig.py.

◆ exp_cells_8

TileCellBuilderTestConfig.exp_cells_8

Definition at line 208 of file TileCellBuilderTestConfig.py.

◆ exp_e4_0

TileCellBuilderTestConfig.exp_e4_0

Definition at line 123 of file TileCellBuilderTestConfig.py.

◆ exp_mbts_0

TileCellBuilderTestConfig.exp_mbts_0

Definition at line 115 of file TileCellBuilderTestConfig.py.

◆ exp_mbts_3

TileCellBuilderTestConfig.exp_mbts_3

Definition at line 155 of file TileCellBuilderTestConfig.py.

◆ exp_mbts_7

TileCellBuilderTestConfig.exp_mbts_7

Definition at line 200 of file TileCellBuilderTestConfig.py.

◆ Files

TileCellBuilderTestConfig.Files

Definition at line 712 of file TileCellBuilderTestConfig.py.

◆ flags

TileCellBuilderTestConfig.flags

Definition at line 711 of file TileCellBuilderTestConfig.py.

◆ GlobalTag

TileCellBuilderTestConfig.GlobalTag

Definition at line 715 of file TileCellBuilderTestConfig.py.

◆ hits_0

TileCellBuilderTestConfig.hits_0

Definition at line 19 of file TileCellBuilderTestConfig.py.

◆ hits_1

TileCellBuilderTestConfig.hits_1

Definition at line 138 of file TileCellBuilderTestConfig.py.

◆ hits_2

TileCellBuilderTestConfig.hits_2

Definition at line 144 of file TileCellBuilderTestConfig.py.

◆ MaxEvents

TileCellBuilderTestConfig.MaxEvents

Definition at line 717 of file TileCellBuilderTestConfig.py.

◆ OverrideRunNumber

TileCellBuilderTestConfig.OverrideRunNumber

Definition at line 714 of file TileCellBuilderTestConfig.py.

◆ RunType

TileCellBuilderTestConfig.RunType

Definition at line 716 of file TileCellBuilderTestConfig.py.

◆ sc

TileCellBuilderTestConfig.sc

Definition at line 738 of file TileCellBuilderTestConfig.py.

◆ withDetails

TileCellBuilderTestConfig.withDetails

Definition at line 735 of file TileCellBuilderTestConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TileCellBuilderTestConfig.maketool
def maketool(name, badChannels, **kw)
Definition: TileCellBuilderTestConfig.py:627
python.TileTimingConfig.TileTimingCondAlgCfg
def TileTimingCondAlgCfg(flags, **kwargs)
Definition: TileTimingConfig.py:9
TileBadChannelsCondAlg
Condition algorithm to prepare TileBadChannels and put it into condition store.
Definition: TileBadChannelsCondAlg.h:31
python.TileInfoLoaderConfig.TileInfoLoaderCfg
def TileInfoLoaderCfg(flags, **kwargs)
Definition: TileInfoLoaderConfig.py:12
TileCellBuilderTestConfig.TileRawChannelBuilderTestCfg
def TileRawChannelBuilderTestCfg(flags)
Definition: TileCellBuilderTestConfig.py:632
TileDQstatusConfig.TileDQstatusAlgCfg
def TileDQstatusAlgCfg(flags, **kwargs)
Definition: TileDQstatusConfig.py:31
TileCellBuilderTestConfig.TileBadChannelsCfg
def TileBadChannelsCfg(flags, badChannels, chans=[], lines='')
Definition: TileCellBuilderTestConfig.py:540
TileCondProxyFile
The tool to get Tile conditions data from file.
Definition: TileCondProxyFile.h:28
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.TileEMScaleConfig.TileEMScaleCondAlgCfg
def TileEMScaleCondAlgCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:10
TileCellBuilderTestConfig.exp_merge
def exp_merge(base, d)
Definition: TileCellBuilderTestConfig.py:131
TileCellBuilderTestConfig.add_pedestal
def add_pedestal(offs_addr, offs)
Definition: TileCellBuilderTestConfig.py:79
TileCellBuilder
This class creates Cells from RawChannels and stores them in a container.
Definition: TileCellBuilder.h:109
python.TileSampleNoiseConfig.TileSampleNoiseCondAlgCfg
def TileSampleNoiseCondAlgCfg(flags, **kwargs)
Definition: TileSampleNoiseConfig.py:8
TileCellBuilderTestConfig.filter_e
def filter_e(base, thresh)
Definition: TileCellBuilderTestConfig.py:180
TileRawChannelNoiseFilter
This tool subtracts common-mode noise from all TileRawChannels in one container.
Definition: TileRawChannelNoiseFilter.h:39
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7