128
129
""" A helper function to compare processes.
129
130
Note that the chosen_runner is what runner should to create the reference
130
131
pickle if missing"""
132
133
# Print out progress if it is a run for an individual process
133
134
if len(my_proc_list)==1:
134
135
print "\n== %s =="%my_proc_list[0][0]
149
150
# Create a MERunner object for MadLoop 5 optimized
150
151
ML5_opt = loop_me_comparator.LoopMG5Runner()
151
152
ML5_opt.setup(_mg5_path, optimized_output=True, temp_dir=filename)
153
# Create a MERunner object for MadLoop 5 default
154
ML5_default = loop_me_comparator.LoopMG5Runner()
155
ML5_default.setup(_mg5_path, optimized_output=False, temp_dir=filename)
154
file = open(os.path.join(_mg5_path,'Template','loop_material','StandAlone',
155
'Cards','MadLoopParams.dat'), 'r')
157
MLParams = file.read()
158
MLred = re.search(r'#MLReductionLib\n',MLParams)
159
MLredstr=MLParams[MLred.end():MLred.end()+1]
162
# Create a MERunner object for MadLoop 5 default
163
ML5_default = loop_me_comparator.LoopMG5Runner()
164
ML5_default.setup(_mg5_path, optimized_output=False, temp_dir=filename)
157
166
# Create and setup a comparator
158
167
my_comp = loop_me_comparator.LoopMEComparator()
160
169
# Always put the saved run first if you use it, so that the corresponding PS
161
170
# points will be used.
162
if pickle_file != "":
163
my_comp.set_me_runners(stored_runner,ML5_opt,ML5_default)
173
if pickle_file != "":
174
my_comp.set_me_runners(stored_runner,ML5_opt,ML5_default)
176
my_comp.set_me_runners(ML5_opt,ML5_default)
165
my_comp.set_me_runners(ML5_opt,ML5_default)
179
if pickle_file != "":
180
my_comp.set_me_runners(stored_runner,ML5_opt)
182
raise MadGraph5Error,"CANNOT find the stored result with TIR"
167
184
# Run the actual comparison
168
185
my_comp.run_comparison(my_proc_list,