12from basf2
import set_random_seed, create_path, process, statistics, Module
13from ROOT
import Belle2
14from simulation
import add_simulation
15from reconstruction
import add_reconstruction
20 """Class to check the presence of a relation between a Track and an MCParticle"""
23 """Initialise the required StoreArrays and variables"""
35 assert self.
MCParticles.getEntries() > 0,
"Size of MCParticles StoreArray is 0."
36 assert self.
Tracks.getEntries() > 0,
"Size of Tracks StoreArray is 0."
38 track_to_mcparticle_relations = track.getRelationsTo(
'MCParticles')
39 assert track_to_mcparticle_relations.size() > 0,
"Somehow there are no relations from this track to an MCParticle. \
40 Why? I don't know. Likely the track is from a fake RecoTrack."
46 """Main function to be executed if this script is run to avoid running if it's just imported."""
47 set_random_seed(12345)
52 main.add_module(
'EventInfoSetter', expList=[0], evtNumList=[5], runList=[1])
53 main.add_module(
'ParticleGun',
56 momentumGeneration=
'fixed',
57 momentumParams=[1.618034],
58 phiGeneration=
'fixed',
59 phiParams=[27.182818],
60 thetaGeneration=
'fixed',
61 thetaParams=[62.83185])
62 add_simulation(main, bkgfiles=
None)
63 add_reconstruction(main)
67 main.add_module(
'Progress')
74if __name__ ==
"__main__":
75 logging.basicConfig(level=logging.INFO)
A (simplified) python wrapper for StoreArray.
eventCount
Count the event number to jump the bad events.
MCParticles
MCParticles StoreArray.