Belle II Software  release-08-01-10
090_cs.py
1 #!/usr/bin/env python3
2 
3 import basf2 as b2
4 import modularAnalysis as ma
5 import stdPi0s
6 
7 # Perform analysis.
8 main = b2.create_path()
9 
10 ma.inputMdstList(
11  filelist=[
12  b2.find_file(
13  "starterkit/2021/B02ks0pi0_sample.root", data_type="examples"
14  ),
15  b2.find_file("starterkit/2021/uubar_sample.root", data_type="examples"),
16  ],
17  path=main,
18 )
19 
20 stdPi0s.stdPi0s(path=main, listtype="eff60_May2020")
21 ma.fillParticleList(
22  decayString="pi+:good", cut="chiProb > 0.001 and pionID > 0.5", path=main
23 )
24 
25 ma.reconstructDecay(
26  decayString="K_S0 -> pi+:good pi-:good", cut="0.480<=M<=0.516", path=main
27 )
28 
29 ma.reconstructDecay(
30  decayString="B0 -> K_S0 pi0:eff60_May2020",
31  cut="5.1 < Mbc < 5.3 and abs(deltaE) < 2",
32  path=main,
33 ) # [E13]
34 
35 ma.buildRestOfEvent(target_list_name="B0", path=main) # [S10]
36 cleanMask = (
37  "cleanMask",
38  "nCDCHits > 0 and useCMSFrame(p)<=3.2",
39  "p >= 0.05 and useCMSFrame(p)<=3.2",
40 )
41 ma.appendROEMasks(list_name="B0", mask_tuples=[cleanMask], path=main)
42 
43 ma.buildContinuumSuppression(list_name="B0", roe_mask="cleanMask", path=main) # [E10]
44 
45 simpleCSVariables = [ # [S20]
46  "R2",
47  "thrustBm",
48  "thrustOm",
49  "cosTBTO",
50  "cosTBz",
51 ]
52 
53 ma.variablesToNtuple(
54  decayString="B0",
55  variables=simpleCSVariables + ["Mbc", "isContinuumEvent"],
56  filename="ContinuumSuppression.root",
57  treename="tree",
58  path=main,
59 )
60 
61 b2.process(main) # [E20]
def stdPi0s(listtype="eff60_May2020", path=None, beamBackgroundMVAWeight="", fakePhotonMVAWeight="", biasCorrectionTable="")
Definition: stdPi0s.py:22