Belle II Software light-2406-ragdoll
B2A111-SimulateMuonPairs.py
1#!/usr/bin/env python3
2
3
10
11
21
22import basf2 as b2
23from simulation import add_simulation
24from reconstruction import add_reconstruction
25from beamparameters import add_beamparameters
26from mdst import add_mdst_output
27
28# create path
29main = b2.create_path()
30
31# Setting up number of events to generate
32main.add_module('EventInfoSetter', evtNumList=[10])
33
34beamparameters = add_beamparameters(main, "Y4S")
35beamparameters.param("smearVertex", False)
36beamparameters.param("smearEnergy", False)
37b2.print_params(beamparameters)
38
39# muon pair generator (BABAYAGA.NLO, born only)
40main.add_module('BabayagaNLOInput',
41 FinalState='mm',
42 SearchMax=10000,
43 VacuumPolarization='hlmnt',
44 Order='born',
45 MaxAcollinearity=180.,
46 DebugEnergySpread=5.e-3,
47 ScatteringAngleRange=[15.0, 165.0],
48 VPUncertainty=True)
49
50# detector simulation
51add_simulation(path=main)
52
53# reconstruction
54add_reconstruction(path=main)
55
56# mdst output
57add_mdst_output(
58 path=main,
59 mc=True,
60 filename='B2A111-SimulateMuonPairs.root',
61 additionalBranches=[
62 'MCInitialParticles'])
63
64# display a progress bar while running
65main.add_module('ProgressBar')
66
67# process events and print call statistics
68b2.process(main)
69print(b2.statistics)