def compare_processes(self, my_proc_list=[], orders={}, model='sm', energy=500, filename="", pickle_file="", tolerance=1e-06): """ For now it's dummy, it's not called here. """ ME6_runner = me_comparator.MG5_UFO_Runner() ME6_runner.setup(MG5DIR, MG5DIR) ME6_runner.store_proc_card = True ME7_runner = me_comparator.MG5_UFO_Runner() ME7_runner.setup(MG5DIR, MG5DIR) ME7_runner.store_proc_card = True if os.path.exists( pjoin(MG5DIR, 'models', 'paralel_test_model_%s' % model)): shutil.rmtree( pjoin(MG5DIR, 'models', 'paralel_test_model_%s' % model)) os.system('cp -rf %s %s' % (pjoin(mg5_path, 'models', model), pjoin(MG5DIR, 'models', 'paralel_test_model_%s' % model))) # Create and setup a comparator my_comp = me_comparator.MEComparator() my_comp.set_me_runners(ME6_runner, ME7_runner) # Run the actual comparison my_comp.run_comparison(my_proc_list, ['paralel_test_model_%s' % model, model], orders, energy) # Print the output if filename: my_comp.output_result(filename=filename) # Store output to a pickle file in the input_files directory if pickle_file: me_comparator.PickleRunner.store_comparison(\ os.path.join(_pickle_path, pickle_file), my_comp.get_non_zero_processes(), my_comp.me_runners[0].model, my_comp.me_runners[0].name, my_comp.me_runners[0].orders, my_comp.me_runners[0].energy) # Assert that all process comparisons passed the tolerance cut my_comp.assert_processes(self, tolerance) # Do some cleanup my_comp.cleanup()
def test_short_heft(self): """Test a minimal list of sm 2->2 processes, mainly to test the test""" # Create a list of processes to check automatically comparisons = me_comparator.PickleRunner.find_comparisons(\ os.path.join(_pickle_path, "mg5_short_paralleltest_heft.pkl")) for stored_runner in comparisons: # Create a MERunner object for MG5 my_mg5 = me_comparator.MG5_UFO_Runner() my_mg5.setup(MG5DIR, MG5DIR) # Create and setup a comparator my_comp = me_comparator.MEComparator() my_comp.set_me_runners(stored_runner, my_mg5) # Run the actual comparison my_comp.run_comparison(stored_runner.proc_list, 'heft', stored_runner.orders, stored_runner.energy) my_comp.assert_processes(self) # Do some cleanup my_comp.cleanup()
def test_short_sqso(self): """Test a short list of processes with squared order constraints""" comparisons = me_comparator.PickleRunner.find_comparisons(\ os.path.join(_pickle_path, "mg5_short_paralleltest_sqso.pkl")) for stored_runner in comparisons: # Create a MERunner object for MG5 my_mg5 = me_comparator.MG5_UFO_Runner() my_mg5.setup(MG5DIR, MG5DIR) # Create and setup a comparator my_comp = me_comparator.MEComparator() my_comp.set_me_runners(stored_runner, my_mg5) # Run the actual comparison my_comp.run_comparison(stored_runner.proc_list, 'sm', stored_runner.orders, stored_runner.energy) my_comp.assert_processes(self) # Do some cleanup my_comp.cleanup()
# fermion, fermion, boson, # initial=2, final_1=2, final_2 = 1) # Set the model we are working with model = 'sm' # Create a MERunner object for MG4 my_mg4 = me_comparator.MG4Runner() my_mg4.setup(mg4_path) # Create a MERunner object for MG5 my_mg5 = me_comparator.MG5Runner() my_mg5.setup(mg5_path, mg4_path) # Create a MERunner object for UFO-ALOHA-MG5 my_mg5_ufo = me_comparator.MG5_UFO_Runner() my_mg5_ufo.setup(mg5_path, mg4_path) # Create a MERunner object for C++ my_mg5_cpp = me_comparator.MG5_CPP_Runner() my_mg5_cpp.setup(mg5_path, mg4_path) # Create and setup a comparator my_comp = me_comparator.MEComparator() my_comp.set_me_runners(my_mg5, my_mg5_ufo) # Run the actual comparison my_comp.run_comparison(my_proc_list, model=model, orders={ 'QED': 99,