Package madgraph :: Package interface :: Module common_run_interface :: Class CommonRunCmd
[hide private]
[frames] | no frames]

Class CommonRunCmd

source code

                      object --+    
                               |    
                       HelpToCmd --+
                                   |
                      object --+   |
                               |   |
                CheckValidForCmd --+
                                   |
                  object --+       |
                           |       |
       extended_cmd.CheckCmd --+   |
                               |   |
                  object --+   |   |
                           |   |   |
        extended_cmd.HelpCmd --+   |
                               |   |
                  object --+   |   |
                           |   |   |
    extended_cmd.CompleteCmd --+   |
                               |   |
              object --+       |   |
                       |       |   |
extended_cmd.OriginalCmd --+   |   |
                           |   |   |
       extended_cmd.BasicCmd --+   |
                               |   |
                extended_cmd.Cmd --+
                                   |
                                  CommonRunCmd
Known Subclasses:

Nested Classes [hide private]
  RunWebHandling

Inherited from extended_cmd.Cmd: ConfigurationError, InvalidCmd

Instance Methods [hide private]
 
__del__(self)
try to remove RunWeb?
source code
 
__init__(self, me_dir, options, *args, **opts)
common
source code
 
add_error_log_in_html(self, errortype=None)
If a ME run is currently running add a link in the html output
source code
 
ask_edit_cards(self, cards, mode='fixed', plot=True, first_cmd=None, from_banner=None, banner=None) source code
 
ask_madanalysis5_run_configuration(self, runtype='parton', mode=None)
Ask the question when launching madanalysis5.
source code
 
check_madanalysis5(self, args, mode='parton')
Check the argument for the madanalysis5 command syntax: madanalysis5_parton [NAME]
source code
 
check_param_card(self, path, run=True, dependent=False)
1) Check that no scan parameter are present 2) Check that all the width are define in the param_card.
source code
 
complete_check_events(self, text, line, begidx, endidx) source code
 
complete_compute_widths(self, text, line, begidx, endidx, formatting=True)
Complete the compute_widths command
source code
 
complete_decay_events(self, text, line, begidx, endidx) source code
 
complete_madanalysis5_hadron(self, text, line, begidx, endidx)
Complete the madanalysis5 command
source code
 
complete_print_results(self, text, line, begidx, endidx)
Complete the print results command
source code
 
complete_reweight(self, text, line, begidx, endidx)
Complete the pythia command
source code
 
complete_systematics(self, text, line, begidx, endidx)
auto completion for the systematics command
source code
 
configure_directory(self, *args, **opts)
All action require before any type of run.
source code
 
configure_run_mode(self, run_mode)
change the way to submit job 0: single core, 1: cluster, 2: multicore
source code
 
copy_lhapdf_set(self, lhaid_list, pdfsets_dir, require_local=True)
copy (if needed) the lhapdf set corresponding to the lhaid in lhaid_list into lib/PDFsets.
source code
 
create_plot(self, mode='parton', event_path=None, output=None, tag=None)
create the plot
source code
 
do_EOF(self, line)
Not in help: exit
source code
 
do_check_events(self, line)
Run some sanity check on the generated events.
source code
 
do_compute_widths(self, line)
Require MG5 directory: Compute automatically the widths of a set of particles
source code
 
do_decay_events(self, line)
Require MG5 directory: decay events with spin correlations
source code
 
do_delphes(self, line)
run delphes and make associate root file/plot
source code
 
do_exit(self, line)
Not in help: exit
source code
 
do_madanalysis5_hadron(self, line)
launch MadAnalysis5 at the hadron level.
source code
 
do_open(self, line)
Open a text file/ eps file / html file
source code
 
do_pgs(self, line)
launch pgs
source code
 
do_print_results(self, line)
Not in help:Print the cross-section/ number of events for a given run
source code
 
do_quit(self, line)
Not in help: exit
source code
 
do_reweight(self, line)
syntax is "reweight RUN_NAME" Allow to reweight the events generated with a new choices of model parameter.
source code
 
do_set(self, line, log=True)
Set an option, which will be default for coming generations/outputs
source code
 
do_systematics(self, line)
syntax is 'systematics [INPUT [OUTPUT]] OPTIONS' --mur=0.5,1,2 --muf=0.5,1,2 --alps=1 --dyn=-1 --together=mur,muf #can be repeated
source code
 
do_treatcards(self, line, amcatnlo=False)
Advanced commands: create .inc files from param_card.dat/run_card.dat
source code
 
find_model_name(self)
return the model name
source code
 
gen_card_html(self) source code
 
generate_Pythia8_HwU_plots(self, *args, **opt)
Generated the HwU plots from Pythia8 driver output for a specific observable.
source code
 
get_Pdir(self)
get the list of Pdirectory if not yet saved.
source code
 
get_available_tag(self)
create automatically a tag
source code
 
get_characteristics(self, path=None)
reads the proc_characteristics file and initialises the correspondant dictionary
source code
 
get_lhapdf_libdir(self) source code
 
get_lhapdf_pdfsets_list(self, pdfsets_dir)
read the PDFsets.index file, which should be located in the same place as pdfsets_dir, and return a list of dictionaries with the information about each pdf set
source code
 
get_lhapdf_pdfsetsdir(self) source code
 
get_lhapdf_version(self)
returns the lhapdf version number
source code
 
get_model(self)
return the model related to this process
source code
 
get_pdf_input_filename(self)
return the name of the file which is used by the pdfset
source code
 
get_pid_final_initial_states(self)
Find the pid of all particles in the final and initial states
source code
 
help_print_result(self) source code
 
help_systematics(self)
help for systematics command
source code
 
install_lhapdf_pdfset(self, pdfsets_dir, filename)
idownloads and install the pdfset filename in the pdfsets_dir
source code
 
keep_cards(self, need_card=[], ignore=[])
Ask the question when launching generate_events/multi_run
source code
 
link_lhapdf(self, libdir, extra_dirs=[])
links lhapdf into libdir
source code
 
load_results_db(*args, **opt)
load the current results status
source code
 
make_make_all_html_results(self, folder_names=[], jobs=[]) source code
 
post_set(self, stop, line)
Check if we need to save this in the option file
source code
 
run_hep2lhe(self, banner_path=None)
Run hep2lhe on the file Events/pythia_events.hep
source code
 
run_madanalysis5(self, line, mode='parton')
launch MadAnalysis5 at the parton level or at the hadron level with a specific command line.
source code
 
set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo=False)
assign all configuration variable from file ./Cards/mg5_configuration.txt.
source code
 
split_arg(self, line, error=False)
split argument and remove run_options
source code
 
store_result(self)
Dummy routine, to be overwritten by daughter classes
source code
 
store_scan_result(self)
return the information that need to be kept for the scan summary.
source code
 
update_make_opts(self)
update the make_opts file writing the environmental variables stored in make_opts_var
source code
 
update_status(self, status, level, makehtml=True, force=True, error=False, starttime=None, update_results=True, print_log=True)
update the index status
source code
 
write_RunWeb(self, me_dir) source code

Inherited from HelpToCmd: help_compute_widths, help_decay_events, help_delphes, help_pgs, help_plot, help_set, help_shower, help_treatcards

Inherited from CheckValidForCmd: check_check_events, check_compute_widths, check_decay_events, check_delphes, 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, cmdloop, compile, default, define_child_cmd_interface, do_display, do_help, do_history, do_import, do_save, emptyline, error_handling, exec_cmd, get_history_header, get_stored_line, import_command_file, nice_config_error, nice_error_handling, nice_user_error, no_notification, onecmd, onecmd_orig, postcmd, postloop, precmd, preloop, run_cmd, stop_on_keyboard_stop, 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 extended_cmd.BasicCmd: complete, deal_multiple_categories, getTerminalSize, print_suggestions, set_readline_completion_display_matches_hook

Inherited from extended_cmd.OriginalCmd: columnize, complete_help, completedefault, completenames, get_names, parseline, print_topics

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

Static Methods [hide private]
 
ask_edit_card_static(cards, mode='fixed', plot=True, timeout=0, ask=None, **opt) source code
 
detect_card_type(path)
detect the type of the card.
source code
 
find_available_run_name(me_dir)
find a valid run_name for the current job
source code
 
get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None, logstream=sys.stdout, loglevel=20, forced=True, compilation=False)
Makes sure to correctly setup paths and constructs and return an MA5 path
source code
 
get_lhapdf_pdfsets_list_static(pdfsets_dir, lhapdf_version) source code
 
install_lhapdf_pdfset_static(lhapdf_config, pdfsets_dir, filename, lhapdf_version=None, alternate_path=None)
idownloads and install the pdfset filename in the pdfsets_dir.
source code
 
runMA5(MA5_interpreter, MA5_cmds, MA5_runtag, logfile_path, advertise_log=True)
Run MA5 in a controlled environnment.
source code
 
static_check_param_card(path, interface, run=True, dependent=False, iterator_class=<class 'models.check_param_card.ParamCardIterator'>) source code
 
static_compute_widths(line, interface, path=None)
factory to try to find a way to call the static method
source code
 
update_make_opts_full(path, def_variables, keep_old=True)
update the make_opts file writing the environmental variables of def_variables.
source code
 
writeRunWeb(me_dir) source code

Inherited from extended_cmd.Cmd: timed_input

Inherited from extended_cmd.BasicCmd: list_completion, path_completion

Class Variables [hide private]
  debug_output = 'ME5_debug'
  helporder = ['Main Commands', 'Documented commands', 'Require ...
  options_configuration = {'auto_update': 7, 'cluster_local_path...
  options_madevent = {'automatic_html_opening': True, 'cluster_m...
  options_madgraph = {'stdout_level': None}
  sleep_for_error = True

Inherited from extended_cmd.Cmd: PluginCandidate, allow_notification_center, config_debug, dirlist, error_debug, history_header, keyboard_stop_msg, next_possibility, onedir, plugin_path

Inherited from extended_cmd.Cmd (private): _display_opts

Inherited from extended_cmd.OriginalCmd: 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, options, *args, **opts)
(Constructor)

source code 

common

Overrides: object.__init__

ask_madanalysis5_run_configuration(self, runtype='parton', mode=None)

source code 

Ask the question when launching madanalysis5. In the future we can ask here further question about the MA5 run, but for now we just edit the cards

check_param_card(self, path, run=True, dependent=False)

source code 

1) Check that no scan parameter are present
2) Check that all the width are define in the param_card.
- If a scan parameter is define. create the iterator and recall this fonction 
  on the first element.
- If some width are set on 'Auto', call the computation tools.
- Check that no width are too small (raise a warning if this is the case)
3) if dependent is on True check for dependent parameter (automatic for scan)

configure_directory(self, *args, **opts)

source code 

All action require before any type of run. Typically overloaded by daughters if need be.

copy_lhapdf_set(self, lhaid_list, pdfsets_dir, require_local=True)

source code 

copy (if needed) the lhapdf set corresponding to the lhaid in lhaid_list into lib/PDFsets. if require_local is False, just ensure that the pdf is in pdfsets_dir

detect_card_type(path)
Static Method

source code 

detect the type of the card. Return value are banner param_card.dat run_card.dat pythia_card.dat pythia8_card.dat plot_card.dat pgs_card.dat delphes_card.dat delphes_trigger.dat shower_card.dat [aMCatNLO] FO_analyse_card.dat [aMCatNLO] madspin_card.dat [MS] transfer_card.dat [MW] madweight_card.dat [MW] madanalysis5_hadron_card.dat madanalysis5_parton_card.dat

Please update the unit-test: test_card_type_recognition when adding cards.

do_EOF(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_exit(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_quit(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_reweight(self, line)

source code 

syntax is "reweight RUN_NAME" Allow to reweight the events generated with a new choices of model parameter. Description of the methods are available here cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Reweight

do_systematics(self, line)

source code 

syntax is 'systematics [INPUT [OUTPUT]] OPTIONS' --mur=0.5,1,2 --muf=0.5,1,2 --alps=1 --dyn=-1 --together=mur,muf #can be repeated

#special options --from_card=

generate_Pythia8_HwU_plots(self, *args, **opt)

source code 

Generated the HwU plots from Pythia8 driver output for a specific observable.

Decorators:
  • @misc.mute_logger(names= ['madgraph.various.histograms', 'internal.histograms'], levels= [20, 20])

install_lhapdf_pdfset_static(lhapdf_config, pdfsets_dir, filename, lhapdf_version=None, alternate_path=None)
Static Method

source code 

idownloads and install the pdfset filename in the pdfsets_dir. Version which can be used independently of the class. local path is used if the global installation fails.

load_results_db(*args, **opt)

source code 

load the current results status

Decorators:
  • @misc.multiple_try(nb_try= 5, sleep= 2)

set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo=False)

source code 

assign all configuration variable from file ./Cards/mg5_configuration.txt. assign to default if not define

split_arg(self, line, error=False)

source code 

split argument and remove run_options

Overrides: extended_cmd.BasicCmd.split_arg

store_scan_result(self)

source code 

return the information that need to be kept for the scan summary. Auto-width are automatically added.

update_make_opts_full(path, def_variables, keep_old=True)
Static Method

source code 

update the make_opts file writing the environmental variables of def_variables. if a value of the dictionary is None then it is not written.


Class Variable Details [hide private]

helporder

Value:
['Main Commands',
 'Documented commands',
 'Require MG5 directory',
 'Advanced commands']

options_configuration

Value:
{'auto_update': 7,
 'cluster_local_path': None,
 'cluster_nb_retry': 1,
 'cluster_retry_wait': 300,
 'cluster_status_update': (600, 30),
 'cluster_type': 'condor',
 'cpp_compiler': None,
 'delphes_path': './Delphes',
...

options_madevent

Value:
{'automatic_html_opening': True,
 'cluster_memory': None,
 'cluster_queue': None,
 'cluster_size': 100,
 'cluster_temp_path': None,
 'cluster_time': None,
 'nb_core': None,
 'notification_center': True,
...