hepi.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.madgraph.run.MadGraphRunParams(dic, skip=False, madstr=True)[source]

Bases: hepi.run.RunParam

Parameters for MadGraph.

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

Bases: hepi.run.Runner

orders(self) List[hepi.input.Order][source]

List of supported Orders in this runner.

_check_path(self) bool[source]

Checks if the passed path is valid.

_check_input(self, param: hepi.Input, **kwargs) bool[source]

Checks input parameter for compatibility with Prospino

_is_valid(self, file: str, p: hepi.Input, d) bool[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(self, file: str) hepi.Result[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(self, rps: List[hepi.run.RunParam], wait=True, parallel=True, sleep=0, **kwargs)[source]

Runs Runner per RunParams.

Parameters
  • 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.

Returns

return codes from jobs if no_parse is False.

Return type

list of int

_prepare(self, p: hepi.Input, **kwargs) hepi.run.RunParam[source]
hepi.madgraph.run.default_madgraph_runner[source]

Default MadGraph Runner to provide backward compatibility

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