Belle II Software development
CheckTrackClusterMatching Class Reference
Inheritance diagram for CheckTrackClusterMatching:

Public Member Functions

def event (self)
 

Detailed Description

Module which checks relations/variables have been properly set for track-cluster matching
Note that this does not check the performance of the track-cluster matching

Definition at line 19 of file eclTrackClusterMatching.py.

Member Function Documentation

◆ event()

def event (   self)
Load tracks from StoreArray for each event, and perform tests of module

Definition at line 25 of file eclTrackClusterMatching.py.

25 def event(self):
26 """
27 Load tracks from StoreArray for each event, and perform tests of module
28 """
29
30 tracks = Belle2.PyStoreArray("Tracks")
31
32 for track in tracks:
33 cluster = track.getRelatedTo("ECLClusters")
34 if (cluster):
35 # TEST 1: if cluster is related to track, flag should be set
36 assert cluster.isTrack(), "Cluster does not have track set despite relation existing"
37 # TEST 2: correct track-cluster matching method used (Enter Crystal or Angular Distance)
38 fit_result = track.getTrackFitResultWithClosestMass(211)
39 pt = fit_result.getTransverseMomentum()
40 theta = fit_result.getMomentum().Theta()
41 if (pt < 0.3 and theta > 0.5480334) or (pt > 0.3 and theta > 0.5480334 and theta < 0.561996):
42 assert track.getRelatedTo(
43 "ECLClusters", "EnterCrystal") is not None, "Relation set with EnterCrystal method does not exist"
44 else:
45 assert track.getRelatedTo(
46 "ECLClusters", "AngularDistance") is not None, "Relation set with AngularDistance method does not exist"
47
48
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

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