14 b2.set_log_level(b2.LogLevel.INFO)
16 input_dir =
'/data/belle2/BG/Jun2014/bg_SVD/'
17 output_dir =
'/data/belle2/BG/Jun2014/bg_SVD/output/'
20 components.append((
'Coulomb_HER', 100))
21 components.append((
'Coulomb_LER', 100))
22 components.append((
'RBB_HER', 100))
23 components.append((
'RBB_LER', 100))
24 components.append((
'Touschek_HER', 100))
25 components.append((
'Touschek_LER', 100))
26 components.append((
'twoPhoton', 200))
28 files = [input_dir + s +
'_' + str(t) +
'us.root' for (s, t)
in components]
30 svd_branches = [
'MCParticles',
'MCParticlesToSVDSimHits',
31 'MCParticlesToSVDTrueHits',
'SVDSimHits',
'SVDTrueHits']
33 input = b2.register_module(
'RootInput')
34 input.param(
'inputFileNames', files)
38 histo = b2.register_module(
'HistoManager')
40 histo.param(
'histoFileName', output_dir +
'SVDBackgroundHisto.root')
43 progress = b2.register_module(
'Progress')
46 gearbox = b2.register_module(
'Gearbox')
48 geometry = b2.register_module(
'Geometry')
49 geometry.param(
'components', [
'SVD'])
52 svdDigi = b2.register_module(
'SVDDigitizer')
53 svdDigi.param(
'ElectronicEffects',
False)
59 svdBkg = b2.register_module(
'SVDBackground')
60 svdBkg.param(
'componentNames', [s
for (s, t)
in components])
61 svdBkg.param(
'componentTimes', [t
for (s, t)
in components])
62 svdBkg.param(
'outputDirectory', output_dir)
64 svdBkg.set_log_level(b2.LogLevel.DEBUG)
65 svdBkg.set_debug_level(10)
68 output = b2.register_module(
'RootOutput')
69 output.param(
'outputFileName', output_dir +
'SVDBackgroundOutput.root')
70 output.param(
'branchNames', [
'SVDEnergyDepositionEvents',
'SVDNeutronFluxEvents'])
73 main = b2.create_path()
76 main.add_module(input)
77 main.add_module(histo)
78 main.add_module(progress)
79 main.add_module(gearbox)
80 main.add_module(geometry)
81 main.add_module(svdDigi)
83 main.add_module(svdBkg)
84 main.add_module(output)