34 from generators
import add_evtgen_generator
35 from simulation
import add_simulation
36 from tracking
import add_tracking_reconstruction
37 import modularAnalysis
as ma
39 b2.set_random_seed(1509)
55 print(
'Performance evaluated on: ')
56 print(
'simulation: ' + roi +
' ' + bkg)
57 print(
'reconstruction: ' + vxdtf)
60 root_file_name_TRK =
'./' + release +
'/oneshotTV_TRK_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
61 root_file_name_V0 =
'./' + release +
'/oneshotTV_V0_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
64 usePXDDataReduction =
True
65 mcTrackFinding =
False
68 usePXDDataReduction =
False
71 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
72 if bkg ==
'std2GsmallBKG':
73 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
74 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*usual.root')
76 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
77 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*.root')
81 path = b2.create_path()
83 eventinfosetter = b2.register_module(
'EventInfoSetter')
84 eventinfosetter.param(
'expList', [0])
85 eventinfosetter.param(
'runList', [1])
87 progress = b2.register_module(
'Progress')
89 v0matcher = b2.register_module(
'MCV0Matcher')
90 v0matcher.param(
'V0ColName',
'V0ValidationVertexs')
91 v0matcher.logging.log_level = b2.LogLevel.INFO
93 create_plots_TRK = b2.register_module(
'TrackingPerformanceEvaluation')
94 create_plots_TRK.param(
'outputFileName', root_file_name_TRK)
95 create_plots_TRK.logging.log_level = b2.LogLevel.INFO
98 create_plots_V0 = b2.register_module(
'V0findingPerformanceEvaluation')
99 create_plots_V0.param(
'outputFileName', root_file_name_V0)
100 create_plots_V0.logging.log_level = b2.LogLevel.INFO
103 particleGunModule = b2.register_module(
'ParticleGun')
104 particleGunModule.param({
105 'pdgCodes': [211, -211],
107 'varyNTracks':
False,
108 'momentumGeneration':
'uniformpt',
109 'momentumParams': [0.5, 1.],
110 'thetaGeneration':
'uniform',
111 'thetaParams': [60., 60.],
113 path.add_module(
'EventInfoSetter')
114 path.add_module(particleGunModule)
116 ma.setupEventInfo(100, path)
117 add_evtgen_generator(path,
'signal',
None)
119 path.add_module(progress)
121 add_simulation(path,
None, bkgFiles,
None, 1.0, usePXDDataReduction)
123 add_tracking_reconstruction(
127 mcTrackFinding=mcTrackFinding,
128 skipGeometryAdding=
False
132 modList = path.modules()
133 for modItem
in modList:
134 if modItem.name() ==
'V0Finder':
135 modItem.param(
'Validation',
True)
136 path.add_module(v0matcher)
138 path.add_module(create_plots_TRK)
139 path.add_module(create_plots_V0)