25import simulation
as simu
33# PREPARE YOUR INPUT FILES - ERROR printed at the end does not
35# function provides output rootfile with SVDShaperDigits only
38# 1. link the input raw data in /gpfs/fs02/belle2/group/detector/SVD/overlayFiles/randomTRG/
40# location="/gpfs/fs02/belle2/group/detector/SVD/overlayFiles/randomTRG/*.root"
41# and outputFileTag = ZS3
43# location="/gpfs/fs02/belle2/group/detector/SVD/overlayFiles/randomTRG/*_ZS3.root"
44# and outputFileTag = overlay
45# and outputFileTag = overlayZS with same location
47filelist=glob.glob(location)
49for inputfile in filelist:
50 main = b2.create_path()
51# svdou.prepare_svd_overlay(main, [inputfile],"ZS3")
52 svdou.prepare_svd_overlay(main, [inputfile],"overlay")
53# svdou.prepare_svd_overlay(main, [inputfile],"overlayZS5")
57main = b2.create_path()
62eventinfosetter = b2.register_module(
'EventInfoSetter')
63eventinfosetter.param(
'expList', [0])
64eventinfosetter.param(
'runList', [1])
65eventinfosetter.param(
'evtNumList', [10])
66main.add_module(eventinfosetter)
69main.add_module(
"HistoManager", histoFileName=
"SVDDQMOutput_"+str(tag)+
".root")
72main.add_module(
'EvtGenInput')
75bkgDir =
'/group/belle2/BGFile/OfficialBKG/early_phase3/prerelease-04-00-00a/overlay/phase31/BGx1/set0/*.root'
78 b2.B2ERROR(
'No files found in ', bkgDir)
80simu.add_simulation(main, bkgfiles=bg, usePXDDataReduction=
False, forceSetPXDDataReduction=
True)
82if str(tag) ==
"xTalk" or str(tag) ==
"cosmics" or str(tag) ==
"randomTrigger" or str(tag) ==
"randomTriggerZS5":
83 svdou.overlay_svd_data(main, str(tag))
88 'SVDZeroSuppressionEmulator',
90 ShaperDigits=
'SVDShaperDigits',
91 ShaperDigitsIN=
'SVDShaperDigitsZS5',
93main.add_module(
'SVDDQMExpressReco', offlineZSShaperDigits=
'SVDShaperDigitsZS5')
95main.add_module(
'Progress')
99b2.process(main, calculateStatistics=
True)