Belle II Software  release-05-02-19
CDCHitUniqueAssumer Class Reference
Inheritance diagram for CDCHitUniqueAssumer:
Collaboration diagram for CDCHitUniqueAssumer:

Public Member Functions

def initialize (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 number_of_doubled_hits
 counter for doubled CDC hits
 
 number_of_total_hits
 counter for total CDC hits
 
 number_of_hits_with_wrong_flags
 counter for CDC hits with wrong flags
 

Detailed Description

A small helper module to look for double assigned hits.
Prints a summary after execution

Definition at line 10 of file modules.py.

Member Function Documentation

◆ event()

def event (   self)
Event method of the module

Definition at line 26 of file modules.py.

26  def event(self):
27  """Event method of the module"""
28  track_store_vector = Belle2.PyStoreObj('CDCTrackVector')
29 
30  if track_store_vector:
31  # Wrapper around std::vector like
32  wrapped_vector = track_store_vector.obj()
33  tracks = wrapped_vector.get()
34 
35  for track in tracks:
36  # Unset all taken flags
37  for recoHit3D in track:
38  if not recoHit3D.getWireHit().getAutomatonCell().hasTakenFlag():
39  self.number_of_hits_with_wrong_flags += 1
40 
41  for i, track in enumerate(tracks):
42  # Now check that we only have every wire hit once
43  for j, innerTrack in enumerate(tracks):
44  if i == j:
45  continue
46  for recoHit3D in innerTrack:
47  recoHit3D.getWireHit().getAutomatonCell().setAssignedFlag()
48 
49  for recoHit3D in track:
50  self.number_of_total_hits += 1
51  if recoHit3D.getWireHit().getAutomatonCell().hasAssignedFlag():
52  self.number_of_doubled_hits += 1
53  recoHit3D.getWireHit().getAutomatonCell().setAssignedFlag()
54 
55  for innerTrack in tracks:
56  for recoHit3D in innerTrack:
57  recoHit3D.getWireHit().getAutomatonCell().unsetAssignedFlag()
58 

◆ initialize()

def initialize (   self)
Initialization signal at the start of the event processing

Definition at line 17 of file modules.py.

◆ terminate()

def terminate (   self)
Termination signal at the end of the event processing

Definition at line 59 of file modules.py.


The documentation for this class was generated from the following file:
Belle2::PyStoreObj
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:69
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146