Skip to content

Commit

Permalink
Merge pull request #39 from ttedeschi/set-energy-unit
Browse files Browse the repository at this point in the history
Make centre-of-mass energy unit editable
  • Loading branch information
ttedeschi authored Apr 17, 2024
2 parents 3582c2f + f4670c9 commit 67584d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmsstyle/cmsstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
rt.gROOT.SetBatch(rt.kTRUE)

cms_lumi = "Run 2, 138 fb^{#minus1}"
cms_energy = "13"
cms_energy = "13 TeV"


def SetEnergy(energy):
def SetEnergy(energy, unit = "TeV"):
global cms_energy
cms_energy = str(energy)
cms_energy = str(energy) + " " + unit


def SetLumi(lumi, unit="fb", round_lumi=False):
Expand Down Expand Up @@ -300,7 +300,7 @@ def CMS_lumi(pad, iPosX=11, scaleLumi=None):
lumiText = ""
lumiText += cms_lumi
if cms_energy != "":
lumiText += " (" + cms_energy + " TeV)"
lumiText += " (" + cms_energy + ")"
if scaleLumi:
lumiText = ScaleText(lumiText, scale=scaleLumi)

Expand Down

0 comments on commit 67584d6

Please sign in to comment.