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

Classes

class  TestAlg
class  TileFragHash

Functions

 exp_merge (base, d)
 TileBadChannelsCfg (flags, badChannels, chans=[], lines='')
 maketool (name, badChannels, noise=0, **kw)
 TileRawChannelBuilderFromHitTestCfg (flags)

Variables

list hits_0
dict exp_cells_0
dict exp_mbts_0
dict exp_e4_0
 exp_cells_1
 exp_mbts_1
dict baddefs = {}
list BAD_LOW = [1<<1, 0, 0]
list BAD_HIGH = [ 0, 1<<1, 0]
list BAD_BOTH = [ 0, 0, 1<<1]
list BADTIMING = [ 0, 0, 1<<9]
str badChannelsLines
 flags = initConfigFlags()
 Files
 ConditionsRunNumber
 OverrideRunNumber
 GlobalTag
 RunType
 MaxEvents
 cfg = MainServicesCfg(flags)
 withDetails
 sc = cfg.run()

Function Documentation

◆ exp_merge()

TileCellBuilderFromHitTestConfig.exp_merge ( base,
d )

Definition at line 116 of file TileCellBuilderFromHitTestConfig.py.

116def exp_merge (base, d):
117 new = base.copy()
118 new.update (d)
119 return new
120
121
122# TileBadChan errors.

◆ maketool()

TileCellBuilderFromHitTestConfig.maketool ( name,
badChannels,
noise = 0,
** kw )

Definition at line 382 of file TileCellBuilderFromHitTestConfig.py.

382def maketool (name, badChannels, noise=0, **kw):
383 TileBadChanTool = CompFactory.TileBadChanTool
384 bct = TileBadChanTool(TileBadChannels=badChannels)
385
386 TileCellBuilderFromHit = CompFactory.TileCellBuilderFromHit
387 return TileCellBuilderFromHit(name,
388 TileBadChanTool=bct,
389 CaloNoise='',
390 TileHitContainer='TileHitCnt',
391 NoiseSigma=noise,
392 **kw)
393
394
The tool to get Tile channel and ADC status.
This class creates Cells from RawChannels and stores them in a container.

◆ TileBadChannelsCfg()

TileCellBuilderFromHitTestConfig.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 294 of file TileCellBuilderFromHitTestConfig.py.

294def TileBadChannelsCfg(flags, badChannels, chans=[], lines=''):
295
296 """
297
298 chans: [(sec, side, mod, tow, samp, pmt), [DATA0, DATA1, DATA2]]
299 We'd like to specify cells using offline addressing, but the bad cell
300 file uses online addressing. We can convert, but that requires
301 idhelpers, etc, that aren't available until after initialization.
302 So we pass in both representations; in finalize(), we'll check
303 that they match and print out the correct bad cell lines
304 if they do not.
305
306 File data line format:
307 frag channel dummy adcStatus0 adcStatus1 chnStatus
308 chnStatus + adcStatusN are given to TileBchDecoder.
309 Offline problem masks:
310 chn adc
311 0 GeneralMaskChannel GeneralMaskAdc
312 1 NoPmt AdcDead
313 2 NoHV StuckBit
314 3 WrongHV DataCorruption
315 4 NoLaser VeryLargeHfNoise
316 5 BadLaser NoData
317 6 NoCesium WrongDspConfig
318 7 BadCesium LargeHfNoise
319 8 NoTiming CorrelatedNoise
320 9 BadTiming LargeLfNoise
321 10 TrigGeneralMask NoCis
322 11 TrigNoGain BadCis
323 12 TrigHalfGain SevereStuckBit
324 13 TrigNoisy SevereDataCorruption
325 14 Emergency IgnoredByDQV
326 15 HVReadoutPb
327 16 BrokenClearFibre
328 17 IgnoreCs
329 18 UnstableCs
330
331
332 Online problem masks:
333 chn adc
334 0 IgnoredInDsp OnlineGeneralMaskAdc
335 1 IgnoredInHlt
336 2 DisableForL1
337 3 TrigGeneralMask
338 4 TrigNoGain
339 5 TrigHalfGain
340 6 TrigNoisy
341 7 OnlineBadTiming
342 """
343
344 if not chans:
345 TileBchList = 'TileNoBad.oflBch'
346 else:
347 TileBchList = badChannels + '.bch'
348 f = open (TileBchList, 'w')
349 print ('OBJVERSION 0', file=f)
350 print ('0x000 0 0 0 0 0', file=f)
351 f.write (lines)
352 f.close()
353 baddefs[badChannels] = (chans, lines)
354
355
356 TileCondProxyFileBch = CompFactory.getComp("TileCondProxyFile<TileCalibDrawerBch>")
357 onlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OnlBch', Source=TileBchList)
358 offlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OflBch', Source='TileNoBad.oflBch')
359
360 TileBadChannelsCondAlg = CompFactory.TileBadChannelsCondAlg
361 badChannelsCondAlg = TileBadChannelsCondAlg(name=f'{badChannels}_CondAlg',
362 OnlBchProxy=onlineBadChannelsProxy,
363 OflBchProxy=offlineBadChannelsProxy,
364 TileBadChannels=badChannels)
365
366 acc = ComponentAccumulator()
367 acc.addCondAlgo(badChannelsCondAlg)
368
369 return acc
370
371
Condition algorithm to prepare TileBadChannels and put it into condition store.

◆ TileRawChannelBuilderFromHitTestCfg()

TileCellBuilderFromHitTestConfig.TileRawChannelBuilderFromHitTestCfg ( flags)

Definition at line 395 of file TileCellBuilderFromHitTestConfig.py.

395def TileRawChannelBuilderFromHitTestCfg(flags):
396
397 acc = ComponentAccumulator()
398
399 from TileGeoModel.TileGMConfig import TileGMCfg
400 acc.merge( TileGMCfg(flags) )
401
402 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
403 acc.merge(LArGMCfg(flags))
404
405 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
406 acc.merge( TileCablingSvcCfg(flags) )
407
408 from TileConditions.TileInfoLoaderConfig import TileInfoLoaderCfg
409 acc.merge( TileInfoLoaderCfg(flags) )
410
411 from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
412 acc.merge( TileEMScaleCondAlgCfg(flags) )
413
414 from RngComps.RngCompsConfig import AthRNGSvcCfg
415 acc.merge( AthRNGSvcCfg(flags) )
416
417 from TileConditions.TileSamplingFractionConfig import TileSamplingFractionCondAlgCfg
418 acc.merge( TileSamplingFractionCondAlgCfg(flags, Source='FILE') )
419 acc.getCondAlgo('TileSamplingFractionCondAlg').G4Version=-1
420
421 bc1 = 'tilecellbuilder_bc1'
422 acc.merge( TileBadChannelsCfg(flags, bc1) )
423
424 bc2 = 'tilecellbuilder_bc2'
425 acc.merge( TileBadChannelsCfg(flags, bc2,
426 [[(3, 1, 18, 8, 2, 0), BAD_HIGH],
427 [(2, 1, 18, 9, 1, 0), BAD_LOW],
428 [(2, 1, 18, 12, 0, 1), BAD_BOTH],
429 [(2, 1, 18, 11, 0, 0), BADTIMING],
430 [(4, 1, 0, 1, 0, 0), BAD_BOTH],
431 [(4, 1, 6, 1, 0, 0), BADTIMING],
432 ], badChannelsLines) )
433
434
435 acc.addPublicTool( maketool ('tool1', bc1) )
436 acc.addPublicTool( maketool ('tool2', bc2, maskBadChannels=True) )
437 acc.addPublicTool( maketool ('tool3', bc1, noise=0.1) )
438
439 acc.addEventAlgo( TestAlg('testalg1') )
440
441 return acc
442
443

Variable Documentation

◆ BAD_BOTH

list TileCellBuilderFromHitTestConfig.BAD_BOTH = [ 0, 0, 1<<1]

Definition at line 291 of file TileCellBuilderFromHitTestConfig.py.

◆ BAD_HIGH

list TileCellBuilderFromHitTestConfig.BAD_HIGH = [ 0, 1<<1, 0]

Definition at line 290 of file TileCellBuilderFromHitTestConfig.py.

◆ BAD_LOW

list TileCellBuilderFromHitTestConfig.BAD_LOW = [1<<1, 0, 0]

Definition at line 289 of file TileCellBuilderFromHitTestConfig.py.

◆ badChannelsLines

str TileCellBuilderFromHitTestConfig.badChannelsLines
Initial value:
1= """
20x312 2 0 0 2 0
30x312 4 0 2 0 0
40x312 11 0 0 0 2
50x312 6 0 0 0 512
60x307 12 0 0 0 2
70x335 12 0 0 0 512
8"""

Definition at line 372 of file TileCellBuilderFromHitTestConfig.py.

◆ baddefs

dict TileCellBuilderFromHitTestConfig.baddefs = {}

Definition at line 288 of file TileCellBuilderFromHitTestConfig.py.

◆ BADTIMING

list TileCellBuilderFromHitTestConfig.BADTIMING = [ 0, 0, 1<<9]

Definition at line 292 of file TileCellBuilderFromHitTestConfig.py.

◆ cfg

TileCellBuilderFromHitTestConfig.cfg = MainServicesCfg(flags)

Definition at line 466 of file TileCellBuilderFromHitTestConfig.py.

◆ ConditionsRunNumber

TileCellBuilderFromHitTestConfig.ConditionsRunNumber

Definition at line 456 of file TileCellBuilderFromHitTestConfig.py.

◆ exp_cells_0

dict TileCellBuilderFromHitTestConfig.exp_cells_0
Initial value:
1= {
2 (1, 1, 0, 1, 0) : [ -30.6, 0.0, -13.3, -13.3, 0, 0, 128, 0, 1, -1],
3 (1, 1, 0, 1, 1) : [ 6.8, 0.0, 22.1, 0.0, 0, 0, 128, 0, 1, 1],
4 (1, 1, 0, 2, 0) : [1040.4, 1421.2, -0.4, 0.1, 0, 0, 160, 160, 1, 1],
5 (1, 1, 0, 2, 1) : [ 115.6, 47.6, 3.5, 12.9, 0, 0, 160, 160, 1, 1],
6
7 (2, 1, 18, 10, 1):[1812.2, 2179.4, 1.3, 1.0, 0, 0, 160, 160, 1, 1],
8 (2, 1, 18, 10, 2):[ 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 1, 1],
9 (2, 1, 18, 11, 0):[ 295.8, 214.2, 0.4, 1.9, 0, 0, 160, 160, 1, 1],
10 (2, 1, 18, 11, 1):[1309.0, 1635.4, 0.5, 0.3, 0, 0, 160, 160, 1, 1],
11 (2, 1, 18, 12, 0):[ 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 1, 1],
12 (3, 1, 18, 8, 2):[ 0.0, 119.0, 0.0, -11.9, 0, 0, 0, 160, 1, 1],
13 (3, 1, 18, 9, 1):[ 27.2, 0.0, -17.6, 0.0, 0, 0, 128, 0, 1, 1],
14 (3, 1, 18, 10, 3):[ 675.0, 0.0, 7.7, 7.7, 0, 0, 160, 0, 1, -1],
15 (3, 1, 18, 11, 3):[5232.3, 0.0, 0.4, 0.4, 0, 0, 160, 0, 1, -1],
16 (3, 1, 18, 13, 3):[ 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 1, -1],
17 (3, 1, 18, 15, 3):[ 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 1, -1],
18
19 # coll 136
20 (3, 1, 8, 13, 3) :[2609.3, 0.0, 4.8, 4.8, 0, 0, 160, 0, 1, -1],
21}

Definition at line 77 of file TileCellBuilderFromHitTestConfig.py.

◆ exp_cells_1

TileCellBuilderFromHitTestConfig.exp_cells_1
Initial value:
1= exp_merge (exp_cells_0, {
2 (1, 1, 0, 1, 0) : [-30.6, -30.6, -13.3, -13.3, 0, 0, 128, 136, 1, 1],
3 (2, 1, 18, 11, 0) : [295.8, 214.2, 1.9, 1.9, 0, 0, 32, 160, 1, 1],
4 (2, 1, 18, 12, 0) : [ 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 8, 1, 1],
5 (3, 1, 18, 8, 2) : [119.0, 119.0, -11.9, -11.9, 0, 0, 168, 160, 1, 1],
6})

Definition at line 123 of file TileCellBuilderFromHitTestConfig.py.

◆ exp_e4_0

dict TileCellBuilderFromHitTestConfig.exp_e4_0
Initial value:
1= {
2 (4, -1, 0, 2, 0) : [172.5, 0.0, 3.2, 3.2, 0, 0, 160, 0, 1, -1],
3 (4, -1, 1, 2, 0) : [232.5, 0.0, -5.3, -5.3, 0, 0, 160, 0, 1, -1],
4 (4, -1, 2, 2, 0) : [-30.0, 0.0, 3.6, 3.6, 0, 0, 128, 0, 1, -1],
5 (4, -1, 3, 2, 0) : [ 15.0, 0.0, -3.0, -3.0, 0, 0, 128, 0, 1, -1],
6}

Definition at line 108 of file TileCellBuilderFromHitTestConfig.py.

◆ exp_mbts_0

dict TileCellBuilderFromHitTestConfig.exp_mbts_0
Initial value:
1= {
2 (4, 1, 0, 1, 0) : [0.0931, 0.0, 2.8, 2.8, 0, 0, 160, 0, 1, -1],
3 (4, 1, 6, 1, 0) : [0.0888, 0.0, 1.2, 1.2, 0, 0, 160, 0, 1, -1],
4 (4, 1, 6, 0, 0) : [0.0566, 0.0, 0.5, 0.5, 0, 0, 160, 0, 1, -1],
5 (4, -1, 3, 0, 0) : [0.1360, 0.0, 1.7, 1.7, 0, 0, 160, 0, 1, -1],
6}

Definition at line 100 of file TileCellBuilderFromHitTestConfig.py.

◆ exp_mbts_1

TileCellBuilderFromHitTestConfig.exp_mbts_1
Initial value:
1= exp_merge (exp_mbts_0, {
2 (4, 1, 0, 1, 0) : [0.0, 0.0, -100.0, -100.0, 255, 0, 8, 8, 1, -1],
3 (4, 1, 6, 1, 0) : [0.0888, 0.0, 0.0, 0.0, 0, 0, 32, 0, 1, -1],
4})

Definition at line 129 of file TileCellBuilderFromHitTestConfig.py.

◆ Files

TileCellBuilderFromHitTestConfig.Files

Definition at line 455 of file TileCellBuilderFromHitTestConfig.py.

◆ flags

TileCellBuilderFromHitTestConfig.flags = initConfigFlags()

Definition at line 454 of file TileCellBuilderFromHitTestConfig.py.

◆ GlobalTag

TileCellBuilderFromHitTestConfig.GlobalTag

Definition at line 458 of file TileCellBuilderFromHitTestConfig.py.

◆ hits_0

list TileCellBuilderFromHitTestConfig.hits_0

Definition at line 18 of file TileCellBuilderFromHitTestConfig.py.

◆ MaxEvents

TileCellBuilderFromHitTestConfig.MaxEvents

Definition at line 460 of file TileCellBuilderFromHitTestConfig.py.

◆ OverrideRunNumber

TileCellBuilderFromHitTestConfig.OverrideRunNumber

Definition at line 457 of file TileCellBuilderFromHitTestConfig.py.

◆ RunType

TileCellBuilderFromHitTestConfig.RunType

Definition at line 459 of file TileCellBuilderFromHitTestConfig.py.

◆ sc

TileCellBuilderFromHitTestConfig.sc = cfg.run()

Definition at line 481 of file TileCellBuilderFromHitTestConfig.py.

◆ withDetails

TileCellBuilderFromHitTestConfig.withDetails

Definition at line 478 of file TileCellBuilderFromHitTestConfig.py.