Belle II Software  release-06-02-00
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  environmentType="default",
12  filelist=[
13  b2.find_file("starterkit/2021/B02ks0pi0_sample.root",
14  data_type="examples"),
15  b2.find_file("starterkit/2021/uubar_sample.root",
16  data_type="examples"),
17  ],
18  path=main,
19 )
20 
21 stdPi0s.stdPi0s(path=main, listtype="eff60_May2020")
22 ma.fillParticleList(
23  decayString="pi+:good", cut="chiProb > 0.001 and pionID > 0.5", path=main
24 )
25 
26 ma.reconstructDecay(
27  decayString="K_S0 -> pi+:good pi-:good", cut="0.480<=M<=0.516", path=main
28 )
29 
30 ma.reconstructDecay(
31  decayString="B0 -> K_S0 pi0:eff60_May2020",
32  cut="5.1 < Mbc < 5.3 and abs(deltaE) < 2",
33  path=main,
34 )
35 
36 ma.buildRestOfEvent(target_list_name="B0", path=main)
37 cleanMask = (
38  "cleanMask",
39  "nCDCHits > 0 and useCMSFrame(p)<=3.2",
40  "p >= 0.05 and useCMSFrame(p)<=3.2",
41 )
42 ma.appendROEMasks(list_name="B0", mask_tuples=[cleanMask], path=main)
43 
44 ma.buildContinuumSuppression(list_name="B0", roe_mask="cleanMask", path=main)
45 
46 simpleCSVariables = [
47  "R2",
48  "thrustBm",
49  "thrustOm",
50  "cosTBTO",
51  "cosTBz",
52 ]
53 
54 ma.variablesToNtuple(
55  decayString="B0",
56  variables=simpleCSVariables + ["Mbc", "isContinuumEvent"],
57  filename="ContinuumSuppression.root",
58  treename="tree",
59  path=main,
60 )
61 
62 b2.process(main)
def stdPi0s(listtype="eff60_May2020", path=None, loadPhotonBeamBackgroundMVA=False)
Definition: stdPi0s.py:17