Belle II Software  release-08-01-10
particlelist.py
1 #!/usr/bin/env python3
2 
3 
10 
11 from ROOT import gSystem
12 from ROOT import Belle2
13 gSystem.Load('libanalysis_dataobjects')
14 
15 bminus = Belle2.PyStoreObj(Belle2.ParticleList.Class(), "B-:test")
16 assert bminus.registerInDataStore()
17 assert bminus.create()
18 bminus.obj().initialize(-521, "B-:test")
19 
20 bplus = Belle2.PyStoreObj(Belle2.ParticleList.Class(), "B+:test")
21 assert bplus.registerInDataStore()
22 assert bplus.create()
23 bplus.obj().initialize(521, "B+:test")
24 bplus.obj().bindAntiParticleList(bminus.obj())
25 
26 assert 'Particles' == bminus.obj().getParticleCollectionName()
27 assert 'B-:test' == bminus.obj().getParticleListName()
28 assert 'B+:test' == bminus.obj().getAntiParticleListName()
29 assert 'B+:test' == bplus.obj().getParticleListName()
30 assert 'B-:test' == bplus.obj().getAntiParticleListName()
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67