20 from basf2
import create_path, process, statistics, conditions
26 print(
"usage: basf2", argvs[0],
"experiment run [fileNumber] -n <num_of_events>")
28 experiment = int(argvs[1])
32 num =
'MC-' + argvs[3]
35 expRun =
'{:0=4d}'.format(experiment) +
'.' +
'{:0=5d}'.format(run)
36 filename = f
"top.{expRun}.{num}.sroot"
39 conditions.append_globaltag(
'data_reprocessing_proc11')
42 def addLaserSource(x, angle, slotID, path):
44 Adds a laser source to the path
45 :param x local x coordinate of source in the local frame
46 :param angle vertical tilt of the source
47 :param slotID 1-16, slot number. If it's 0, then all the coorinates are in the BelleII frame
50 path.add_module(
'OpticalGun',
65 angularDistribution=
'uniform'
74 main.add_module(
'EventInfoSetter', expList=[experiment], runList=[run])
77 main.add_module(
'Gearbox')
80 main.add_module(
'Geometry')
83 main.add_module(
'TOPCalPulseGenerator', asicChannels=[0])
86 for slot
in range(1, 17):
87 for pos
in [0.9, 5.7, 11.3, 16.9, 22.5, 28.1, 33.7, 39.3, 44.1]:
90 addLaserSource(x, angle, slot, main)
93 main.add_module(
'FullSim')
96 main.add_module(
'TOPDigitizer', lookBackWindows=28)
99 main.add_module(
'TOPPacker')
102 main.add_module(
'SeqRootOutput', saveObjs=[
'EventMetaData',
'RawTOPs'], outputFileName=filename)
105 main.add_module(
'Progress')