Belle II Software development
CheckRelationBremClusterTestModule Class Reference
Inheritance 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 27 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 33 of file eclTrackBremFinderTest.py.

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