Belle II Software  release-08-01-10
091_cs.py
1 #!/usr/bin/env python3
2 import basf2 as b2
3 import modularAnalysis as ma
4 import stdPi0s
5 
6 # Perform analysis.
7 main = b2.create_path()
8 
9 ma.inputMdstList(
10  filelist=[
11  b2.find_file(
12  "starterkit/2021/B02ks0pi0_sample.root", data_type="examples"
13  ),
14  b2.find_file("starterkit/2021/uubar_sample.root", data_type="examples"),
15  ],
16  entrySequences=["1:1000", "1:15000"],
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 )
34 
35 ma.buildRestOfEvent(target_list_name="B0", path=main)
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)
44 
45 simpleCSVariables = [
46  "R2",
47  "thrustBm",
48  "thrustOm",
49  "cosTBTO",
50  "cosTBz",
51  "KSFWVariables(et)",
52  "KSFWVariables(mm2)",
53  "KSFWVariables(hso00)",
54  "KSFWVariables(hso01)",
55  "KSFWVariables(hso02)",
56  "KSFWVariables(hso03)",
57  "KSFWVariables(hso04)",
58  "KSFWVariables(hso10)",
59  "KSFWVariables(hso12)",
60  "KSFWVariables(hso14)",
61  "KSFWVariables(hso20)",
62  "KSFWVariables(hso22)",
63  "KSFWVariables(hso24)",
64  "KSFWVariables(hoo0)",
65  "KSFWVariables(hoo1)",
66  "KSFWVariables(hoo2)",
67  "KSFWVariables(hoo3)",
68  "KSFWVariables(hoo4)",
69  "CleoConeCS(1)",
70  "CleoConeCS(2)",
71  "CleoConeCS(3)",
72  "CleoConeCS(4)",
73  "CleoConeCS(5)",
74  "CleoConeCS(6)",
75  "CleoConeCS(7)",
76  "CleoConeCS(8)",
77  "CleoConeCS(9)",
78 ]
79 
80 ma.variablesToNtuple(
81  decayString="B0",
82  variables=simpleCSVariables + ["Mbc", "isContinuumEvent"],
83  filename="ContinuumSuppression.root",
84  treename="tree",
85  path=main,
86 )
87 
88 b2.process(main)
def stdPi0s(listtype="eff60_May2020", path=None, beamBackgroundMVAWeight="", fakePhotonMVAWeight="", biasCorrectionTable="")
Definition: stdPi0s.py:22