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