contur.data package
Submodules
contur.data.data_objects module
- class contur.data.data_objects.Analysis(row, beamid)[source]
Bases:
object
Class to store information about an analysis.
Properties:
name full name of the analysis, including the options string if present
short_name as above but without the options string
lumi the integrated luminosity used for this analysis
rivet_analysis the rivet analysis object
poolid the unique ID of the contur pool this analysis belongs to
- toHTML(anaindex, adatfiles=[], style='', timestamp='now')[source]
Write this analysis to an HTML file called anaindex, with link links to the graphics version of the plots in adatfiles. If adatafiles is empty, just write the description etc without links to plots.
optional stylesheet and timestamp.
to be deprecated in favour of html_utils.writeAnaHTML
- class contur.data.data_objects.Beam(row)[source]
Bases:
object
Class to store information about beam configurations
Properties:
id
collider short string identifying the collider
particle_a short string identifying the first colliding beam
particle_b short string identifying the second colliding beam
energy_a energy of first beam
energy_b energy of second beam
root_s centre-of-mass energy
- class contur.data.data_objects.Experiment(row)[source]
Bases:
object
Class to store information about experiments
Properties:
id
collider short string identifying the collider
- class contur.data.data_objects.Pool(row)[source]
Bases:
object
Class to store information about analysis pools
Properties:
id the short string identifying the pool
beamid the unique ID of the colliding beam type this pool is associated with
description a short human-readable description of the final state this pool contains.
- class contur.data.data_objects.SMPrediction(row)[source]
Bases:
object
Class to store information about SM predictions
Properties
Prediction metadata: (populated from the analysis DB)
id short string which, together with the analysis name, identifies this prediction
a_name the analysis name, including any options string
inspids inspire IDs of the theory references
origin short description of where the prediciton was obtained
pattern regexp. prediction applies to all measurements in this analysis whose name matches this (Only used when making the files in /Theory)
axis the name of the axis to take the theory from, if coming from a HEPData record. The record used will be the one where the end of the HEPData path matches this (Only used when making the files in /Theory)
file_name the name of the file the prediction is stored in, in the /Theory directory.
short_description for plot legends
long_description for web pages, does not need to repeat the short description
Prediction data: (Populated when the prediction data are read in from the file)
ao :dict: of analysis objects keyed by name
plotObj :dict: of plot objects keyed by name
corr :dict: of correlation matrices keyed by name
uncorr :dict: of diagonal error matrices keyed by name
errors :dict: of error breakdowns keyed by name
contur.data.data_access_db module
- contur.data.data_access_db.find_model_point_by_params(paramList)[source]
Send a list of parameters paramList, this will return the closest model point for which results are available in the results database.
- contur.data.data_access_db.find_param_point_db(paramList)[source]
Given a list of model parameters, search the results DB for the closest match, and return the associated yoda file names.
- contur.data.data_access_db.generate_model_and_parameter(model_db=False)[source]
Create the model and parameter tables and populate them
if model_db is True, they are written to the central model database, otherwise they are written to the local results db (and the other tables will also be created, empty)
- contur.data.data_access_db.get_model_id(run_info_path)[source]
check the model database to see if the model in run_info_path is present. if so, return its id (-1 if not found).
- contur.data.data_access_db.get_model_version(dir)[source]
for a model somewhere in the tree below dir, get its version
- contur.data.data_access_db.search_yoda_file(model_points)[source]
Sent a list of model_points, will return a list of corresponding yoda filenames.
contur.data.build_database
contur.data.static_db module
- contur.data.static_db.getNormInfo(h)
- Parameters:
h – (
string
) histogram path.
Returns:
isScaled - does this histogram need to be scaled to turn it into a differential cross section?
scaleFactor - the scale factor, if so (=1 otherwise)
nev_differential - factor for converting “number of events per something” plots (searches) into number of events. See
analysis.sql
for detailed description.
- contur.data.static_db.get_analyses(analysisid=None, poolid=None, beam=None, filter=True)[source]
Return a list of analysis objects
If no pool, beam or id supplied, return all valid analyses in the current config.
If analysisid is supplied, return only analyses with an id containing it
If poolid supplied, return only analyses associated with that pool
If beamid supplied, return only analyses associated with that beam
If more than one of the above supplied, they are ANDed.
Depending on the filter flag, the analyses will be filtered according to the current configuation or not.
Optional inputs: analysisid string, Beam object, poolid string, filter boolean.
- contur.data.static_db.get_beam_names(poolid=None, allow_all=False)[source]
Get the list of known beam names, specific to the named pool if given
- contur.data.static_db.get_beams(poolid=None)[source]
Get the list of known beam configurations, specific to the named pool if given
- contur.data.static_db.get_experiments(collider=None, beam=None)[source]
Get the list of known pool names, specific to a beam id (7/8/13TeV) if given
- contur.data.static_db.get_pool(path=None, poolid=None)[source]
Given a pool id only, return the pool object.
Given only the yoda path of a histogram, return the pool object it belongs to. Should work whether the analysis part of the path contains the option or not, since any given histo has a specific pool.
Given both, check for consistency and return the pool object or None, depending
Given neither, return None
- contur.data.static_db.get_pools(beamid=None)[source]
Get the list of known pool names, specific to a beam id (7/8/13TeV) if given
- contur.data.static_db.get_sm_theory(ana=None)[source]
Return a list of the SM theory predictions, if any, for the input analysis name. Otherwise return
False
.
- contur.data.static_db.hasBVeto(ana)[source]
Does this analysis have measurements with a b-jet-veto problem?
- contur.data.static_db.hasHiggsgg(ana)[source]
Does this analysis have Higgs -> photons measurements?
- contur.data.static_db.hasMETRatio(ana)
Does this analysis have missing-energy ratio measurements?
- contur.data.static_db.hasNuTrue(ana)[source]
Does this analysis have measurements with a truth-neutrino problem?
- contur.data.static_db.init_dbs()[source]
The principle function to read the database and populate dictionaries using the data. it is invoked by the first access request.
- contur.data.static_db.isMETRatio(h)
Is this a missing energy ratio plot?
- contur.data.static_db.isNorm(h)[source]
- Parameters:
h – (
string
) histogram path.
Returns:
isScaled - does this histogram need to be scaled to turn it into a differential cross section?
scaleFactor - the scale factor, if so (=1 otherwise)
nev_differential - factor for converting “number of events per something” plots (searches) into number of events. See
analysis.sql
for detailed description.
- contur.data.static_db.isRatio(h)[source]
Is this a ratio plot? :param h: (
string
) yoda histogram path
- contur.data.static_db.isSearch(h)[source]
Is this a search event-count plot?
- Parameters:
h – (
string
) yoda histogram path
- contur.data.static_db.is_soft(h)[source]
Is this a soft QCD plot :param h: (
string
) yoda histogram path
- contur.data.static_db.is_tracks_only(h)[source]
Is this a plot which only uses tracks? :param h: (
string
) yoda histogram path
- class contur.data.static_db.listdict[source]
Bases:
dict
Dictionary which returns an empty list if the key is missing.
- contur.data.static_db.obsFinder(h)[source]
Get meta dat (analysis, integrated luminosity, poolid, subpoolid) for a valid contur histogram. Else return INVALID.
- Parameters:
h – (
string
) yoda histogram path
- contur.data.static_db.passes_lists(ana, tag)[source]
Check the blacklist/whitelist status of the histogram name tag within analysis name ana. Only works if ana is the full analysis name, including options.
- contur.data.static_db.theoryComp(h)[source]
If this histogram always requires a SM theory comparison, return True.
- Parameters:
h – (
string
) yoda histogram path
- contur.data.static_db.validHisto(h, filter=True)[source]
Tests a histogram path to see if it is a valid contur histogram for this run (taking into account the run time flags). :arg h: the full path of a yoda analysis object :type: String
if invalid, return False. Otherwise return the full name of the analysis object the histogram belongs to.
contur.data.build_covariance module
- class contur.data.build_covariance.CovarianceBuilder(orig_ao, ao, aos, isScaled, scaleFactor, apply_min=True, ignore_corrs=False)[source]
Bases:
object
ao Yoda AO apply_min: apply the minimum number of systematic uncertainties criteria when determining whether or not to use the error breakdown for correlations.
Class to handle retrieval of annotations/errors from YODA objects
contur.data.sm_theory_builders module
- contur.data.sm_theory_builders.do_ATLAS_2012_I1199269(prediction)[source]
ATLAS 7TeV diphotons, 2gamma NNLO prediction read from paper S. Catani, L. Cieri, D. de Florian, G. Ferrera, and M. Grazzini, Diphoton production at hadron colliders: a fully-differential QCD calculation at NNLO, Phys. Rev. Lett. 108 (2012) 072001, [arXiv:1110.2375].
- contur.data.sm_theory_builders.do_ATLAS_2015_I1408516(prediction)[source]
ATLAS 8TeV Drell-Yan phi* and pT distributions Predictions from Bizon et al arXiv:1805.05916
- contur.data.sm_theory_builders.do_ATLAS_2016_I1457605(prediction)[source]
Photon+jet NNLO Calculation from arXiv:1904.01044 Xuan Chen, Thomas Gehrmann, Nigel Glover, Marius Hoefer, Alexander Huss
- contur.data.sm_theory_builders.do_ATLAS_2016_I1494075(prediction, mode_flag)[source]
ATLAS 8 TeV 4l/2l2nu Newly written rivet routine, verified with events generated by Powheg+Pythia 8
- contur.data.sm_theory_builders.do_ATLAS_2017_I1591327(prediction)[source]
ATLAS 8TeV diphotons, Matrix prediction prediction read from Predictions for the isolated diphoton production through NNLO in QCD and comparison to the 8 TeV ATLAS data Bouzid Boussaha, Farida Iddir, Lahouari Semlala arXiv:1803.09176 2gamma from S. Catani, L. Cieri, D. de Florian, G. Ferrera, and M. Grazzini, Diphoton production at hadron colliders: a fully-differential QCD calculation at NNLO, Phys. Rev. Lett. 108 (2012) 072001, [arXiv:1110.2375].
- contur.data.sm_theory_builders.do_ATLAS_2019_I1718132(prediction, mode_flag)[source]
ATLAS dilepton–dijet events in proton–proton collisions at COM energy of 13TeV. 3 modes: electron-electron, muon-muon and electron-muon
- contur.data.sm_theory_builders.do_ATLAS_2019_I1725190(prediction)[source]
ATLAS 13 TeV DY Run 2 search Fit to SM from the paper.
- contur.data.sm_theory_builders.do_ATLAS_2019_I1764342(prediction)[source]
ATLAS 13 TeV ll+photons There’s a version of this in HEPData with no uncertainties. Rerun by Xilin Wang to include scale uncertainties, which are calculated here from the RAW rivet weights output.
- contur.data.sm_theory_builders.do_ATLAS_2021_I1852328(prediction)[source]
ATLAS 13 TeV WW+jet the prediction is for the b-veto, so we need to scale it for the difference (taken from the difference in the data) y05 multiplied by the ratio y02/y01
- contur.data.sm_theory_builders.do_CMS_2017_I1467451(prediction)[source]
- CMS 8TeV H->WW pT distribution
Predictions from the paper