20from rawdata
import add_unpackers
21from svd
import add_svd_reconstruction
22from ROOT
import Belle2
27 print(
"usage: basf2", argvs[0],
"expNo runNo globalTag [outputFolder]")
30expNo =
'e' +
'{:0=4d}'.format(int(argvs[1]))
31runNo =
'r' +
'{:0=5d}'.format(int(argvs[2]))
35indir =
'/hsm/belle2/bdata/Data/Raw/' + expNo +
'/' + runNo +
'/sub00'
36files = sorted(glob.glob(indir +
'/*.root'))
38 basf2.B2ERROR(
'No files found in ' + indir)
44outputFile = outdir +
'/beamBkgHitRates-' + expNo +
'-' + runNo +
'.root'
48 ''' select events according to given trigger types '''
51 ''' event processing '''
55 if not trg_summary.isValid():
56 basf2.B2ERROR(
'No TRGSummary available - event ignored')
59 for trgType
in trigTypes:
60 if trg_summary.getTimType() == trgType:
66basf2.conditions.prepend_globaltag(global_tag)
69main = basf2.create_path()
70emptypath = basf2.create_path()
73main.add_module(
'RootInput', inputFileNames=files)
76main.add_module(
'Gearbox')
79main.add_module(
'Geometry')
82main.add_module(
'TRGGDLUnpacker')
83main.add_module(
'TRGGDLSummary')
86main.add_module(
'Progress')
91 main.add_module(selector)
92 selector.if_false(emptypath)
95add_unpackers(path=main,
96 components=[
'PXD',
'SVD',
'CDC',
'ECL',
'TOP',
'ARICH',
'KLM'])
99main.add_module(
'ARICHFillHits')
100main.add_module(
'TOPChannelMasker')
101main.add_module(
'ActivatePXDGainCalibrator')
102main.add_module(
'PXDClusterizer')
103add_svd_reconstruction(main, applyMasking=
True)
105 'SVDZeroSuppressionEmulator',
107 ShaperDigits=
'SVDShaperDigitsUnmasked',
108 ShaperDigitsIN=
'SVDShaperDigitsZS5')
109main.add_module(
'TFCDC_WireHitPreparer',
110 wirePosition=
'aligned',
111 flightTimeEstimation=
'outwards',
112 filter=
'cuts_from_DB')
116 'BeamBkgHitRateMonitor',
117 outputFileName=outputFile,
119 svdShaperDigitsName=
'SVDShaperDigitsZS5',
120 cdcTimeWindowLowerEdgeSmallCell=4720,
121 cdcTimeWindowUpperEdgeSmallCell=5020,
122 cdcTimeWindowLowerEdgeNormalCell=4720,
123 cdcTimeWindowUpperEdgeNormalCell=5020)
129print(basf2.statistics)
a (simplified) python wrapper for StoreObjPtr.