From 15aa957e68469492a32a684351b6f6f577c9d4c6 Mon Sep 17 00:00:00 2001 From: Kati Lassila-Perini Date: Mon, 12 Jun 2023 16:33:56 +0200 Subject: [PATCH] cms-YYYY-luminosity: add value for reverse lumi uncertainty for ppb --- cms-YYYY-luminosity/code/lumi_records.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cms-YYYY-luminosity/code/lumi_records.py b/cms-YYYY-luminosity/code/lumi_records.py index a9430c582..10a7e6fec 100644 --- a/cms-YYYY-luminosity/code/lumi_records.py +++ b/cms-YYYY-luminosity/code/lumi_records.py @@ -72,6 +72,17 @@ def create_record(recid, year, era, runtype, uncertainty, lumi_ref, val_recid): else: print("Runtype unknown!") + # additional text for pPb reverse luminosity + inverse_text = "" + if "pPb" in runtype: + url = "http://api-server-cms-release-info.app.cern.ch/years/lumi_uncertainty_reverse?year=2013&type=pPb" + reverse_lumi = json.loads(requests.get(url).text.strip())[0] + inverse_text = ( + "(" + + str(reverse_lumi) + + "% for the reverse beam direction) " + ) + # normtag file only after Run-1 normtag_text = "" if int(year) > 2014: @@ -110,8 +121,8 @@ def create_record(recid, year, era, runtype, uncertainty, lumi_ref, val_recid): % (collision_text, year, ",".join(od_runs), ",".join(od_runs), pp_text) + '

For luminosity calculation, a detailed list of luminosity by lumi section is provided in %s_%slumibyls.csv for the list of validated runs and lumi sections.

' % (recid, runtype, year, runtype, year, val_recid) - + '

The uncertainty in the luminosity measurement of %s data should be considered as %s%% (reference %s).

' - % (year, uncertainty, lumi_ref, lumi_ref_title) + + '

The uncertainty in the luminosity measurement of %s data should be considered as %s%% %s(reference %s).

' + % (year, uncertainty, inverse_text, lumi_ref, lumi_ref_title) + '

In your estimate for the integrated luminosity, check for which runs the trigger you have selected is active and sum the values for those runs. For prescaled triggers, the change of prescales (run, lumi section, index of prescales referring to the PrescaleService module in the High-Level Trigger configuration files) is recorded in prescale_%s%s.csv.

' % (recid, runtype, year, runtype, year) + '

Additional information on how to extract luminosity values using the brilcalc tool can be found in the luminosity calculation guide.

'