How To: Create ASCII graphs for elements in a LHE event file¶
In [1]:
# Set up the path to SModelS installation folder
import sys; sys.path.append("."); import smodels_paths
In [2]:
# Import those parts of smodels that are needed for this exercise
from smodels.installation import installDirectory
from smodels.tools import asciiGraph
from smodels.share.models.mssm import BSMList
from smodels.share.models.SMparticles import SMList
from smodels.theory.model import Model
from smodels.tools import asciiGraph
from smodels.theory import decomposer
In [3]:
# Load an input file containing LHE events and update the model
filename="./inputFiles/lhe/gluino_squarks.lhe"
model = Model(BSMparticles = BSMList, SMparticles = SMList)
model.updateParticles(inputFile=filename)
In [4]:
# Decompose the model and get the second element
topList = decomposer.decompose(model)
element = topList.getElements()[1]
In [5]:
# Print the corresponding ASCII graph
print(asciiGraph.asciidraw(element))
hi | ----*---- ----*---- | W+
In [6]:
# Do the same for the next element:
element = topList.getElements()[2]
print(asciiGraph.asciidraw(element))
W- | ----*---- ----*---- | Z