Belle II Software development
093_cs.py
1#!/usr/bin/env python3
2import basf2 as b2
3import modularAnalysis as ma
4import stdPi0s
5from variables import variables as vm
6
7# Perform analysis.
8main = b2.create_path()
9
10ma.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 entrySequences=["1001:2000", "15001:30000"],
18 path=main,
19)
20
21stdPi0s.stdPi0s(path=main, listtype="eff60_May2020")
22ma.fillParticleList(
23 decayString="pi+:good", cut="chiProb > 0.001 and pionID > 0.5", path=main
24)
25
26ma.reconstructDecay(
27 decayString="K_S0 -> pi+:good pi-:good", cut="0.480<=M<=0.516", path=main
28)
29
30ma.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
36ma.buildRestOfEvent(target_list_name="B0", path=main)
37cleanMask = (
38 "cleanMask",
39 "pt > 0.1 and thetaInCDCAcceptance and abs(dz) < 3.0 and dr < 0.5",
40 "E > 0.05 and thetaInCDCAcceptance and abs(clusterTiming) < 200",
41)
42ma.appendROEMasks(list_name="B0", mask_tuples=[cleanMask], path=main)
43
44ma.buildContinuumSuppression(list_name="B0", roe_mask="cleanMask", path=main)
45
46main.add_module(
47 "MVAExpert",
48 listNames=["B0"],
49 extraInfoName="ContinuumProbability",
50 identifier="MVAFastBDT.root", # name of the weightfile used
51)
52
53simpleCSVariables = (
54 [ # We will need these variables later to evaluate the training
55 "R2",
56 "thrustBm",
57 "thrustOm",
58 "cosTBTO",
59 "cosTBz",
60 "KSFWVariables(pt_sum)",
61 "KSFWVariables(mm2)",
62 "KSFWVariables(hso00)",
63 "KSFWVariables(hso01)",
64 "KSFWVariables(hso02)",
65 "KSFWVariables(hso03)",
66 "KSFWVariables(hso04)",
67 "KSFWVariables(hso10)",
68 "KSFWVariables(hso12)",
69 "KSFWVariables(hso14)",
70 "KSFWVariables(hso20)",
71 "KSFWVariables(hso22)",
72 "KSFWVariables(hso24)",
73 "KSFWVariables(hoo0)",
74 "KSFWVariables(hoo1)",
75 "KSFWVariables(hoo2)",
76 "KSFWVariables(hoo3)",
77 "KSFWVariables(hoo4)",
78 "CleoConeCS(1)",
79 "CleoConeCS(2)",
80 "CleoConeCS(3)",
81 "CleoConeCS(4)",
82 "CleoConeCS(5)",
83 "CleoConeCS(6)",
84 "CleoConeCS(7)",
85 "CleoConeCS(8)",
86 "CleoConeCS(9)",
87 ]
88)
89
90vm.addAlias("ContProb", "extraInfo(ContinuumProbability)")
91
92ma.variablesToNtuple(
93 decayString="B0",
94 variables=["ContProb", "isContinuumEvent"] + simpleCSVariables,
95 filename="ContinuumSuppression_applied.root",
96 treename="tree",
97 path=main,
98)
99
100b2.process(main)
stdPi0s(listtype="eff60_May2020", path=None, beamBackgroundMVAWeight="", fakePhotonMVAWeight="", biasCorrectionTable="")
Definition stdPi0s.py:22