For the first-time user, SModelS ships with a command-line tool runSModelS.py, which takes an SLHA or LHE file as input (see Basic Input), and reports on the SMS decomposition and theory predictions in a simple output text file.
For users more familiar with Python and the SModelS basics, an example code Example.py is provided showing how to access the main SModelS functionalities: decomposition, analysis database and computation of theory predictions.
The commandline tool (runSModelS.py) and the example Python code (Example.py) are described below.
runSModelS.py covers several different applications of the SModelS functionality, with the option of turning various features on or off, as well as setting the basic parameters.
These functionalities include detailed checks of input SLHA files, running the decomposition and printing the output, evaluating the theory predictions and comparing them to the experimental limits available in the database, determining missing topologies and printing a summary text file.
These settings may be changed from their default values using the parameter file.
-h, --help | show this help message and exit |
-f FILENAME, --filename FILENAME | |
name of SLHA or LHE input file, necessary input | |
-p PARAMETERFILE, --parameterfile PARAMETERFILE | |
name of parameter file, optional argument, if not set, use all parameters from etc/parameters_default.ini. | |
-o OUTPUTFILE, --outputfile OUTPUTFILE | |
name of output file, optional argument, default is: ./summary.txt |
The basic options and parameters used by runSModelS.py are defined in the parameter file. An example parameter file, including all available parameters together with a short description, is stored in parameters.ini. If no parameter file is specified the default parameters stored in /etc/parameters_default.ini are used. Below we give more detailed information about each entry in the parameters file.
default values:
[path]
databasePath = ../smodels-database/
default values:
[options]
inputType = SLHA
checkInput = True
doInvisible = True
doCompress = True
findMissingTopos = True
default values:
[parameters]
sigmacut = 0.03
minmassgap = 5.
maxcond = 0.2
default values:
[database]
analyses = all
txnames = all
default values:
[stdout]
printDecomp = True
addElmentInfo = False
printAnalyses = False
addAnaInfo = False
printResults = True
default values:
[file]
expandedSummary = True
addConstraintInfo = True
The results of runSModelS.py are printed both to the screen and to the output (summary) file. If no output file is specified when calling runSModelS.py, the file output will be printed to ./summary.txt. Below we explain in detail the information contained in the screen output and the output file.
If all the options in stdout (printDecomp, addElmentInfo, printAnalyses, addAnaInfo and printResults) are set to True (see parameter file), the screen output contains the following information:
=====================================================
Topology:
Number of vertices: [3, 3]
Number of vertex parts: [[1, 1, 0], [1, 1, 0]]
Total Global topology weight :
Sqrts: 8.00E+00 [TeV], Weight:1.62E-02 [pb]
Total Number of Elements: 30
.........................................................................
Element:
Particles in element: [[['jet'], ['W-']], [['jet'], ['W-']]]
The element masses are
Branch 0: [9.94E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]
Branch 1: [9.94E+02 [GeV], 2.69E+02 [GeV], 1.29E+02 [GeV]]
The element weights are:
Sqrts: 8.00E+00 [TeV], Weight:3.78E-04 [pb]
========================================================
Analysis Name: ATLAS-SUSY-2013-05
Tx Label: T2bb
Analysis Sqrts: 8.00E+00 [TeV]
-----------------------------
Elements tested by analysis:
[[['b']], [['b']]]
---------------Analysis Label = CMS-PAS-SUS-13-019:T2
Analysis sqrts: 8.00E+00 [TeV]
Masses in branch 0: [9.91E+02 [GeV], 1.29E+02 [GeV]]
Masses in branch 1: [9.91E+02 [GeV], 1.29E+02 [GeV]]
Theory prediction: 1.77E-03 [pb]
Theory conditions:[None]
Experimental limit: 3.76E-03 [pb]
10:36:46.712 WARNING __main__:46 Removing old output file in summary.txt
10:36:46.765 INFO smodels.theory.slhaDecomposer:132 Ignoring higgs decays
10:36:46.792 INFO smodels.theory.crossSection:512 Ignoring 76 lower order cross-sections
If both expandedSummary and addConstraintInfo are set to True (see parameter file), the file output contains the following information:
Although runSModelS.py provides the main SModelS features with a command line interface, users more familiar with Python and the SModelS language may prefer to write their own main program. A simple example code for this purpose is provided in examples/Example.py. Below we go step-by-step through this example code:
#Import basic functions (this file must be run under the installation folder
from __future__ import print_function
import sys
from smodels.theory import slhaDecomposer
from smodels.theory import lheDecomposer
from smodels.tools.physicsUnits import fb, GeV
from smodels.experiment import smsAnalysisFactory
from smodels.theory.theoryPrediction import theoryPredictionFor
from smodels.experiment import smsHelpers
#Set the address of the database folder
smsHelpers.base="/home/lessa/smodels-database/"
slhafile = 'inputFiles/slha/lightSquarks.slha'
sigmacut = 0.03 * fb
mingap = 5. * GeV
smstoplist = slhaDecomposer.decompose(slhafile, sigmacut, doCompress=True,doInvisible=True, minmassgap=mingap)
smstoplist.printout(outputLevel=1)
listofanalyses = smsAnalysisFactory.load()
analysesPredictions = [theoryPredictionFor(analysis, smstoplist) for analysis in listofanalyses]
for analysisPred in analysesPredictions:
if not analysisPred: continue #Skip non-applicable analyses
#If the analysis prediction contains more than one theory prediction (cluster), loop over predictions:
for theoryPrediction in analysisPred:
print("------------------------")
print("Analysis name = ",theoryPrediction.analysis.label) #Analysis name
print("Prediction Mass = ",theoryPrediction.mass) #Value for average cluster mass (average mass of the elements in cluster)
print("Signal Cross-Section = ",theoryPrediction.value) #Value for the cluster signal cross-section
print("Condition Violation = ",theoryPrediction.conditions) #Condition violation values
print("Analysis UL = ",theoryPrediction.analysis.getUpperLimitFor(theoryPrediction.mass))
[*] | For an SLHA input file, the decay of final states (or Z2-even particles such as the Higgs, W,...) are always ignored during the decomposition. Furthermore, if there are two cross-sections at different calculation order (say LO and NLO) for the same process, only the highest order is used. |
[†] | The list of elements can be extremely long. Try setting addElmentInfo = False and/or printDecomp = False to obtain a smaller output. |