ATLAS Offline Software
Public Member Functions | List of all members
python.CaloThinCellsByClusterAlg_test.CheckThinningAlg Class Reference
Inheritance diagram for python.CaloThinCellsByClusterAlg_test.CheckThinningAlg:
Collaboration diagram for python.CaloThinCellsByClusterAlg_test.CheckThinningAlg:

Public Member Functions

def isCloseTo (self, elt, eta, phi)
 
def execute (self)
 

Detailed Description

Definition at line 83 of file CaloThinCellsByClusterAlg_test.py.

Member Function Documentation

◆ execute()

def python.CaloThinCellsByClusterAlg_test.CheckThinningAlg.execute (   self)

Definition at line 89 of file CaloThinCellsByClusterAlg_test.py.

89  def execute (self):
90  ctx = self.getContext()
91  mgr = self.condStore['CaloDetDescrManager'].find (ctx.eventID())
92  dec = self.evtStore['AllCalo_THINNED_StreamAOD.thinAlg']
93 
94  global cell_hashes
95  for i in range (dec.size()):
96  elt = mgr.get_element (ROOT.IdentifierHash (i))
97  if elt.getSampling() == 3:
98  close = (self.isCloseTo (elt, 0.5, 1) or
99  self.isCloseTo (elt, -0.5, 1))
100  if not dec.thinned(i):
101  assert close
102  else:
103  assert not close
104  else:
105  if not dec.thinned(i):
106  assert i in cell_hashes
107  else:
108  assert i not in cell_hashes
109  return StatusCode.Success
110 
111 

◆ isCloseTo()

def python.CaloThinCellsByClusterAlg_test.CheckThinningAlg.isCloseTo (   self,
  elt,
  eta,
  phi 
)

Definition at line 84 of file CaloThinCellsByClusterAlg_test.py.

84  def isCloseTo (self, elt, eta, phi):
85  # Assuming no phi wrapping.
86  return (abs (elt.eta() - eta) < 3*0.025 and
87  abs (elt.phi() - phi) < 7*2*pi/256)
88 

The documentation for this class was generated from the following file:
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20