29 from simulation
import add_simulation
30 from tracking
import *
31 from modularAnalysis
import *
49 print(
'Performance evaluated on: ')
50 print(
'simulation: ' + roi +
' ' + bkg)
51 print(
'reconstruction: ' + vxdtf)
54 root_file_name_TRK =
'./' + release +
'/oneshotTV_TRK_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
55 root_file_name_V0 =
'./' + release +
'/oneshotTV_V0_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
58 usePXDDataReduction =
True
59 mcTrackFinding =
False
62 usePXDDataReduction =
False
65 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
66 if bkg ==
'std2GsmallBKG':
67 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
68 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*usual.root')
70 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
71 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*.root')
77 eventinfosetter = register_module(
'EventInfoSetter')
78 eventinfosetter.param(
'expList', [0])
79 eventinfosetter.param(
'runList', [1])
81 progress = register_module(
'Progress')
83 v0matcher = register_module(
'MCV0Matcher')
84 v0matcher.param(
'V0ColName',
'V0ValidationVertexs')
85 v0matcher.logging.log_level = LogLevel.INFO
87 create_plots_TRK = register_module(
'TrackingPerformanceEvaluation')
88 create_plots_TRK.param(
'outputFileName', root_file_name_TRK)
89 create_plots_TRK.logging.log_level = LogLevel.INFO
92 create_plots_V0 = register_module(
'V0findingPerformanceEvaluation')
93 create_plots_V0.param(
'outputFileName', root_file_name_V0)
94 create_plots_V0.logging.log_level = LogLevel.INFO
97 particleGunModule = register_module(
'ParticleGun')
98 particleGunModule.param({
99 'pdgCodes': [211, -211],
101 'varyNTracks':
False,
102 'momentumGeneration':
'uniformpt',
103 'momentumParams': [0.5, 1.],
104 'thetaGeneration':
'uniform',
105 'thetaParams': [60., 60.],
107 path.add_module(
'EventInfoSetter')
108 path.add_module(particleGunModule)
110 setupEventInfo(100, path)
111 add_evtgen_generator(path,
'signal',
None)
113 path.add_module(progress)
115 add_simulation(path,
None, bkgFiles,
None, 1.0, usePXDDataReduction)
117 add_tracking_reconstruction(
121 mcTrackFinding=mcTrackFinding,
122 skipGeometryAdding=
False
126 modList = path.modules()
127 for modItem
in modList:
128 if modItem.name() ==
'V0Finder':
129 modItem.param(
'Validation',
True)
130 path.add_module(v0matcher)
132 path.add_module(create_plots_TRK)
133 path.add_module(create_plots_V0)