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

Public Member Functions

def initialize (self)
 
def event (self)
 

Public Attributes

 Tracks
 Tracks StoreArray.
 
 MCParticles
 MCParticles StoreArray.
 
 eventCount
 Count the event number to jump the bad events.
 

Detailed Description

Class to check the presence of a relation between a Track and an MCParticle

Definition at line 18 of file track_to_mcparticle_relation_test.py.

Member Function Documentation

◆ event()

def event (   self)
Event loop

Definition at line 32 of file track_to_mcparticle_relation_test.py.

32 def event(self):
33 """Event loop"""
34 assert self.MCParticles.getEntries() > 0, "Size of MCParticles StoreArray is 0."
35 assert self.Tracks.getEntries() > 0, "Size of Tracks StoreArray is 0."
36 for track in self.Tracks:
37 track_to_mcparticle_relations = track.getRelationsTo('MCParticles')
38 assert track_to_mcparticle_relations.size() > 0, "Somehow there are no relations from this track to an MCParticle. \
39 Why? I don't know. Likely the track is from a fake RecoTrack."
40
41 self.eventCount += 1
42
43

◆ initialize()

def initialize (   self)
Initialise the required StoreArrays and variables

Definition at line 21 of file track_to_mcparticle_relation_test.py.

21 def initialize(self):
22 """Initialise the required StoreArrays and variables"""
23
24 self.Tracks = Belle2.PyStoreArray('Tracks')
25 self.Tracks.isRequired()
26
27 self.MCParticles = Belle2.PyStoreArray('MCParticles')
28 self.MCParticles.isRequired()
29
30 self.eventCount = 1
31
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

Member Data Documentation

◆ eventCount

eventCount

Count the event number to jump the bad events.

Definition at line 30 of file track_to_mcparticle_relation_test.py.

◆ MCParticles

MCParticles

MCParticles StoreArray.

Definition at line 27 of file track_to_mcparticle_relation_test.py.

◆ Tracks

Tracks

Tracks StoreArray.

Definition at line 24 of file track_to_mcparticle_relation_test.py.


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