# Set up the path to SModelS installation folder
import sys; sys.path.append( "." ); import smodels_paths
from smodels.theory import slhaDecomposer
from smodels.installation import installDirectory
from smodels.theory.theoryPrediction import theoryPredictionsFor
from smodels.tools.physicsUnits import fb, GeV
from smodels.experiment.databaseObj import Database
# load the official database
database = Database("official")
# however filter out the aggregated CMS-SUS-16-050 result
expResult = database.getExpResults( analysisIDs=["CMS-PAS-SUS-16-052-agg"] )[0]
# Check: print out the experimental result
print ( expResult )
# We look at a model that has gluinos -> t t LSP
filename="%s/inputFiles/slha/gluinoToTops.slha" % installDirectory()
# perform the decompoistion
topList = slhaDecomposer.decompose(filename)
print ( topList )
# obtain the theory predictions with marginalize=False
predProf = theoryPredictionsFor(expResult, topList, combinedResults=True, marginalize=False )
# print the combined upper limit
print ( predProf[1].getUpperLimit().asNumber(fb) )
# obtain the theory predictions with marginalize=True
predMarg = theoryPredictionsFor(expResult, topList, combinedResults=True, marginalize=True )
# print the combined upper limit
print ( predMarg[1].getUpperLimit().asNumber(fb) )