Belle II Software
release-08-01-10
opticalGun.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
# ---------------------------------------------------------------
13
# Example of usage of the OpticalGun module.
14
# It simulates two sources at the left and right side of prism,
15
# outside quartz, pointed towards the PMTs
16
# ---------------------------------------------------------------
17
18
import
basf2
as
b2
19
20
# Create path
21
main = b2.create_path()
22
23
24
# Set number of events to generate
25
main.add_module(
'EventInfoSetter'
,
26
expList=[1003],
# 0 for nominal phase 3, 1002 for phase II, 1003 for early phase III
27
evtNumList=[10])
28
29
# Gearbox
30
main.add_module(
'Gearbox'
)
31
32
# Geometry
33
main.add_module(
'Geometry'
)
34
35
# Optical sources
36
main.add_module(
'OpticalGun'
,
37
maxAlpha=45.0,
38
na=0.5,
39
startTime=0,
40
pulseWidth=10.0e-3,
# laser time Jitter, in ns
41
numPhotons=10,
42
diameter=10.0e-3,
# source diameter in cm
43
slotID=5,
# if nonzero, local (slot) referenc frame is used, otherwise Belle II
44
x=-22.6,
45
y=0.0,
46
z=-129.9,
47
phi=0.0,
48
theta=180.0,
49
psi=0.0,
50
angularDistribution=
'Gaussian'
)
51
main.add_module(
'OpticalGun'
,
52
maxAlpha=45.0,
53
na=0.5,
54
startTime=0,
55
pulseWidth=10.0e-3,
56
numPhotons=10,
57
diameter=10.0e-3,
58
slotID=5,
59
x=22.6,
60
y=0.0,
61
z=-129.9,
62
phi=0.0,
63
theta=180.0,
64
psi=0.0,
65
angularDistribution=
'Gaussian'
)
66
67
# Simulation
68
main.add_module(
'FullSim'
)
69
70
# TOP digitization
71
main.add_module(
'TOPDigitizer'
)
72
73
# Output
74
main.add_module(
'RootOutput'
,
75
outputFileName=
'opticalGun.root'
)
76
77
# Show progress of processing
78
main.add_module(
'Progress'
)
79
80
# Process events
81
b2.process(main)
82
83
# Print call statistics
84
print(b2.statistics)
top
examples
opticalGun.py
Generated on Mon Sep 23 2024 14:04:32 for Belle II Software by
1.9.1