Belle II Software development
hotStripFinder.py
1#!/usr/bin/env python3
2
3
10import basf2 as b2
11from basf2 import conditions as b2conditions
12
13
21
22# set here the correct exp and run number you like to process
23exp = 8
24run = 2265 # 2308 # 2265
25useLauraAlg = True
26searchbaseValue = -1 # default value, use all sensor strips
27setLauraThreshold = 5
28
29runType = ""
30myflag = ""
31
32if run == 2308:
33 runType = "cosmic"
34elif run == 2265:
35 runType = "physics"
36else:
37 print("Check the run number!!")
38
39if searchbaseValue != -1:
40 myflag = "searchBase" + str(searchbaseValue) + "_thr" + str(setLauraThreshold)
41
42# set this string to identify the output rootfiles
43outputfile = "SVDHotStripFinderZS5_exp" + str(exp) + "run" + str(run) + "_V1_" + str(myflag) + ".root"
44if useLauraAlg:
45 outputfile = "SVDHotStripFinderZS5_exp" + str(exp) + "run" + str(run) + "_V2_" + str(myflag) + ".root"
46
47b2conditions.prepend_globaltag("svd_onlySVDinGeoConfiguration")
48b2conditions.prepend_globaltag("data_reprocessing_prompt")
49b2conditions.prepend_globaltag("svd_basic")
50
51main = b2.create_path()
52
53b2.set_random_seed(1)
54
55main.add_module(
56 'RootInput',
57 # inputFileName="~/svd/BII-3221-svd-hot-strip-masking/buc6/r03844/all/cdst/sub00/cdst.physics.0007.03844.HLT*",
58 # luminosity run 2265, exp8, raw data
59 # cosmic run 2308, exp8, raw data
60 inputFileName="/ghi/fs01/belle2/bdata/Data/Raw/e000" + \
61 str(exp) + "/r0" + str(run) + "/sub00/" + str(runType) + ".000" + str(exp) + ".0" + str(run) + ".HLT*",
62 branchNames=['RawSVDs'])
63
64main.add_module('Gearbox')
65main.add_module('Geometry')
66
67# svd reconstruction, excluding SP creator
68main.add_module('SVDUnpacker', svdShaperDigitListName='SVDShaperDigits')
69main.add_module(
70 'SVDZeroSuppressionEmulator',
71 SNthreshold=5,
72 ShaperDigits='SVDShaperDigits',
73 ShaperDigitsIN='SVDShaperDigitsZS5',
74 FADCmode=True)
75
76# default parameters
77main.add_module('SVDHotStripFinder', ShaperDigits='SVDShaperDigitsZS5', outputFileName=outputfile, searchBase=searchbaseValue,
78 threshold=1, absOccThreshold=0.20, relOccPrec=setLauraThreshold, useHSFinderV1=not useLauraAlg)
79
80main.add_module('Progress')
81
82b2.print_path(main)
83
84b2.process(main)
85
86print(b2.statistics)