12 from basf2
import set_random_seed, create_path, process, statistics, Module
13 from ROOT
import Belle2
14 from simulation
import add_simulation
15 from reconstruction
import add_reconstruction
19 """Class to check the presence of a relation between a Track and an MCParticle"""
22 """Initialise the required StoreArrays and variables"""
25 self.
TracksTracks.isRequired()
34 assert self.
MCParticlesMCParticles.getEntries() > 0,
"Size of MCParticles StoreArray is 0."
35 assert self.
TracksTracks.getEntries() > 0,
"Size of Tracks StoreArray is 0."
36 for track
in self.
TracksTracks:
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."
44 set_random_seed(12345)
49 main.add_module(
'EventInfoSetter', expList=[0], evtNumList=[5], runList=[1])
50 main.add_module(
'ParticleGun',
53 momentumGeneration=
'fixed',
54 momentumParams=[1.618034],
55 phiGeneration=
'fixed',
56 phiParams=[27.182818],
57 thetaGeneration=
'fixed',
58 thetaParams=[62.83185])
59 add_simulation(main, bkgfiles=
None)
60 add_reconstruction(main)
64 main.add_module(
'Progress')
A (simplified) python wrapper for StoreArray.
eventCount
Count the event number to jump the bad events.
MCParticles
MCParticles StoreArray.