13 import simulation
as sim
14 import reconstruction
as reco
15 import modularAnalysis
as ana
16 import beamparameters
as beam
17 import generators
as gen
20 main = basf2.create_path()
23 main.add_module(
"EventInfoSetter")
24 main.add_module(
"Gearbox")
25 main.add_module(
"Geometry")
26 main.add_module(
"HistoManager", histoFileName=
"CollectorOutput.root")
27 beam.add_beamparameters(main,
'Y4S',
None, vertex=[0., 0., 0.])
29 gen.add_evtgen_generator(main, finalstate=
'signal', signaldecfile=
'/home/tadeas/belle2/clean_master/decfiles/dec/1111440100.dec')
31 sim.add_simulation(main)
32 reco.add_reconstruction(main, pruneTracks=
False, add_muid_hits=
True)
33 main.add_module(
'DAFRecoFitter')
35 ana.fillParticleList(
'mu+:Jpsi',
'muonID > 0.1', writeOut=
True, path=main)
36 ana.fillParticleList(
'pi+:K_S0',
'pionID > 0.1', writeOut=
True, path=main)
37 ana.reconstructDecay(
'J/psi:mumu -> mu-:Jpsi mu+:Jpsi',
'InvM > 2.9969 and InvM < 3.1969', writeOut=
True, path=main)
38 ana.reconstructDecay(
'K_S0:pipi -> pi-:K_S0 pi+:K_S0',
'InvM > 0.44761 and InvM < 0.54761', writeOut=
True, path=main)
40 ana.vertexRaveDaughtersUpdate(
'J/psi:mumu', 0.0, path=main, silence_warning=
True)
41 ana.vertexRaveDaughtersUpdate(
'K_S0:pipi', 0.0, path=main, silence_warning=
True)
43 ana.printVariableValues(
'J/psi:mumu', [
'InvM'], path=main)
44 ana.printVariableValues(
'K_S0:pipi', [
'InvM'], path=main)
46 m1 = main.add_module(
'VariablesToEventBasedTree', fileName=
'Jpsi.root',
47 particleList=
'J/psi:mumu',
48 variables=[
'InvM',
'Ecms',
49 'daughter(0, p)',
'daughter(1, p)'],
50 event_variables=[
'nTracks',
'expNum',
'runNum',
'evtNum'])
51 main.add_module(
'VariablesToEventBasedTree', fileName=
'K_S0.root',
52 particleList=
'K_S0:pipi',
53 variables=[
'InvM',
'Ecms',
54 'daughter(0, p)',
'daughter(1, p)'],
55 event_variables=[
'nTracks',
'expNum',
'runNum',
'evtNum'])
59 twoBodyDecays=[
'K_S0:pipi',
'J/psi:mumu'], tracks=[], primaryVertices=[],
63 main.add_module(
'RootOutput')
64 main.add_module(
"Progress")
66 basf2.print_path(main)
68 print(basf2.statistics)