13import simulation
as sim
14import reconstruction
as reco
15import modularAnalysis
as ana
16import beamparameters
as beam
18main = basf2.create_path()
20main.add_module(
"RootInput")
22main.add_module(
"Gearbox")
23main.add_module(
"Geometry")
24main.add_module(
"HistoManager", histoFileName=
"CollectorOutput.root")
25beam.add_beamparameters(main,
'Y4S', 10.5796, vertex=[0., 0., 0.])
28sim.add_simulation(main)
29reco.add_reconstruction(main, pruneTracks=
False)
32ana.fillParticleList(
'mu+:qed',
'muonID > 0.1 and useCMSFrame(p) > 2.', writeOut=
True, path=main)
33ana.reconstructDecay(
'Z0:mumu -> mu-:qed mu+:qed',
'InvM > 10.5296 and InvM < 10.6296', writeOut=
True, path=main)
35ana.vertexRaveDaughtersUpdate(
'Z0:mumu', 0.0, path=main, silence_warning=
True)
37ana.matchMCTruth(
'mu+:qed', main)
38ana.matchMCTruth(
'Z0:mumu', main)
40ana.printVariableValues(
'Z0:mumu', [
'E',
'deltaE',
'M',
'InvM',
'mcPDG',
'p',
'Ecms'], path=main)
41ana.printVariableValues(
'mu+:qed', [
'E',
'deltaE',
'M',
'mcPDG',
'p',
'muonID'], path=main)
43main.add_module(
'VariablesToEventBasedTree',
44 particleList=
'Z0:mumu',
45 variables=[
'InvM',
'Ecms',
46 'daughter(0, p)',
'daughter(1, p)'],
47 event_variables=[
'nTracks',
'expNum',
'runNum',
'evtNum'])
50 components=[
'beamparameters'],
51 primaryTwoBodyDecays=[
'Z0:mumu'], tracks=[],
55main.add_module(
'RootOutput')
56main.add_module(
"Progress")
60print(basf2.statistics)