13import simulation
as sim
14import reconstruction
as reco
15import modularAnalysis
as ana
16import beamparameters
as beam
17import generators
as gen
20main = basf2.create_path()
23main.add_module(
"EventInfoSetter")
24main.add_module(
"Gearbox")
25main.add_module(
"Geometry")
26main.add_module(
"HistoManager", histoFileName=
"CollectorOutput.root")
27beam.add_beamparameters(main,
'Y4S',
None, vertex=[0., 0., 0.])
29gen.add_evtgen_generator(main, finalstate=
'signal', signaldecfile=
'/home/tadeas/belle2/clean_master/decfiles/dec/1111440100.dec')
31sim.add_simulation(main)
32reco.add_reconstruction(main, pruneTracks=
False, add_muid_hits=
True)
33main.add_module(
'DAFRecoFitter')
35ana.fillParticleList(
'mu+:Jpsi',
'muonID > 0.1', writeOut=
True, path=main)
36ana.fillParticleList(
'pi+:K_S0',
'pionID > 0.1', writeOut=
True, path=main)
37ana.reconstructDecay(
'J/psi:mumu -> mu-:Jpsi mu+:Jpsi',
'InvM > 2.9969 and InvM < 3.1969', writeOut=
True, path=main)
38ana.reconstructDecay(
'K_S0:pipi -> pi-:K_S0 pi+:K_S0',
'InvM > 0.44761 and InvM < 0.54761', writeOut=
True, path=main)
40ana.vertexRaveDaughtersUpdate(
'J/psi:mumu', 0.0, path=main, silence_warning=
True)
41ana.vertexRaveDaughtersUpdate(
'K_S0:pipi', 0.0, path=main, silence_warning=
True)
43ana.printVariableValues(
'J/psi:mumu', [
'InvM'], path=main)
44ana.printVariableValues(
'K_S0:pipi', [
'InvM'], path=main)
46m1 = 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'])
51main.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=[],
63main.add_module(
'RootOutput')
64main.add_module(
"Progress")
68print(basf2.statistics)