32from basf2
import conditions
as b2conditions
37branches = [
'SVDShaperDigits',
'SVDShaperDigitsFromTracks',
'EventT0']
39trk_outputFile =
"TrackFilterControlNtuples_" + localdb +
".root"
46 "/group/belle2/dataprod/Data/release-03-02-02/DB00000635/proc00000009/\
47e0008/4S/r01309/skim/hlt_bhabha/cdst/sub00/cdst.physics.0008.01309.HLT*"
50if filename.rfind(".root") != -1:
51 inputFileList.append(filename)
53 with open(filename,
'r')
as f:
54 inputFileList = [line.strip()
for line
in f]
57b2conditions.prepend_globaltag("online")
58b2conditions.prepend_globaltag("data_reprocessing_prompt")
59if '_CHECK' not in localdb:
60 b2conditions.prepend_globaltag('svd_NOCoGCorrections')
61 if os.path.isdir(localdb):
62 print(
'WARNING, you are using CoG corrections in ' + localdb +
' exiting')
65 b2conditions.testing_payloads = [str(localdb)]
67 localdb = localdb.split(
'_')
68 if not os.path.isdir(localdb[0]):
69 print(
'WARNING, the localDB ' + localdb[0] +
' containing the corrections is missing, exiting.')
72 b2conditions.testing_payloads = [str(localdb)]
74 if os.path.isdir(localdb):
75 print(
'WARNING, you are using CoG corrections in ' + localdb +
' exiting')
78 b2conditions.testing_payloads = [str(localdb)]
81main = b2.create_path()
83rootinput = b2.register_module(
'RootInput')
84rootinput.param(
'inputFileNames', inputFileList)
85rootinput.param(
'branchNames', branches)
86main.add_module(rootinput)
88main.add_module(
"Gearbox")
89main.add_module(
"Geometry", useDB=
True)
92trkFlt = b2.register_module(
'TrackFilter')
93trkFlt.param(
'outputFileName', trk_outputFile)
94trkFlt.param(
'outputINArrayName',
'SelectedTracks')
95trkFlt.param(
'outputOUTArrayName',
'ExcludedTracks')
96trkFlt.param(
'min_NumHitSVD', nSVD)
97trkFlt.param(
'min_NumHitCDC', nCDC)
98trkFlt.param(
'min_Pvalue', pVal)
108for moda
in main.modules():
109 if moda.name() ==
'SVDCoGTimeEstimator':
110 moda.param(
"ShaperDigits",
'SVDShaperDigitsFromTracks')
111 moda.param(
"RecoDigits",
'SVDRecoDigitsFromTracks')
112 if moda.name() ==
'SVDSimpleClusterizer':
113 moda.param(
"Clusters",
'SVDClustersFromTracks')
114 moda.param(
"RecoDigits",
'SVDRecoDigitsFromTracks')
115 if moda.name() ==
'SVDSpacePointCreator':
116 moda.param(
"SVDClusters",
'SVDClustersFromTracks')
118calib = SVDCoGTimeCalibrationImporterModule()
119calib.set_localdb(localdb)
120calib.notApplyCorrectForCDCLatency(
False)
121main.add_module(calib)
124progress = b2.register_module(
'ProgressBar')
125main.add_module(progress)
def add_svd_reconstruction(path, isROIsimulation=False, createRecoDigits=False, applyMasking=False)