tools package¶
Submodules¶
tools.asciiGraph module¶
tools.caching module¶
tools.colors module¶
tools.coverage module¶
-
class
tools.coverage.
Uncovered
(topoList, sumL=True, sumJet=True, sqrts=None)[source]¶ Bases:
object
Object collecting all information of non-tested/covered elements :ivar topoList: sms topology list :ivar sumL: if true, sum up electron and muon to lepton, for missing topos :ivar sumJet: if true, sum up jets, for missing topos :ivar sqrts: Center of mass energy. If defined it will only consider cross-sections for this value. Otherwise the highest sqrts value will be used.
-
fill
(topoList)[source]¶ Check all elements, categorise those not tested / missing, classify long cascade decays and asymmetric branches Fills all corresponding objects :ivar topoList: sms topology list
-
getAllMothers
(topoList)[source]¶ Find all IDs of mother elements, only most compressed element can be missing topology :ivar topoList: sms topology list
-
getMissingX
(el)[source]¶ Calculate total missing cross section of element, by recursively checking if mothers are covered :ivar el: Element :returns: missing cross section in fb as number
-
getMissingXsec
(sqrts=None)[source]¶ Calculate total missing topology cross section at sqrts. If no sqrts is given use self.sqrts :ivar sqrts: sqrts
-
getOutsideX
(el)[source]¶ Calculate total outside grid cross section of element, by recursively checking if mothers are covered :ivar el: Element :returns: missing cross section in fb as number
-
-
class
tools.coverage.
UncoveredClass
(motherPIDs, el)[source]¶ Bases:
object
Object collecting all elements contributing to the same uncovered class, defined by the mother PIDs. :ivar motherPIDs: PID of initially produces particles, sorted and without charge information :ivar el: Element
-
class
tools.coverage.
UncoveredClassifier
[source]¶ Bases:
object
Object collecting elements with long cascade decays or asymmetric branches. Objects are grouped according to the initially produced particle PID pair.
-
addToClasses
(el)[source]¶ Add Element in corresponding UncoveredClass, defined by mother PIDs. If no corresponding class in self.classes, add new UncoveredClass :ivar el: Element
-
-
class
tools.coverage.
UncoveredList
(sumL, sumJet, sqrts)[source]¶ Bases:
object
Object to find and collect UncoveredTopo objects, plus printout functionality :ivar sumL: if true sum electrons and muons to leptons :ivar sumJet: if true, sum up jets :ivar sqrts: sqrts, for printout
-
addToTopos
(el)[source]¶ adds an element to the list of missing topologies if the element contributes to a missing topology that is already in the list, add weight to topology :parameter el: element to be added
-
tools.crashReport module¶
-
class
tools.crashReport.
CrashReport
[source]¶ Bases:
object
Class that handles all crash report information.
-
createCrashReportFile
(inputFileName, parameterFileName)[source]¶ Create a new SModelS crash report file.
A SModelS crash report file contains:
- a timestamp
- SModelS version
- platform information (CPU architecture, operating system, …)
- Python version
- stack trace
- input file name
- input file content
- parameter file name
- parameter file content
Parameters: - inputFileName – relative location of the input file
- parameterFileName – relative location of the parameter file
-
tools.databaseBrowser module¶
-
class
tools.databaseBrowser.
Browser
(database, force_txt=False)[source]¶ Bases:
object
Browses the database, exits if given path does not point to a valid smodels-database. Browser can be restricted to specified run or experiment.
-
getAttributes
(showPrivate=False)[source]¶ Checks for all the fields/attributes it contains as well as the attributes of its objects if they belong to smodels.experiment.
Parameters: showPrivate – if True, also returns the protected fields (_field) Returns: list of field names (strings)
-
getEfficiencyFor
(expid, dataset, txname, massarray)[source]¶ Get an efficiency for the given experimental id, the dataset name, the txname, and the massarray. Can only be used for EfficiencyMap-type experimental results. Interpolation is done, if necessary.
Parameters: - expid – experimental id (string)
- dataset – dataset name (string)
- txname – txname (string).
- massarray – list of masses with units, e.g. [[ 400.*GeV, 100.*GeV],[400.*GeV, 100.*GeV]]
Returns: efficiency
-
getULFor
(expid, txname, massarray, expected=False)[source]¶ Get an upper limit for the given experimental id, the txname, and the massarray. Can only be used for UL experimental results. Interpolation is done, if necessary.
Parameters: - expid – experimental id (string)
- txname – txname (string). ONLY required for upper limit results
- massarray – list of masses with units, e.g. [[ 400.*GeV, 100.*GeV],[400.*GeV, 100.*GeV]]
- expected – If true, return expected upper limit, otherwise return observed upper limit.
Returns: upper limit [fb]
-
getULForSR
(expid, datasetID)[source]¶ Get an upper limit for the given experimental id and dataset (signal region). Can only be used for efficiency-map results. :param expid: experimental id (string) :param datasetID: string defining the dataset id, e.g. ANA5-CUT3. :return: upper limit [fb]
-
getValuesFor
(attribute=None, expResult=None)[source]¶ Returns a list for the possible values appearing in the database for the required attribute (sqrts,id,constraint,…).
Parameters: - attribute – name of a field in the database (string). If not defined it will return a dictionary with all fields and their respective values
- expResult – if defined, restricts the list to the corresponding expResult. Must be an ExpResult object.
Returns: list of values
-
loadAllResults
()[source]¶ Saves all the results from database to the _selectedExpResults. Can be used to restore all results to _selectedExpResults.
-
selectExpResultsWith
(**restrDict)[source]¶ Loads the list of the experimental results (pair of InfoFile and DataFile) satisfying the restrictions to the _selectedExpResults. The restrictions specified as a dictionary.
Parameters: restrDict – selection fields and their allowed values. E.g. lumi = [19.4/fb, 20.3/fb], txName = ‘T1’,….} The values can be single entries or a list of values. For the fields not listed, all values are assumed to be allowed.
-
tools.externalPythonTools module¶
tools.interactivePlots module¶
tools.interactivePlotsHelpers module¶
tools.ioObjects module¶
-
class
tools.ioObjects.
FileStatus
[source]¶ Bases:
object
Object to run several checks on the input file. It holds an LheStatus (SlhaStatus) object if inputType = lhe (slha)
-
class
tools.ioObjects.
LheStatus
(filename)[source]¶ Bases:
object
Object to check if input lhe file contains errors.
Variables: filename – path to input LHE file
-
class
tools.ioObjects.
OutputStatus
(status, inputFile, parameters, databaseVersion)[source]¶ Bases:
object
Object that holds all status information and has a predefined printout.
-
class
tools.ioObjects.
Qnumbers
(pid)[source]¶ Bases:
object
An instance of this class represents quantum numbers.
Get quantum numbers (spin*2, electrical charge*3, color dimension) from qNumbers.
-
class
tools.ioObjects.
ResultList
(theoPredictionsList=[], maxcond=1.0)[source]¶ Bases:
object
Class that collects a list of theory predictions plus the corresponding upper limits.
-
addTheoPrediction
(theoPred, maxcond)[source]¶ Add a result to the theoryPredictions, unless it violates maxcond.
Parameters: - theoPred – a Theory Prediction object to be added to ResultList
- maxcond – maximum condition violation
-
getBestExpected
()[source]¶ Find EM result with the highest expected R vaue. :returns: Theory Prediction object
-
-
class
tools.ioObjects.
SlhaStatus
(filename, maxDisplacement=0.01, sigmacut=3.00E-02 [fb], checkLSP=True, findMissingDecayBlocks=True, findIllegalDecays=False, checkXsec=True, findLonglived=True)[source]¶ Bases:
object
An instance of this class represents the status of an SLHA file. The output status is: = 0 : the file is not checked, = 1: the check is ok = -1: case of a physical problem, e.g. charged LSP, = -2: case of formal problems, e.g. no cross sections
-
degenerateChi
()[source]¶ Check if chi01 is lsp and chipm1 is NLSP. If so, check mass splitting. This function is not used, the limit is arbitrary.
-
deltaMass
(pid1, pid2)[source]¶ Calculate mass splitting between particles with pid1 and pid2.
Returns: mass difference
-
emptyDecay
(pid)[source]¶ Check if any decay is listed for the particle with pid
Parameters: pid – PID number of particle to be checked Returns: True if the decay block is missing or if it is empty, None otherwise
-
evaluateStatus
()[source]¶ Get status summary from all performed checks.
Returns: a status flag and a message for explanation
-
findIllegalDecay
(findIllegal)[source]¶ Find decays for which the sum of daughter masses excels the mother mass
Parameters: findIllegal – True if check should be run Returns: status flag and message
-
findLSP
(returnmass=None)[source]¶ Find lightest particle (not in rEven).
Returns: pid, mass of the lsp, if returnmass == True
-
findLonglivedParticles
(findLonglived)[source]¶ Find meta-stable particles that decay to visible particles and stable charged particles.
Returns: status flag, message
-
findMissingDecayBlocks
(findMissingBlocks)[source]¶ For all non-rEven particles listed in mass block, check if decay block is written
Returns: status flag and message
-
findNLSP
(returnmass=None)[source]¶ Find second lightest particle (not in rEven).
Returns: pid ,mass of the NLSP, if returnmass == True
-
getLifetime
(pid, ctau=False)[source]¶ Compute lifetime from decay-width for a particle with pid.
Parameters: - pid – PID of particle
- ctau – set True to multiply lifetime by c
Returns: lifetime
-
hasXsec
(checkXsec)[source]¶ Check if XSECTION table is present in the slha file.
Parameters: checkXsec – set True to run the check Returns: status flag, message
-
sumBR
(pid)[source]¶ Calculate the sum of all branching ratios for particle with pid.
Parameters: pid – PID of particle Returns: sum of branching ratios as given in the decay table for pid
-
tools.modelTester module¶
-
tools.modelTester.
getAllInputFiles
(inFile)[source]¶ Given inFile, return list of all input files
Parameters: inFile – Path to input file or directory containing input files Returns: List of all input files, and the directory name
-
tools.modelTester.
getParameters
(parameterFile)[source]¶ Read parameter file, exit in case of errors
Parameters: parameterFile – Path to parameter File Returns: ConfigParser read from parameterFile
-
tools.modelTester.
loadDatabase
(parser, db)[source]¶ Load database
Parameters: - parser – ConfigParser with path to database
- db – binary database object. If None, then database is loaded, according to databasePath. If True, then database is loaded, and text mode is forced.
Returns: database object, database version
-
tools.modelTester.
loadDatabaseResults
(parser, database)[source]¶ Load database entries specified in parser
Parameters: - parser – ConfigParser, containing analysis and txnames selection
- database – Database object
Returns: List of experimental results
-
tools.modelTester.
runSetOfFiles
(inputFiles, outputDir, parser, databaseVersion, listOfExpRes, timeout, development, parameterFile, jobnr)[source]¶ Loop over all input files in inputFiles with testPoint
Parameters: - inputFiles – list of input files to be tested
- outputDir – path to directory where output is be stored
- parser – ConfigParser storing information from parameter.ini file
- databaseVersion – Database version (printed to output file)
- listOfExpRes – list of ExpResult objects to be considered
- development – turn on development mode (e.g. no crash report)
- parameterFile – parameter file, for crash reports
- jobnr – number of process, in parallel mode. mostly for debugging.
Returns: printers output
-
tools.modelTester.
runSingleFile
(inputFile, outputDir, parser, databaseVersion, listOfExpRes, timeout, development, parameterFile)[source]¶ Call testPoint on inputFile, write crash report in case of problems
Parameters: - inputFile – path to input file
- outputDir – path to directory where output is be stored
- parser – ConfigParser storing information from parameter.ini file
- databaseVersion – Database version (printed to output file)
- listOfExpRes – list of ExpResult objects to be considered
- crashReport – if True, write crash report in case of problems
- timeout – set a timeout for one model point (0 means no timeout)
Returns: output of printers
-
tools.modelTester.
testPoint
(inputFile, outputDir, parser, databaseVersion, listOfExpRes)[source]¶ Test model point defined in input file (running decomposition, check results, test coverage)
Parameters: - inputFile – path to input file
- outputDir – path to directory where output is be stored
- parser – ConfigParser storing information from parameters file
- databaseVersion – Database version (printed to output file)
- listOfExpRes – list of ExpResult objects to be considered
Returns: output of printers
-
tools.modelTester.
testPoints
(fileList, inDir, outputDir, parser, databaseVersion, listOfExpRes, timeout, development, parameterFile)[source]¶ Loop over all input files in fileList with testPoint, using ncpus CPUs defined in parser
Parameters: - fileList – list of input files to be tested
- inDir – path to directory where input files are stored
- outputDir – path to directory where output is stored
- parser – ConfigParser storing information from parameter.ini file
- databaseVersion – Database version (printed to output files)
- listOfExpRes – list of ExpResult objects to be considered
- timeout – set a timeout for one model point (0 means no timeout)
- development – turn on development mode (e.g. no crash report)
- parameterFile – parameter file, for crash reports
Returns: printer(s) output, if not run in parallel mode
tools.nllFastWrapper module¶
-
class
tools.nllFastWrapper.
NllFastWrapper
(sqrts, nllfastVersion, testParams, testCondition)[source]¶ Bases:
smodels.tools.wrapperBase.WrapperBase
An instance of this class represents the installation of nllfast.
-
class
tools.nllFastWrapper.
NllFastWrapper13
[source]¶ Bases:
tools.nllFastWrapper.NllFastWrapper
An instance of this class represents the installation of nllfast 8.
-
class
tools.nllFastWrapper.
NllFastWrapper7
[source]¶ Bases:
tools.nllFastWrapper.NllFastWrapper
An instance of this class represents the installation of nllfast 7.
-
class
tools.nllFastWrapper.
NllFastWrapper8
[source]¶ Bases:
tools.nllFastWrapper.NllFastWrapper
An instance of this class represents the installation of nllfast 8.
tools.physicsUnits module¶
tools.printer module¶
-
class
tools.printer.
BasicPrinter
(output, filename)[source]¶ Bases:
object
Super class to handle the basic printing methods
-
addObj
(obj)[source]¶ Adds object to the Printer.
Parameters: obj – A object to be printed. Must match one of the types defined in formatObj Returns: True if the object has been added to the output. If the object does not belong to the pre-defined printing list toPrint, returns False.
-
filename
¶
-
-
class
tools.printer.
MPrinter
[source]¶ Bases:
object
Master Printer class to handle the Printers (one printer/output type)
-
addObj
(obj)[source]¶ Adds the object to all its Printers:
Parameters: obj – An object which can be handled by the Printers.
-
flush
()[source]¶ Ask all printers to write the output and clear their cache. If the printers return anything other than None, we pass it on.
-
setOutPutFiles
(filename, silent=False)[source]¶ Set the basename for the output files. Each printer will use this file name appended of the respective extension (i.e. .py for a python printer, .smodels for a summary printer,…)
Parameters: - filename – Input file name
- silent – dont comment removing old files
-
-
class
tools.printer.
PyPrinter
(output='stdout', filename=None)[source]¶ Bases:
tools.printer.BasicPrinter
Printer class to handle the printing of one single pythonic output
-
class
tools.printer.
SLHAPrinter
(output='file', filename=None)[source]¶ Bases:
tools.printer.TxTPrinter
Printer class to handle the printing of slha format summary output. It uses the facilities of the TxTPrinter.
-
setOutPutFile
(filename, overwrite=True, silent=False)[source]¶ Set the basename for the text printer. The output filename will be filename.smodels. :param filename: Base filename :param overwrite: If True and the file already exists, it will be removed. :param silent: dont comment removing old files
-
-
class
tools.printer.
SummaryPrinter
(output='stdout', filename=None)[source]¶ Bases:
tools.printer.TxTPrinter
Printer class to handle the printing of one single summary output. It uses the facilities of the TxTPrinter.
-
setOutPutFile
(filename, overwrite=True, silent=False)[source]¶ Set the basename for the text printer. The output filename will be filename.smodels. :param filename: Base filename :param overwrite: If True and the file already exists, it will be removed. :param silent: dont comment removing old files
-
-
class
tools.printer.
TxTPrinter
(output='stdout', filename=None)[source]¶ Bases:
tools.printer.BasicPrinter
Printer class to handle the printing of one single text output
-
class
tools.printer.
XmlPrinter
(output='stdout', filename=None)[source]¶ Bases:
tools.printer.PyPrinter
Printer class to handle the printing of one single XML output
-
convertToElement
(pyObj, parent, tag='')[source]¶ Convert a python object (list,dict,string,…) to a nested XML element tree. :param pyObj: python object (list,dict,string…) :param parent: XML Element parent :param tag: tag for the daughter element
-
tools.pythia6Wrapper module¶
-
class
tools.pythia6Wrapper.
Pythia6Wrapper
(configFile='<install>/smodels/etc/pythia.card', executablePath='<install>/smodels/lib/pythia6/pythia_lhe', srcPath='<install>/smodels/lib/pythia6/')[source]¶ Bases:
smodels.tools.wrapperBase.WrapperBase
An instance of this class represents the installation of pythia6.
-
checkFileExists
(inputFile)[source]¶ Check if file exists, raise an IOError if it does not.
Returns: absolute file name if file exists.
-
replaceInCfgFile
(replacements={'NEVENTS': 10000, 'SQRTS': 8000})[source]¶ Replace strings in the config file by other strings, similar to setParameter.
This is introduced as a simple mechanism to make changes to the parameter file.
Parameters: replacements – dictionary of strings and values; the strings will be replaced with the values; the dictionary keys must be strings present in the config file
-
run
(slhafile, lhefile=None, unlink=True)[source]¶ Execute pythia_lhe with n events, at sqrt(s)=sqrts.
Parameters: - slhafile – input SLHA file
- lhefile – option to write LHE output to file; if None, do not write output to disk. If lhe file exists, use its events for xsecs calculation.
- unlink – Clean up temp directory after running pythia
Returns: List of cross sections
-
tools.pythia8Wrapper module¶
-
class
tools.pythia8Wrapper.
Pythia8Wrapper
(configFile='<install>/smodels/etc/pythia8.cfg', executablePath='<install>/smodels/lib/pythia8/pythia8.exe', srcPath='<install>/smodels/lib/pythia8/')[source]¶ Bases:
smodels.tools.wrapperBase.WrapperBase
An instance of this class represents the installation of pythia8.
-
checkFileExists
(inputFile)[source]¶ Check if file exists, raise an IOError if it does not.
Returns: absolute file name if file exists.
-
run
(slhaFile, lhefile=None, unlink=True)[source]¶ Run pythia8.
Parameters: - slhaFile – SLHA file
- lhefile – option to write LHE output to file; if None, do not write output to disk. If lhe file exists, use its events for xsecs calculation.
- unlink – clean up temporary files after run?
Returns: List of cross sections
-
tools.pythia8particles module¶
tools.pythonTools module¶
tools.runSModelS module¶
-
tools.runSModelS.
run
(inFile, parameterFile, outputDir, db, timeout, development)[source]¶ Provides a command line interface to basic SModelS functionalities.
Parameters: - inFile – input file name (either a SLHA or LHE file) or directory name (path to directory containing input files)
- parameterFile – File containing the input parameters (default = smodels/etc/parameters_default.ini)
- outputDir – Output directory to write a summary of results to
- db – supply a smodels.experiment.databaseObj.Database object, so the database doesn’t have to be loaded anymore. Will render a few parameters in the parameter file irrelevant. If None, load the database as described in parameterFile, If True, force loading the text database.
- timeout – set a timeout for one model point (0 means no timeout)
- development – turn on development mode (e.g. no crash report)
tools.runtime module¶
tools.simplifiedLikelihoods module¶
-
class
tools.simplifiedLikelihoods.
Data
(observed, backgrounds, covariance, third_moment=None, nsignal=None, name='model', deltas_rel=0.2)[source]¶ Bases:
object
A very simple observed container to collect all the data needed to fully define a specific statistical model
-
convert
(obj)[source]¶ Convert object to numpy arrays. If object is a float or int, it is converted to a one element array.
-
signals
(mu)[source]¶ Returns the number of expected signal events, for all datasets, given total signal strength mu.
Parameters: mu – Total number of signal events summed over all datasets.
-
totalCovariance
(nsig)[source]¶ get the total covariance matrix, taking into account also signal uncertainty for the signal hypothesis <nsig>. If nsig is None, the predefined signal hypothesis is taken.
-
-
class
tools.simplifiedLikelihoods.
LikelihoodComputer
(data, ntoys=10000)[source]¶ Bases:
object
-
chi2
(nsig, marginalize=False)[source]¶ Computes the chi2 for a given number of observed events nobs given the predicted background nb, error on this background deltab, expected number of signal events nsig and the relative error on signal (deltas_rel). :param marginalize: if true, marginalize, if false, profile :param nsig: number of signal events :return: chi2 (float)
-
dLdMu
(mu, signal_rel, theta_hat)[source]¶ d (ln L)/d mu, if L is the likelihood. The function whose root gives us muhat, i.e. the mu that maximizes the likelihood.
Parameters: - mu – total number of signal events
- signal_rel – array with the relative signal strengths for each dataset (signal region)
- theta_hat – array with nuisance parameters
-
debug_mode
= False¶
-
findMuHat
(signal_rel)[source]¶ Find the most likely signal strength mu given the relative signal strengths in each dataset (signal region).
Parameters: signal_rel – array with relative signal strengths Returns: mu_hat, the total signal yield.
-
findThetaHat
(nsig)[source]¶ Compute nuisance parameter theta that maximizes our likelihood (poisson*gauss).
-
getSigmaMu
(signal_rel)[source]¶ Get a rough estimate for the variance of mu around mu_max.
Parameters: signal_rel – array with relative signal strengths in each dataset (signal region)
-
getThetaHat
(nobs, nb, nsig, covb, max_iterations)[source]¶ Compute nuisance parameter theta that maximizes our likelihood (poisson*gauss).
-
likelihood
(nsig, marginalize=False, nll=False)[source]¶ compute likelihood for nsig, profiling the nuisances :param marginalize: if true, marginalize, if false, profile :param nll: return nll instead of likelihood
-
marginalizedLLHD1D
(nsig, nll)[source]¶ Return the likelihood (of 1 signal region) to observe nobs events given the predicted background nb, error on this background (deltab), expected number of signal events nsig and the relative error on the signal (deltas_rel).
Parameters: - nsig – predicted signal (float)
- nobs – number of observed events (float)
- nb – predicted background (float)
- deltab – uncertainty on background (float)
Returns: likelihood to observe nobs events (float)
-
marginalizedLikelihood
(nsig, nll)[source]¶ compute the marginalized likelihood of observing nsig signal event
-
nllHess
(theta)[source]¶ the Hessian of nll as a function of the thetas. Makes it easier to find the maximum likelihood.
-
nllprime
(theta)[source]¶ the derivative of nll as a function of the thetas. Makes it easier to find the maximum likelihood.
-
-
class
tools.simplifiedLikelihoods.
UpperLimitComputer
(ntoys=10000, cl=0.95)[source]¶ Bases:
object
-
debug_mode
= False¶
-
ulSigma
(model, marginalize=False, toys=None, expected=False)[source]¶ - upper limit obtained from the defined Data (using the signal prediction
- for each signal regio/dataset), by using the q_mu test statistic from the CCGV paper (arXiv:1007.1727).
Params marginalize: if true, marginalize nuisances, else profile them Params toys: specify number of toys. Use default is none Params expected: compute the expected value, not the observed. Returns: upper limit on production xsec (efficiencies unfolded)
-
tools.smodelsLogging module¶
-
class
tools.smodelsLogging.
ColorizedStreamHandler
(stream=None)[source]¶ Bases:
logging.StreamHandler
tools.stringTools module¶
tools.timeOut module¶
tools.toolBox module¶
-
class
tools.toolBox.
ToolBox
[source]¶ Bases:
object
A singleton-like class that keeps track of all external tools. Intended to make installation and deployment easier.
tools.wrapperBase module¶
-
class
tools.wrapperBase.
WrapperBase
[source]¶ Bases:
object
An instance of this class represents the installation of an external tool.
An external tool encapsulates a tool that is executed via commands.getoutput. The wrapper defines how the tool is tested for proper installation and how the tool is executed.
-
absPath
(path)[source]¶ Get the absolute path of <path>, replacing <install> with the installation directory.
-
tools.xsecComputer module¶
-
class
tools.xsecComputer.
ArgsStandardizer
[source]¶ Bases:
object
simple class to collect all argument manipulators
-
class
tools.xsecComputer.
XSecComputer
(maxOrder, nevents, pythiaVersion)[source]¶ Bases:
object
cross section computer class, what else?
-
addXSecToFile
(xsecs, slhafile, comment=None, complain=True)[source]¶ Write cross sections to an SLHA file.
Parameters: - xsecs – a XSectionList object containing the cross sections
- slhafile – target file for writing the cross sections in SLHA format
- comment – optional comment to be added to each cross section block
- complain – complain if there are already cross sections in file
-
compute
(sqrts, slhafile, lhefile=None, unlink=True, loFromSlha=None, pythiacard=None)[source]¶ Run pythia and compute SUSY cross sections for the input SLHA file.
Parameters: - sqrts – sqrt{s} to run Pythia, given as a unum (e.g. 7.*TeV)
- slhafile – SLHA file
- lhefile – LHE file. If None, do not write pythia output to file. If file does not exist, write pythia output to this file name. If file exists, read LO xsecs from this file (does not run pythia).
- unlink – Clean up temp directory after running pythia
- loFromSlha – If True, uses the LO xsecs from the SLHA file to compute the higher order xsecs
- pythiaCard – Optional path to pythia.card. If None, uses /etc/pythia.card
Returns: XSectionList object
-
computeForBunch
(sqrtses, inputFiles, unlink, lOfromSLHA, tofile, pythiacard=None)[source]¶ compute xsecs for a bunch of slha files
-
computeForOneFile
(sqrtses, inputFile, unlink, lOfromSLHA, tofile, pythiacard=None)[source]¶ compute the cross sections for one file. :param sqrtses: list of sqrt{s} tu run pythia, as a unum (e.g. 7*TeV)
-
xsecToBlock
(xsec, inPDGs=(2212, 2212), comment=None, xsecUnit=1.00E+00 [pb])[source]¶ Generate a string for a XSECTION block in the SLHA format from a XSection object.
Parameters: - inPDGs – defines the PDGs of the incoming states (default = 2212,2212)
- comment – is added at the end of the header as a comment
- xsecUnit – unit of cross sections to be written (default is pb). Must be a Unum unit.
-