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

381def maketool (name, badChannels, noise=0, **kw):
382 TileBadChanTool = CompFactory.TileBadChanTool
383 bct = TileBadChanTool(TileBadChannels=badChannels)
384
385 TileCellBuilderFromHit = CompFactory.TileCellBuilderFromHit
386 return TileCellBuilderFromHit(name,
387 TileBadChanTool=bct,
388 CaloNoise='',
389 TileHitContainer='TileHitCnt',
390 NoiseSigma=noise,
391 **kw)
392
393
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 293 of file TileCellBuilderFromHitTestConfig.py.

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

◆ TileRawChannelBuilderFromHitTestCfg()

TileCellBuilderFromHitTestConfig.TileRawChannelBuilderFromHitTestCfg ( flags)

Definition at line 394 of file TileCellBuilderFromHitTestConfig.py.

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

Variable Documentation

◆ BAD_BOTH

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

Definition at line 290 of file TileCellBuilderFromHitTestConfig.py.

◆ BAD_HIGH

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

Definition at line 289 of file TileCellBuilderFromHitTestConfig.py.

◆ BAD_LOW

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

Definition at line 288 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 371 of file TileCellBuilderFromHitTestConfig.py.

◆ baddefs

dict TileCellBuilderFromHitTestConfig.baddefs = {}

Definition at line 287 of file TileCellBuilderFromHitTestConfig.py.

◆ BADTIMING

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

Definition at line 291 of file TileCellBuilderFromHitTestConfig.py.

◆ cfg

TileCellBuilderFromHitTestConfig.cfg = MainServicesCfg(flags)

Definition at line 465 of file TileCellBuilderFromHitTestConfig.py.

◆ ConditionsRunNumber

TileCellBuilderFromHitTestConfig.ConditionsRunNumber

Definition at line 455 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 454 of file TileCellBuilderFromHitTestConfig.py.

◆ flags

TileCellBuilderFromHitTestConfig.flags = initConfigFlags()

Definition at line 453 of file TileCellBuilderFromHitTestConfig.py.

◆ GlobalTag

TileCellBuilderFromHitTestConfig.GlobalTag

Definition at line 457 of file TileCellBuilderFromHitTestConfig.py.

◆ hits_0

list TileCellBuilderFromHitTestConfig.hits_0

Definition at line 18 of file TileCellBuilderFromHitTestConfig.py.

◆ MaxEvents

TileCellBuilderFromHitTestConfig.MaxEvents

Definition at line 459 of file TileCellBuilderFromHitTestConfig.py.

◆ OverrideRunNumber

TileCellBuilderFromHitTestConfig.OverrideRunNumber

Definition at line 456 of file TileCellBuilderFromHitTestConfig.py.

◆ RunType

TileCellBuilderFromHitTestConfig.RunType

Definition at line 458 of file TileCellBuilderFromHitTestConfig.py.

◆ sc

TileCellBuilderFromHitTestConfig.sc = cfg.run()

Definition at line 480 of file TileCellBuilderFromHitTestConfig.py.

◆ withDetails

TileCellBuilderFromHitTestConfig.withDetails

Definition at line 477 of file TileCellBuilderFromHitTestConfig.py.