15 An example script to find a specific decay chain at MC level.
19 from modularAnalysis
import fillParticleListFromMC, inputMdst, reconstructMCDecay, variablesToNtuple
20 from variables
import variables
as vm
22 basf2.set_log_level(basf2.LogLevel.DEBUG)
24 mypath = basf2.create_path()
25 testinput = basf2.find_file(
'analysis/tests/mdst.root')
26 inputMdst(testinput, path=mypath)
28 fillParticleListFromMC(
'K+:primaryMC',
'mcPrimary', path=mypath)
29 fillParticleListFromMC(
'pi+:primaryMC',
'mcPrimary', path=mypath)
30 fillParticleListFromMC(
'e+:primaryMC',
'mcPrimary', path=mypath)
31 fillParticleListFromMC(
'nu_e:primaryMC',
'mcPrimary', path=mypath)
32 fillParticleListFromMC(
'gamma:primaryMC',
'mcPrimary', path=mypath)
34 reconstructMCDecay(
'pi0:gg =direct=> gamma:primaryMC gamma:primaryMC',
'', path=mypath)
36 'B+:DstENu =direct=> [anti-D*0 =direct=> [anti-D0 =direct=> K+:primaryMC pi-:primaryMC pi0:gg] pi0:gg ]\
37 e+:primaryMC nu_e:primaryMC ',
53 interesting_variables = [
'isSignal',
"Mbc",
"deltaE",
"mcErrors"]
60 print(basf2.statistics)