Belle II Software  release-08-01-10
CheckRelationBremClusterTestModule Class Reference
Inheritance diagram for CheckRelationBremClusterTestModule:
Collaboration diagram for CheckRelationBremClusterTestModule:

Public Member Functions

def event (self)
 

Detailed Description

Module which checks if a generated bremsstrahlung cluster is assigned correctly
to the primary ECL cluster generated by an electron.

Definition at line 28 of file eclTrackBremFinderTest.py.

Member Function Documentation

◆ event()

def event (   self)
Load the one track from the data store and check if the relation to the brem cluster
can been set correctly.

Definition at line 34 of file eclTrackBremFinderTest.py.

34  def event(self):
35  """
36  Load the one track from the data store and check if the relation to the brem cluster
37  can been set correctly.
38  """
39  eventMetaData = Belle2.PyStoreObj("EventMetaData")
40  clusters = Belle2.PyStoreArray("ECLClusters")
41  bremCluster = None
42  for cluster in clusters:
43  # this is the primary of the electron
44  if cluster.isTrack() and cluster.hasHypothesis(Belle2.ECLCluster.EHypothesisBit.c_nPhotons):
45  # is there a relation to our secondary cluster?
46  bremCluster = cluster.getRelated("ECLClusters")
47 
48  bad_events = []
49  if (eventMetaData.getEvent() in bad_events):
50  # the check fails on some events. Instead of finding new settings,
51  # check if the bremCluster is None only for the bad_events
52  assert(not bremCluster)
53  else:
54  # for all the other events, there must be a bremCluster
55  assert(bremCluster)
56 
57 
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

The documentation for this class was generated from the following file: