Package madgraph :: Package interface :: Module amcatnlo_run_interface :: Class aMCatNLOCmd
[hide private]
[frames] | no frames]

Class aMCatNLOCmd

source code

                           object --+            
                                    |            
       common_run_interface.HelpToCmd --+        
                                        |        
                           object --+   |        
                                    |   |        
common_run_interface.CheckValidForCmd --+        
                                        |        
                       object --+       |        
                                |       |        
            extended_cmd.CheckCmd --+   |        
                                    |   |        
                       object --+   |   |        
                                |   |   |        
             extended_cmd.HelpCmd --+   |        
                                    |   |        
                       object --+   |   |        
                                |   |   |        
         extended_cmd.CompleteCmd --+   |        
                                    |   |        
                      cmd.Cmd --+   |   |        
                                |   |   |        
            extended_cmd.BasicCmd --+   |        
                                    |   |        
                     extended_cmd.Cmd --+        
                                        |        
        common_run_interface.CommonRunCmd --+    
                                            |    
                                  CmdExtended --+
                                                |
                                   object --+   |
                                            |   |
                                    HelpToCmd --+
                                                |
                               object --+       |
                                        |       |
                         CheckValidForCmd --+   |
                                            |   |
                               CompleteForCmd --+
                                                |
                               object --+       |
                                        |       |
           common_run_interface.HelpToCmd --+   |
                                            |   |
                               object --+   |   |
                                        |   |   |
    common_run_interface.CheckValidForCmd --+   |
                                            |   |
                           object --+       |   |
                                    |       |   |
                extended_cmd.CheckCmd --+   |   |
                                        |   |   |
                           object --+   |   |   |
                                    |   |   |   |
                 extended_cmd.HelpCmd --+   |   |
                                        |   |   |
                           object --+   |   |   |
                                    |   |   |   |
             extended_cmd.CompleteCmd --+   |   |
                                        |   |   |
                          cmd.Cmd --+   |   |   |
                                    |   |   |   |
                extended_cmd.BasicCmd --+   |   |
                                        |   |   |
                         extended_cmd.Cmd --+   |
                                            |   |
            common_run_interface.CommonRunCmd --+
                                                |
                                               aMCatNLOCmd
Known Subclasses:

The command line processor of MadGraph

Nested Classes [hide private]

Inherited from CmdExtended: ConfigurationError, InvalidCmd

Instance Methods [hide private]
 
__init__(self, me_dir=None, options={}, *completekey, **stdin)
add information to the cmd
source code
 
do_shower(self, line)
run the shower on a given parton level file
source code
 
do_plot(self, line)
Create the plot for a given run
source code
 
do_calculate_xsect(self, line)
Main commands: calculates LO/NLO cross-section, using madevent_mintFO this function wraps the do_launch one
source code
 
do_banner_run(self, line)
Make a run from the banner file
source code
 
do_generate_events(self, line)
Main commands: generate events this function just wraps the do_launch one
source code
 
do_treatcards(self, line, amcatnlo=True)
Advanced commands: this is for creating the correct run_card.inc from the nlo format
source code
 
set_configuration(self, amcatnlo=True, **opt)
assign all configuration variable from file loop over the different config file if config_file not define
source code
 
do_launch(self, line, options={}, argss=[], switch={})
Main commands: launch the full chain options and args are relevant if the function is called from other functions, such as generate_events or calculate_xsect mode gives the list of switch needed for the computation (usefull for banner_run)
source code
 
do_compile(self, line)
Advanced commands: just compile the executables
source code
 
print_results_in_shell(self, data)
Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults
source code
 
print_results_in_file(self, data, path, mode='w')
Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults
source code
 
update_random_seed(self)
Update random number seed with the value from the run_card.
source code
 
get_characteristics(self, file)
reads the proc_characteristics file and initialises the correspondant dictionary
source code
 
run(self, mode, options)
runs aMC@NLO.
source code
 
applgrid_combine(self, cross, error)
Combines the APPLgrids in all the SubProcess/P*/all_G*/ directories
source code
 
applgrid_distribute(self, options, mode, p_dirs)
Distributes the APPLgrids ready to be filled by a second run of the code
source code
 
collect_log_files(self, folders, istep)
collect the log files and put them in a single, html-friendly file inside the run_...
source code
 
read_results(self, output, mode)
extract results (cross-section, absolute cross-section and errors) from output, which should be formatted as Found 4 correctly terminated jobs random seed found in 'randinit' is 33 Integrated abs(cross-section) 7.94473937e+03 +- 2.9953e+01 (3.7702e-01%) Integrated cross-section 6.63392298e+03 +- 3.7669e+01 (5.6782e-01%) for aMC@NLO/aMC@LO, and as
source code
 
print_summary(self, options, step, mode, scale_pdf_info={})
print a summary of the results contained in self.cross_sect_dict.
source code
 
archive_files(self, evt_path, mode)
Copies in the Events/Run_<xxx> directory relevant files characterizing the run.
source code
 
compile_advanced_stats(self, log_GV_files, all_log_files, message)
This functions goes through the log files given in arguments and compiles statistics about MadLoop stability, virtual integration optimization and detection of potential error messages into a nice debug message to printed at the end of the run
source code
 
reweight_and_collect_events(self, options, mode, nevents, event_norm)
this function calls the reweighting routines and creates the event file in the Event dir.
source code
 
run_mcatnlo(self, evt_file)
runs mcatnlo on the generated event file, to produce showered-events
source code
 
set_run_name(self, name, tag=None, level='parton', reload_card=False)
define the run name, the run_tag, the banner and the results.
source code
 
store_result(self)
tar the pythia results.
source code
 
get_init_dict(self, evt_file)
reads the info in the init block and returns them in a dictionary
source code
 
banner_to_mcatnlo(self, evt_file)
creates the mcatnlo input script using the values set in the header of the event_file.
source code
 
run_reweight(self, only)
runs the reweight_xsec_events eecutables on each sub-event file generated to compute on the fly scale and/or PDF uncertainities
source code
 
pdf_scale_from_reweighting(self, evt_files)
This function takes the files with the scale and pdf values written by the reweight_xsec_events.f code (P*/G*/pdf_scale_dependence.dat) and computes the overall scale and PDF uncertainty (the latter is computed using the Hessian method (if lhaid<90000) or Gaussian (if lhaid>90000)) and returns it in percents.
source code
 
wait_for_complete(self, run_type)
this function waits for jobs on cluster to complete their run.
source code
 
run_all(self, job_dict, arg_list, run_type='monitor', split_jobs=False)
runs the jobs in job_dict (organized as folder: [job_list]), with arguments args
source code
 
check_event_files(self)
check the integrity of the event files after splitting, and resubmit those which are not nicely terminated
source code
 
find_jobs_to_split(self, pdir, job, arg)
looks into the nevents_unweighed_splitted file to check how many split jobs are needed for this (pdir, job).
source code
 
run_exe(self, exe, args, run_type, cwd=None)
this basic function launch locally/on cluster exe with args as argument.
source code
 
getIO_ajob(self, exe, cwd, args) source code
 
write_madinMMC_file(self, path, run_mode, mint_mode)
writes the madinMMC_?.2 file
source code
 
write_madin_file(self, path, run_mode, vegas_mode, npoints, niters, accuracy='0')
writes the madin.run_mode file
source code
 
compile(self, mode, options)
compiles aMC@NLO to compute either NLO or NLO matched to shower, as specified in mode
source code
 
donothing(*args) source code
 
check_tests(self, test, dir)
just call the correct parser for the test log
source code
 
parse_test_mx_log(self, log)
read and parse the test_ME/MC.log file
source code
 
parse_check_poles_log(self, log)
reads and parse the check_poles.log file
source code
 
write_test_input(self, test)
write the input files to run test_ME/MC or check_poles
source code
 
find_model_name(self)
return the model name
source code
 
ask_run_configuration(self, mode, options, switch={})
Ask the question when launching generate_events/multi_run
source code

Inherited from CmdExtended: get_history_header, nice_config_error, nice_error_handling, nice_user_error, postcmd, stop_on_keyboard_stop

Inherited from HelpToCmd: help_banner_run, help_calculate_xsect, help_compile, help_generate_events, help_launch, help_open, help_shower, run_options_help

Inherited from CompleteForCmd: complete_banner_run, complete_calculate_xsect, complete_compile, complete_delphes, complete_generate_events, complete_launch, complete_pgs, complete_plot, complete_shower

Inherited from common_run_interface.CommonRunCmd: add_error_log_in_html, ask_edit_cards, check_param_card, complete_check_events, complete_compute_widths, complete_decay_events, complete_print_results, configure_run_mode, copy_lhapdf_set, create_plot, do_EOF, do_check_events, do_compute_widths, do_decay_events, do_delphes, do_exit, do_open, do_pgs, do_print_results, do_quit, do_set, get_available_tag, get_lhapdf_pdfsets_list, get_lhapdf_pdfsetsdir, get_lhapdf_version, get_pdf_input_filename, get_pid_final_states, help_print_result, install_lhapdf_pdfset, keep_cards, link_lhapdf, post_set, run_hep2lhe, split_arg, update_status

Inherited from common_run_interface.HelpToCmd: help_compute_widths, help_decay_events, help_delphes, help_pgs, help_plot, help_pythia, help_set, help_treatcards

Inherited from common_run_interface.CheckValidForCmd: check_check_events, check_compute_widths, check_decay_events, check_open, check_set, check_treatcards, get_events_path

Inherited from extended_cmd.Cmd: ask, avoid_history_duplicate, check_answer_in_input_file, check_import, default, define_child_cmd_interface, do_display, do_help, do_history, do_import, do_save, emptyline, exec_cmd, get_stored_line, import_command_file, onecmd, onecmd_orig, postloop, precmd, run_cmd, store_line, write_configuration

Inherited from extended_cmd.CheckCmd: check_history, check_save

Inherited from extended_cmd.HelpCmd: help_EOF, help_display, help_help, help_history, help_quit, help_save

Inherited from extended_cmd.CompleteCmd: complete_display, complete_history, complete_save

Inherited from CheckValidForCmd: check_banner_run, check_calculate_xsect, check_compile, check_delphes, check_generate_events, check_launch, check_pgs, check_plot, check_shower

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extended_cmd.BasicCmd: complete, deal_multiple_categories, getTerminalSize, preloop, print_suggestions

Inherited from cmd.Cmd: cmdloop, columnize, complete_help, completedefault, completenames, get_names, parseline, print_topics

Static Methods [hide private]

Inherited from common_run_interface.CommonRunCmd: ask_edit_card_static, detect_card_type, find_available_run_name

Inherited from extended_cmd.Cmd: timed_input

Inherited from extended_cmd.BasicCmd: list_completion, path_completion

Class Variables [hide private]
  true = ['T', '.true.', True, 'true']
  _run_options = ['--cluster', '--multicore', '--nb_core=', '--n...
  _generate_options = ['-f', '--laststep=parton', '--laststep=py...
  _calculate_decay_options = ['-f', '--accuracy=0.']
  _set_options = ['stdout_level', 'fortran_compiler', 'cpp_compi...
  _plot_mode = ['all', 'parton', 'shower', 'pgs', 'delphes']
  _clean_mode = ['all', 'parton', 'shower', 'pgs', 'delphes', 'c...
  _display_opts = ['run_name', 'options', 'variable']
  web = False
  cluster_mode = 0
  queue = 'madgraph'
  nb_core = None
hash(x)
  next_possibility = {'generate_events': ['generate_events [OPTI...

Inherited from CmdExtended: config_debug, debug_output, error_debug, keyboard_stop_msg

Inherited from common_run_interface.CommonRunCmd: helporder, options_configuration, options_madevent, options_madgraph

Inherited from extended_cmd.Cmd: history_header

Inherited from cmd.Cmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, me_dir=None, options={}, *completekey, **stdin)
(Constructor)

source code 

add information to the cmd

Overrides: cmd.Cmd.__init__

do_treatcards(self, line, amcatnlo=True)

source code 

Advanced commands: this is for creating the correct run_card.inc from the nlo format

Overrides: common_run_interface.CommonRunCmd.do_treatcards

set_configuration(self, amcatnlo=True, **opt)

source code 

assign all configuration variable from file loop over the different config file if config_file not define

Overrides: common_run_interface.CommonRunCmd.set_configuration

update_random_seed(self)

source code 

Update random number seed with the value from the run_card. If this is 0, update the number according to a fresh one

run(self, mode, options)

source code 

runs aMC@NLO. Returns the name of the event file created

collect_log_files(self, folders, istep)

source code 

collect the log files and put them in a single, html-friendly file inside the run_... directory

read_results(self, output, mode)

source code 
extract results (cross-section, absolute cross-section and errors)
from output, which should be formatted as
    Found 4 correctly terminated jobs 
    random seed found in 'randinit' is 33
    Integrated abs(cross-section)
    7.94473937e+03 +- 2.9953e+01  (3.7702e-01%)
     Integrated cross-section
    6.63392298e+03 +- 3.7669e+01  (5.6782e-01%)
for aMC@NLO/aMC@LO, and as

for NLO/LO
The cross_sect_dict is returned

print_summary(self, options, step, mode, scale_pdf_info={})

source code 

print a summary of the results contained in self.cross_sect_dict. step corresponds to the mintMC step, if =2 (i.e. after event generation) some additional infos are printed

reweight_and_collect_events(self, options, mode, nevents, event_norm)

source code 

this function calls the reweighting routines and creates the event file in the Event dir. Return the name of the event file created

store_result(self)

source code 

tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore

Overrides: common_run_interface.CommonRunCmd.store_result

banner_to_mcatnlo(self, evt_file)

source code 

creates the mcatnlo input script using the values set in the header of the event_file. It also checks if the lhapdf library is used

pdf_scale_from_reweighting(self, evt_files)

source code 

This function takes the files with the scale and pdf values written by the reweight_xsec_events.f code (P*/G*/pdf_scale_dependence.dat) and computes the overall scale and PDF uncertainty (the latter is computed using the Hessian method (if lhaid<90000) or Gaussian (if lhaid>90000)) and returns it in percents. The expected format of the file is: n_scales xsec_scale_central xsec_scale1 ... n_pdf xsec_pdf0 xsec_pdf1 ....

find_jobs_to_split(self, pdir, job, arg)

source code 

looks into the nevents_unweighed_splitted file to check how many split jobs are needed for this (pdir, job). arg is F, B or V

compile(self, mode, options)

source code 

compiles aMC@NLO to compute either NLO or NLO matched to shower, as specified in mode

Overrides: extended_cmd.Cmd.compile

Class Variable Details [hide private]

_run_options

Value:
['--cluster', '--multicore', '--nb_core=', '--nb_core=2', '-c', '-m']

_generate_options

Value:
['-f',
 '--laststep=parton',
 '--laststep=pythia',
 '--laststep=pgs',
 '--laststep=delphes']

_set_options

Value:
['stdout_level', 'fortran_compiler', 'cpp_compiler', 'timeout']

_clean_mode

Value:
['all', 'parton', 'shower', 'pgs', 'delphes', 'channel', 'banner']

next_possibility

Value:
{'generate_events': ['generate_events [OPTIONS]', 'shower'],
 'launch': ['launch [OPTIONS]', 'shower'],
 'shower': ['generate_events [OPTIONS]'],
 'start': ['generate_events [OPTIONS]',
           'calculate_crossx [OPTIONS]',
           'launch [OPTIONS]',
           'help generate_events']}