Belle II Software  release-08-01-10
CheckPresenceOfTrackToMCParticleRelation Class Reference
Inheritance diagram for CheckPresenceOfTrackToMCParticleRelation:
Collaboration 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 
44 set_random_seed(12345)
45 

◆ initialize()

def initialize (   self)
Initialise the required StoreArrays and variables

Definition at line 21 of file track_to_mcparticle_relation_test.py.


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