20def addSource(x, angle, slotID, path):
22 Adds a laser source to the path
23 @param x local x coordinate of teh source in the bar frame
24 @param angle vertical tilt of the source
25 @param slotID 1-16, slot number. If it's 0, then all the coorinates are in the BelleII frame
27 path.add_module(
'OpticalGun',
42 angularDistribution=
'uniform'
48main = b2.create_path()
52main.add_module(
'EventInfoSetter',
57main.add_module(
'Gearbox')
60main.add_module(
'Geometry')
63for slotId
in range(1, 17):
64 for pos
in [0.9, 5.7, 11.3, 16.9, 22.5, 28.1, 33.7, 39.3, 44.1]:
67 addSource(x, angle, slotId, main)
70main.add_module(
'FullSim')
73main.add_module(
'TOPDigitizer')
76main.add_module(
'RootOutput',
77 outputFileName=
'opticalGun.root',
78 additionalBranchNames=[
'TOPSimPhotons',
'TOPSimHitsToTOPSimPhotons'])
81main.add_module(
'Progress')
84b2.process(main, calculateStatistics=
True)