From eda01198a70aacca7cde1652ff7d31e4d51907c3 Mon Sep 17 00:00:00 2001 From: Clemens Lange Date: Wed, 7 Feb 2024 17:26:10 +0100 Subject: [PATCH] Make luminosity unit configurable --- src/cmsstyle/cmsstyle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmsstyle/cmsstyle.py b/src/cmsstyle/cmsstyle.py index c52363e..442555f 100644 --- a/src/cmsstyle/cmsstyle.py +++ b/src/cmsstyle/cmsstyle.py @@ -17,11 +17,11 @@ def SetEnergy(energy): cms_energy = str(energy) -def SetLumi(lumi, round_lumi=False): +def SetLumi(lumi, unit="fb", round_lumi=False): global cms_lumi if lumi != "": cms_lumi = f"{lumi:.0f}" if round_lumi else f"{lumi}" - cms_lumi += " fb^{#minus1}" + cms_lumi += f" {unit}^{{#minus1}}" else: cms_lumi = lumi