Belle II Software development
skim.py
1import basf2 as b2
2import modularAnalysis as ma
3import vertex as vx
4from extravariables import runningOnMC, outputfile
5import udst
6
7gbasf2_dataset = [] # gbasf2 will figure this out
8
9mypath = b2.create_path()
10ma.inputMdstList(filelist=gbasf2_dataset, path=mypath, entrySequences=['0:10'])
11
12ma.fillParticleList(decayString='K+:my', cut="dr < 0.5 and abs(dz) < 3 and thetaInCDCAcceptance and kaonID > 0.01", path=mypath)
13ma.fillParticleList(decayString='pi+:my', cut="dr < 0.5 and abs(dz) < 3 and thetaInCDCAcceptance", path=mypath)
14
15ma.reconstructDecay(decayString="D-:K2Pi -> K+:my pi-:my pi-:my", cut="1.5 < M < 2.2", path=mypath)
16
17ma.reconstructDecay(decayString='B0:PiD-toK2Pi -> D-:K2Pi pi+:my', cut='5.0 < Mbc and abs(deltaE) < 1.0', path=mypath)
18vx.treeFit('B0:PiD-toK2Pi', 0, path=mypath, updateAllDaughters=False, ipConstraint=True, massConstraint=[411])
19ma.applyCuts('B0:PiD-toK2Pi', '5.2 < Mbc and abs(deltaE) < 0.5', path=mypath)
20
21# dump in UDST format
23 mypath,
24 skimDecayMode='BtoPiD',
25 skimParticleLists=['B0:PiD-toK2Pi'],
26 mc=runningOnMC,
27 outputFile=outputfile)
28b2.process(mypath)
add_skimmed_udst_output(path, skimDecayMode, skimParticleLists=None, outputParticleLists=None, additionalBranches=None, outputFile=None, dataDescription=None, mc=True)
Definition udst.py:99