19from basf2
import create_path, process, statistics, conditions
25 print(
"usage: basf2", argvs[0],
"experiment run [fileNumber] -n <num_of_events>")
27experiment = int(argvs[1])
31 num =
'MC-' + argvs[3]
34expRun = f
'{experiment:04d}' +
'.' + f
'{run:05d}'
35filename = f
"top.{expRun}.{num}.sroot"
38conditions.append_globaltag(
'patch_main_release-07_noTOP')
40 conditions.append_globaltag(
'data_reprocessing_proc13')
42 conditions.append_globaltag(
'data_reprocessing_prompt')
43conditions.append_globaltag(
'online')
46def addLaserSource(x, angle, slotID, path):
48 Adds a laser source to the path
49 :param x local x coordinate of source in the local frame
50 :param angle vertical tilt of the source
51 :param slotID 1-16, slot number. If it
's 0, then all the coorinates are in the BelleII frame :param path path
53 path.add_module('OpticalGun',
68 angularDistribution=
'uniform'
77main.add_module(
'EventInfoSetter', expList=[experiment], runList=[run])
80main.add_module(
'Gearbox')
83main.add_module(
'Geometry')
86main.add_module(
'TOPCalPulseGenerator', asicChannels=[0])
89for slot
in range(1, 17):
90 for pos
in [0.9, 5.7, 11.3, 16.9, 22.5, 28.1, 33.7, 39.3, 44.1]:
93 addLaserSource(x, angle, slot, main)
96main.add_module(
'FullSim')
99main.add_module(
'TOPDigitizer', lookBackWindows=28)
102main.add_module(
'TOPPacker')
105main.add_module(
'SeqRootOutput', saveObjs=[
'EventMetaData',
'RawTOPs'], outputFileName=filename)
108main.add_module(
'Progress')