15 An example script to reconstruct unspecified particles and the use of MC
16 matching tools for inclusive analyses with sum-of-exclusive method.
20 from modularAnalysis
import inputMdst, reconstructDecay, matchMCTruth, \
21 copyLists, variablesToNtuple
23 from variables
import variables
as vm
24 from stdCharged
import stdE, stdK, stdPi
25 from stdPi0s
import stdPi0s
27 mypath = basf2.create_path()
28 testinput = basf2.find_file(
'analysis/tests/mdst.root')
29 inputMdst(testinput, path=mypath)
32 stdE(
"loose", path=mypath)
33 stdK(
"loose", path=mypath)
34 stdPi(
"loose", path=mypath)
36 reconstructDecay(
"@Xsd:0 -> K+:loose pi-:loose",
"", path=mypath)
37 reconstructDecay(
"@Xsd:1 -> K+:loose pi-:loose pi0:all",
"", path=mypath)
39 copyLists(
"Xsd:comb", [
"Xsd:0",
"Xsd:1"], path=mypath)
42 reconstructDecay(
"B0:inclusive -> Xsd:comb e+:loose e-:loose",
43 "5.2 < Mbc < 5.3", path=mypath)
45 matchMCTruth(
"B0:inclusive", path=mypath)
47 interesting_variables = [
'isSignal',
"Mbc",
"deltaE",
"isUnspecified"]
48 interesting_variables += create_aliases_for_selected(
49 [
"px",
"py",
"pz",
"E",
"isSignal",
"mcErrors",
"isUnspecified"],
50 "B0:inclusive -> ^Xsd:comb ^e+:loose ^e-:loose")
57 print(basf2.statistics)