33from generators
import add_evtgen_generator
34from simulation
import add_simulation
35from tracking
import add_tracking_reconstruction
36import modularAnalysis
as ma
38b2.set_random_seed(1509)
54print(
'Performance evaluated on: ')
55print(
'simulation: ' + roi +
' ' + bkg)
56print(
'reconstruction: ' + vxdtf)
59root_file_name_TRK =
'./' + release +
'/oneshotTV_TRK_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
60root_file_name_V0 =
'./' + release +
'/oneshotTV_V0_analysis_' + roi +
'_' + bkg +
'_' + vxdtf +
'_' + release +
'.root'
63usePXDDataReduction =
True
67 usePXDDataReduction =
False
70 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
71if bkg ==
'std2GsmallBKG':
72 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
73 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*usual.root')
75 bkgFiles = glob.glob(
'/sw/belle2/bkg/*.root')
76 bkgFiles = bkgFiles + glob.glob(
'/sw/belle2/bkg.twoPhoton/*.root')
80path = b2.create_path()
82eventinfosetter = b2.register_module(
'EventInfoSetter')
83eventinfosetter.param(
'expList', [0])
84eventinfosetter.param(
'runList', [1])
86progress = b2.register_module(
'Progress')
88v0matcher = b2.register_module(
'MCV0Matcher')
89v0matcher.param(
'V0ColName',
'V0ValidationVertexs')
90v0matcher.logging.log_level = b2.LogLevel.INFO
92create_plots_TRK = b2.register_module(
'TrackingPerformanceEvaluation')
93create_plots_TRK.param(
'outputFileName', root_file_name_TRK)
94create_plots_TRK.logging.log_level = b2.LogLevel.INFO
97create_plots_V0 = b2.register_module(
'V0findingPerformanceEvaluation')
98create_plots_V0.param(
'outputFileName', root_file_name_V0)
99create_plots_V0.logging.log_level = b2.LogLevel.INFO
102 particleGunModule = b2.register_module(
'ParticleGun')
103 particleGunModule.param({
104 'pdgCodes': [211, -211],
106 'varyNTracks':
False,
107 'momentumGeneration':
'uniformpt',
108 'momentumParams': [0.5, 1.],
109 'thetaGeneration':
'uniform',
110 'thetaParams': [60., 60.],
112 path.add_module(
'EventInfoSetter')
113 path.add_module(particleGunModule)
115 ma.setupEventInfo(100, path)
116 add_evtgen_generator(path,
'signal',
None)
118path.add_module(progress)
120add_simulation(path,
None, bkgFiles,
None, 1.0, usePXDDataReduction)
122add_tracking_reconstruction(
126 mcTrackFinding=mcTrackFinding,
127 skipGeometryAdding=
False
131modList = path.modules()
132for modItem
in modList:
133 if modItem.name() ==
'V0Finder':
134 modItem.param(
'Validation',
True)
135path.add_module(v0matcher)
137path.add_module(create_plots_TRK)
138path.add_module(create_plots_V0)