How To: Print out the theoretical decomposition

In [1]:
#Set up the path to SModelS installation folder if running on a different folder
import sys,os
sys.path.append(os.path.join(os.getenv("HOME"),"smodels/"))
In [2]:
#Import those parts of smodels that are needed for this exercise
#(We will assume the input is a SLHA file. For LHE files, use the lheDecomposer instead)
from smodels.theory import slhaDecomposer
from smodels.installation import installDirectory
from smodels.tools.physicsUnits import fb, GeV
In [3]:
#Define the SLHA file name
filename="%s/inputFiles/slha/gluino_squarks.slha" % installDirectory()
In [4]:
#Perform the decomposition:
listOfTopologies = slhaDecomposer.decompose(filename, sigcut = 0.5 * fb, 
                                            doCompress=True, doInvisible=True,minmassgap = 5* GeV)
In [6]:
#Print a summary of all the topologies generated:
for top in listOfTopologies:
    print top.describe()
number of vertices: [0, 1], number of vertex particles: [[], [1]], number of elements: 1
number of vertices: [1, 1], number of vertex particles: [[1], [1]], number of elements: 7
number of vertices: [1, 1], number of vertex particles: [[1], [2]], number of elements: 2
number of vertices: [1, 2], number of vertex particles: [[1], [1, 1]], number of elements: 7
number of vertices: [1, 2], number of vertex particles: [[1], [2, 1]], number of elements: 10
number of vertices: [1, 2], number of vertex particles: [[2], [1, 1]], number of elements: 4
number of vertices: [2, 2], number of vertex particles: [[1, 1], [1, 1]], number of elements: 7
number of vertices: [2, 2], number of vertex particles: [[1, 1], [2, 1]], number of elements: 25
number of vertices: [2, 2], number of vertex particles: [[2, 1], [2, 1]], number of elements: 21
In [7]:
#To print specific information about othe i-th topology:
i = 3
top = listOfTopologies[i]
print "Number of vertices = ",top.vertnumb
print "Number of final states = ",top.vertparts
print "Number of elements = ",len(top.elementList)
Number of vertices =  [1, 2]
Number of final states =  [[1], [1, 1]]
Number of elements =  7
In [11]:
#We can also print information for each element in the topology:
for iel,element in enumerate(top.elementList):
    print 'Element',iel,':',element.getParticles()
    print 'masses=',element.getMasses()
    print 'weight=',element.weight,'\n'
Element 0 : [[['W+']], [['q'], ['W-']]]
masses= [[2.69E+02 [GeV], 1.29E+02 [GeV]], [9.94E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:1.67E-03 [pb]'] 

Element 1 : [[['W+']], [['q'], ['higgs']]]
masses= [[2.69E+02 [GeV], 1.29E+02 [GeV]], [9.94E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:7.06E-04 [pb]'] 

Element 2 : [[['W-']], [['q'], ['W+']]]
masses= [[2.69E+02 [GeV], 1.29E+02 [GeV]], [9.92E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:7.71E-04 [pb]'] 

Element 3 : [[['higgs']], [['q'], ['W+']]]
masses= [[2.69E+02 [GeV], 1.29E+02 [GeV]], [9.92E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:8.27E-04 [pb]'] 

Element 4 : [[['q']], [['q'], ['W+']]]
masses= [[9.91E+02 [GeV], 1.29E+02 [GeV]], [9.92E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:1.51E-03 [pb]'] 

Element 5 : [[['q']], [['q'], ['W-']]]
masses= [[9.91E+02 [GeV], 1.29E+02 [GeV]], [9.94E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:6.06E-04 [pb]'] 

Element 6 : [[['q']], [['q'], ['higgs']]]
masses= [[9.91E+02 [GeV], 1.29E+02 [GeV]], [9.92E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]]
weight= ['8.00E+00 [TeV]:6.28E-04 [pb]']