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

Member Function Documentation

◆ execute()

def python.CaloThinCellsByClusterAlg_test.CheckThinningAlg.execute (   self)

Definition at line 91 of file CaloThinCellsByClusterAlg_test.py.

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

◆ isCloseTo()

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

Definition at line 86 of file CaloThinCellsByClusterAlg_test.py.

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

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