hepi.spheno
hepi interface to spheno.
SPheno stands for S(upersymmetric) Pheno(menology) find it here https://spheno.hepforge.org/.
Submodules
Package Contents
Classes
Input for computation and scans. |
|
Functions
Get the input directory. |
|
|
Updates dependent parameters in Input i. |
Attributes
Default SPheno Runner to provide backward compatibility |
|
- hepi.spheno.get_input_dir()
Get the input directory.
- Returns
in_dir- Return type
str
- class hepi.spheno.Input(order: Order, energy: float, particle1: int, particle2: int, slha: str, pdf_lo: str, pdf_nlo: str, mu_f=1.0, mu_r=1.0, pdfset_lo=0, pdfset_nlo=0, precision=0.01, max_iters=50, invariant_mass='auto', result='total', pt='auto', id='', model_path='/opt/MG5_aMC_v2_7_0/models/MSSMatNLO_UFO', update=True)
Bases:
hepi.util.DictDataInput for computation and scans.
- Variables
order (
Order) – LO, NLO or NLO+NLL computation.energy (int) – CMS energy in GeV.
energyhalf (int) – Halfed energy.
particle1 (int) – PDG identifier of the first final state particle.
particle2 (int) – PDG identifier of the second final state particle.
slha (str) – File path of for the base slha. Modified slha files will be used if a scan requires a change of the input.
pdf_lo (str) – LO PDF name.
pdf_nlo (str) – NLO PDF name.
pdfset_lo (int) – LO PDF member/set id.
pdfset_nlo (int) – NLO PDF member/set id.
pdf_lo_id (int) – LO PDF first member/set id.
pdf_nlo_id (int) – NLO PDF first member/set id.
mu (double) – central scale factor.
mu_f (double) – Factorization scale factor.
mu_r (double) – Renormalization scale factor.
precision (double) – Desired numerical relative precision.
max_iters (int) – Upper limit on integration iterations.
invariant_mass (str) – Invariant mass mode ‘auto = sqrt((p1+p2)^2)’ else value.
pt (str) – Transverse Momentum mode ‘auto’ or value.
result (str) – Result type ‘total’/’pt’/’ptj’/’m’.
id (str) – Set an id of this run.
model_path (str) – Path for MadGraph model.
update (bool) – Update dependent mu.
- has_gluino(self) bool
- has_neutralino(self) bool
- has_charginos(self) bool
- has_weakino(self) bool
- has_squark(self) bool
- has_slepton(self) bool
- hepi.spheno.update_slha(i: Input)
Updates dependent parameters in Input i.
Mainly concerns the mu value used by madgraph.
- class hepi.spheno.Runner(path: str, in_dir: str = None, out_dir: str = None, pre=None)
- _prepare(self, p: hepi.input.Input, skip=True, **kwargs) RunParam
- _check_input(self, param: hepi.input.Input, **kwargs) bool
- _prepare_all(self, params: List[hepi.input.Input], **kwargs) List[RunParam]
- run(self, params: List[hepi.input.Input], parse=True, parallel=True, sleep=0, **kwargs)
Run the passed list of parameters.
- Parameters
params (
listofhepi.Input) – All parameters that should be executed/queued.skip (bool) – True means stored runs will be skipped. Else the are overwritten.
parse (bool) – Parse the results. This is not the prefered cluster/parallel mode, as there the function only queues the job.
parallel (bool) – Run jobs in parallel.
sleep (int) – Sleep seconds after starting job.
- Returns
- combined dictionary of results and parameters. Each member therein is a list.
The dictionary is empty if parse is set to False.
- Return type
dict
- _run(self, rps: List[RunParam], wait=True, parallel=True, sleep=0, **kwargs)
Runs Runner per
RunParams.- Parameters
rps (
listofRunParams) – 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
listof int
- _is_valid(self, file: str, p: hepi.input.Input, d) bool
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(self, outputs: List[str]) List[hepi.results.Result]
Parses Resummino output files and returns List of Results.
- Parameters
outputs (
listof str) – List of the filenames to be parsed.- Returns
- _parse_file(self, file: str) hepi.results.Result
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
- get_path(self) str
Get the Runner path.
- Returns
current Runner path.
- Return type
str
- get_input_dir(self) str
Get the input directory.
- Returns
in_dir- Return type
str
- get_output_dir(self) str
Get the input directory.
- Returns
out_dir- Return type
str
- get_pre(self) str
Gets the command prefix.
- Returns
pre- Return type
str
- set_path(self, p: str)
Set the path to the Runner folder containing the binary in ‘./bin’.
- Parameters
p (str) – new path.
- set_input_dir(self, indir: str)
Sets the input directory.
- Parameters
indir (str) – new input directory.
- set_output_dir(self, outdir: str, create: bool = True)
Sets the output directory.
- Parameters
outdir (str) – new output directory. create (bool): create directory if not existing
- set_pre(self, ppre: str)
Sets the command prefix.
- Parameters
ppre (str) – new command prefix.
- class hepi.spheno.SPhenoRunner(path: str, in_dir: str = None, out_dir: str = None, pre=None)[source]
Bases:
hepi.run.Runner- run(self, slhas: List[hepi.input.Input], **kwargs) List[hepi.input.Input]
Run the passed list of parameters for SPheno.