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