Belle II Software  release-05-01-25
090_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  environmentType="default",
11  filelist=[
12  b2.find_file("starterkit/2021/B02ks0pi0_sample.root",
13  data_type="examples"),
14  b2.find_file("starterkit/2021/uubar_sample.root",
15  data_type="examples"),
16  ],
17  path=main,
18 )
19 
20 stdPi0s.stdPi0s(path=main, listtype="eff60_Jan2020")
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_Jan2020",
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 ]
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)
stdPi0s.stdPi0s
def stdPi0s(listtype='eff60_Jan2020', path=None)
Definition: stdPi0s.py:19