◆ __init__()
def TileCellBuilderTestConfig.TestAlg.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
prepAlg |
|
) |
| |
◆ check_bad_chan_lines()
def TileCellBuilderTestConfig.TestAlg.check_bad_chan_lines |
( |
|
self | ) |
|
Definition at line 522 of file TileCellBuilderTestConfig.py.
522 def check_bad_chan_lines (self):
523 for name, (chans, lines)
in baddefs.items():
524 xlines = self.make_bad_chan_lines (chans)
525 if xlines.strip() != lines.strip():
526 print (
'xxx Bad chan lines need updating: ', name)
◆ check_ei()
def TileCellBuilderTestConfig.TestAlg.check_ei |
( |
|
self, |
|
|
|
extra_flags |
|
) |
| |
Definition at line 498 of file TileCellBuilderTestConfig.py.
498 def check_ei (self, extra_flags):
499 ei = self.evtStore[
'EventInfo']
500 assert ei.eventFlags (ROOT.xAOD.EventInfo.Tile) == (0xf0f0005 | extra_flags)
501 assert ei.errorState (ROOT.xAOD.EventInfo.Tile) == ROOT.xAOD.EventInfo.Error
◆ compare_cells()
def TileCellBuilderTestConfig.TestAlg.compare_cells |
( |
|
self, |
|
|
|
ccc, |
|
|
|
exp_cells, |
|
|
|
rctype |
|
) |
| |
Definition at line 450 of file TileCellBuilderTestConfig.py.
450 def compare_cells (self, ccc, exp_cells, rctype):
451 exp_cells = exp_cells.copy()
452 idHelper = self.detStore[
'CaloCell_ID'].tile_idHelper()
455 lcell = [c.ene1(), c.ene2(), c.time1(), c.time2(),
456 c.qual1(), c.qual2(),
457 c.qbit1(), c.qbit2(),
458 c.gain1(), c.gain2()]
461 addr = (idHelper.section(cid),
463 idHelper.module(cid),
465 idHelper.sampling(cid))
466 l = exp_cells.get (addr)
468 print (
'xxx unexpected cell', addr, lcell)
475 if l[0] != 0: l[6] = TestAlg.update_qbit (l[6], rctype)
476 if l[1] != 0: l[7] = TestAlg.update_qbit (l[7], rctype)
478 if (abs (lcell[0] - l[0]) > 1e-3
or
479 abs (lcell[1] - l[1]) > 1e-3
or
480 abs (lcell[2] - l[2]) > 1e-3
or
481 abs (lcell[3] - l[3]) > 1e-3
or
482 abs (lcell[4] != l[4])
or
483 abs (lcell[5] != l[5])
or
484 abs (lcell[6] != l[6])
or
485 abs (lcell[7] != l[7])
or
486 abs (lcell[8] != l[8])
or
487 abs (lcell[9] != l[9])):
488 print (
'xxx cell mismatch: ', addr, lcell, l)
492 for extra
in exp_cells:
493 print (
'xxx unfound cell', extra)
◆ execute()
def TileCellBuilderTestConfig.TestAlg.execute |
( |
|
self | ) |
|
Definition at line 428 of file TileCellBuilderTestConfig.py.
429 tool = getattr (self, self.prepAlg.tool)
431 ccc = ROOT.CaloCellContainer()
432 if not tool.process (ccc, self.getContext()):
433 return StatusCode.Failure
435 rctype = self.prepAlg.rctype
436 self.compare_cells (ccc, self.prepAlg.exp_cells, rctype)
437 self.compare_cells (self.evtStore[
'MBTSContainer'], self.prepAlg.exp_mbts, rctype)
438 self.compare_cells (self.evtStore[
'E4prContainer'], exp_e4_0, rctype)
440 self.check_ei (self.prepAlg.extra_ei_flags)
441 return StatusCode.Success
◆ finalize()
def TileCellBuilderTestConfig.TestAlg.finalize |
( |
|
self | ) |
|
◆ initialize()
def TileCellBuilderTestConfig.TestAlg.initialize |
( |
|
self | ) |
|
Definition at line 401 of file TileCellBuilderTestConfig.py.
402 ROOT.ICaloCellMakerTool
405 tool = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)(
'TileCellBuilder/' + name)
406 if not tool.retrieve():
410 self.tool1 = gettool (
'tool1')
411 self.tool2 = gettool (
'tool2')
412 self.tool5 = gettool (
'tool5')
413 self.tool6 = gettool (
'tool6')
414 self.tool7 = gettool (
'tool7')
415 self.tool8 = gettool (
'tool8')
416 self.tool9 = gettool (
'tool9')
417 self.tool10 = gettool (
'tool10')
418 self.tool11 = gettool (
'tool11')
420 return StatusCode.Success
◆ make_bad_chan_lines()
def TileCellBuilderTestConfig.TestAlg.make_bad_chan_lines |
( |
|
self, |
|
|
|
chans |
|
) |
| |
Definition at line 505 of file TileCellBuilderTestConfig.py.
505 def make_bad_chan_lines (self, chans):
506 idHelper = self.detStore[
'CaloCell_ID'].tile_idHelper()
507 hwidHelper = self.detStore[
'TileHWID']
508 cabling = ROOT.TileCablingService.getInstance()
511 for addr, data
in chans:
512 pmt_id = idHelper.pmt_id (*addr)
513 channel_id = cabling.s2h_channel_id (pmt_id)
514 frag = hwidHelper.frag (channel_id)
515 channel = hwidHelper.channel (channel_id)
516 line =
'0x%03x %d 0 %d %d %d' % (frag, channel, data[0], data[1], data[2])
519 return '\n'.join (lines)
◆ update_qbit()
def TileCellBuilderTestConfig.TestAlg.update_qbit |
( |
|
qb, |
|
|
|
rctype |
|
) |
| |
|
static |
◆ prepAlg
TileCellBuilderTestConfig.TestAlg.prepAlg |
◆ tool1
TileCellBuilderTestConfig.TestAlg.tool1 |
◆ tool10
TileCellBuilderTestConfig.TestAlg.tool10 |
◆ tool11
TileCellBuilderTestConfig.TestAlg.tool11 |
◆ tool2
TileCellBuilderTestConfig.TestAlg.tool2 |
◆ tool5
TileCellBuilderTestConfig.TestAlg.tool5 |
◆ tool6
TileCellBuilderTestConfig.TestAlg.tool6 |
◆ tool7
TileCellBuilderTestConfig.TestAlg.tool7 |
◆ tool8
TileCellBuilderTestConfig.TestAlg.tool8 |
◆ tool9
TileCellBuilderTestConfig.TestAlg.tool9 |
The documentation for this class was generated from the following file: