# Set up the path to SModelS installation folder
import sys; sys.path.append("."); import smodels_paths
# 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
# 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)
# Decompose the model and get the second element
topList = decomposer.decompose(model)
element = topList.getElements()[1]
# Print the corresponding ASCII graph
print(asciiGraph.asciidraw(element))
hi | ----*---- ----*---- | W+
# Do the same for the next element:
element = topList.getElements()[2]
print(asciiGraph.asciidraw(element))
W- | ----*---- ----*---- | Z