pyslha.py

changeset 214
fa07ed634b18
parent 213
11aef4bd7802
child 215
8a64587e884f
equal deleted inserted replaced
213:11aef4bd7802 214:fa07ed634b18
33 be provided at some point... watch this space! 33 be provided at some point... watch this space!
34 34
35 35
36 TODOs: 36 TODOs:
37 37
38 For 2.0.0: 38 For 2.1.0:
39 * Preserve comments from read -> write (needs full-line/inline comment 39 * Preserve comments from read -> write (needs full-line/inline comment
40 separation?). Can use separate comment dicts in Block and Decay, and 40 separation?). Can use separate comment dicts in Block and Decay, and
41 attach a multiline .comment attr to the returned/written dicts. 41 attach a multiline .comment attr to the returned/written dicts.
42
43 For 2.1.0:
44 * Output column alignment cosmetics
45 42
46 Later/maybe: 43 Later/maybe:
47 * Identify HERWIG decay matrix element to use in ISAWIG 44 * Identify HERWIG decay matrix element to use in ISAWIG
48 * Handle RPV SUSY in ISAWIG 45 * Handle RPV SUSY in ISAWIG
49 """ 46 """
424 421
425 422
426 423
427 def writeSLHA(blocks, decays, ignorenobr=False, precision=8): 424 def writeSLHA(blocks, decays, ignorenobr=False, precision=8):
428 """Return an SLHA definition as a string, from the supplied blocks and decays dicts.""" 425 """Return an SLHA definition as a string, from the supplied blocks and decays dicts."""
429 return writeSLHABlocks(blocks, precision) + "\n\n" + writeSLHADecays(decays, ignorenobr, precision) 426 ss = [x for x in (writeSLHABlocks(blocks, precision), writeSLHADecays(decays, ignorenobr, precision)) if x]
427 return "\n\n".join(ss)
430 428
431 429
432 430
433 ############################################################################### 431 ###############################################################################
434 ## PDG <-> HERWIG particle ID code translations for ISAWIG handling 432 ## PDG <-> HERWIG particle ID code translations for ISAWIG handling

mercurial