hepi.run.madgraph.run

Runs MadGraph.

Module Contents

Classes

MadGraphRunParams

Parameters for MadGraph.

MadGraphRunner

Attributes

default_madgraph_runner

Default MadGraph Runner to provide backward compatibility

run

set_path

get_path

class hepi.run.madgraph.run.MadGraphRunParams(dic, skip=False, madstr=True)[source]

Bases: hepi.run.RunParam

Parameters for MadGraph.

class hepi.run.madgraph.run.MadGraphRunner(path, in_dir=None, out_dir=None, pre=None)[source]

Bases: hepi.run.Runner

Parameters:
  • path (str) –

  • in_dir (str) –

  • out_dir (str) –

orders()[source]

List of supported Orders in this runner.

Return type:

List[hepi.input.Order]

_check_path()[source]

Checks if the passed path is valid.

Return type:

bool

_check_input(param, **kwargs)[source]

Checks input parameter for compatibility with Prospino

Parameters:

param (hepi.run.Input) –

Return type:

bool

_is_valid(file, p, d)[source]

Verifies that a file is a complete output.

Parameters:
  • file (str) – File path to be parsed.

  • p (hepi.Input) – Onput parameters.

  • d (dict) – Param dictionary.

Returns:

True if file could be parsed.

Return type:

bool

_parse_file(file)[source]

Extracts results from an output file.

Parameters:

file (str) – File path to be parsed.

Returns:

If a value is not found in the file None is used.

Return type:

Result

_run(rps, wait=True, parallel=True, sleep=0, **kwargs)[source]

Runs Runner per RunParams.

Args:

rps (list of RunParams): Extended run parameters. bar (bool): Enable info bar. wait (bool): Wait for parallel runs to finish. sleep (int): Sleep seconds after starting subprocess. parallel (bool): Run jobs in parallel.

n_jobs (int): Number of parallel jobs. If None, use all available cores.

Returns:

list of int: return codes from jobs if no_parse is False.

Parameters:

rps (List[hepi.run.RunParam]) –

_prepare(p, **kwargs)[source]
Parameters:

p (hepi.run.Input) –

Return type:

hepi.run.RunParam

hepi.run.madgraph.run.default_madgraph_runner[source]

Default MadGraph Runner to provide backward compatibility

hepi.run.madgraph.run.run[source]
hepi.run.madgraph.run.set_path[source]
hepi.run.madgraph.run.get_path[source]