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