25 from simulation
import add_simulation
28 b2.set_random_seed(1509)
38 usePXDDataReduction =
True
41 usePXDDataReduction =
False
46 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
47 if bkg ==
'std2GsmallBKG':
48 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
49 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*usual.root')
51 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
52 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*.root')
54 print(
'background: ' + bkg)
55 if(usePXDDataReduction):
56 print(
'simulating PXD Data Reduction')
58 print(
'NOT simulating PXD Data Reduction')
63 input_filename =
'./' + release +
'/TV_data_' + release +
'_1509.root'
64 output_filename =
'./' + release +
'/TV_sim_' + bkg +
'_' + roi +
'_' + release +
'.root'
66 print(output_filename)
68 path = b2.create_path()
70 progress = b2.register_module(
'Progress')
72 root_output = b2.register_module(
'RootOutput')
73 root_output.param(
'outputFileName', output_filename)
75 root_input = b2.register_module(
'RootInput')
76 root_input.param(
'inputFileName', input_filename)
78 path.add_module(root_input)
79 path.add_module(progress)
81 add_simulation(path,
None, bkgFiles,
None, 1.0, usePXDDataReduction)
83 path.add_module(root_output)