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 86 of file CaloThinCellsByClusterAlg_test.py.

Member Function Documentation

◆ execute()

def python.CaloThinCellsByClusterAlg_test.CheckThinningAlg.execute (   self)

Definition at line 92 of file CaloThinCellsByClusterAlg_test.py.

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

◆ isCloseTo()

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

Definition at line 87 of file CaloThinCellsByClusterAlg_test.py.

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

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