User Tools

Site Tools


plots:cms_lumi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plots:cms_lumi [2016/09/24 01:19] iwnplots:cms_lumi [2021/09/10 15:01] (current) iwn
Line 1: Line 1:
-See [[https://ghm.web.cern.ch/ghm/plots/]] for more guidelines and scripts (python and C++) like this and [[plots:tdrstyle|tdrstyle.py]].+Please see ''[[plots:cmsstyle|CMSStyle.py]]'' for an improved version of the code below. 
 + 
 +See [[https://ghm.web.cern.ch/ghm/plots/]] for more guidelines and scripts (python and C++) like this one and ''[[plots:tdrstyle|tdrstyle.py]]''. The macro below is slightly altered to include 2016 data (35.9 fb^(-1) at 13 TeV) and phase two (3000 fb^(-1) at 14 TeV).
  
  
Line 18: Line 20:
 extraTextFont = 52  extraTextFont = 52 
  
-lumiTextSize     = 0.8+lumiTextSize     = 0.6
 lumiTextOffset   = 0.2 lumiTextOffset   = 0.2
  
-cmsTextSize      = 0.85+cmsTextSize      = 0.75
 cmsTextOffset    = 0.1 cmsTextOffset    = 0.1
  
Line 30: Line 32:
 extraOverCmsTextSize  = 0.76 extraOverCmsTextSize  = 0.76
  
-lumi_13TeV = "40.fb^{-1}"+lumi_14TeV = "3000 fb^{-1}" 
 +lumi_13TeV = "35.fb^{-1}"
 lumi_8TeV  = "19.7 fb^{-1}"  lumi_8TeV  = "19.7 fb^{-1}" 
 lumi_7TeV  = "5.1 fb^{-1}" lumi_7TeV  = "5.1 fb^{-1}"
Line 36: Line 39:
  
 drawLogo      = False drawLogo      = False
 +outOfFrame    = False
  
 def CMS_lumi(pad,  iPeriod,  iPosX ): def CMS_lumi(pad,  iPeriod,  iPosX ):
-    outOfFrame    = False+    global outOfFrame, relPosX
     if(iPosX/10==0 ): outOfFrame = True     if(iPosX/10==0 ): outOfFrame = True
  
Line 90: Line 94:
     elif ( iPeriod==12 ):     elif ( iPeriod==12 ):
         lumiText += "8 TeV"         lumiText += "8 TeV"
 +    elif ( iPeriod==13 ):
 +        if( outOfFrame ):lumiText += "#scale[0.90]{"
 +        lumiText += lumi_13TeV
 +        lumiText += " (13 TeV)"
 +        if( outOfFrame): lumiText += "}"
 +    elif ( iPeriod==14 ):
 +        if( outOfFrame ):lumiText += "#scale[0.90]{"
 +        lumiText += lumi_14TeV
 +        lumiText += " (14 TeV, 200 PU)"
 +        if( outOfFrame): lumiText += "}"
     elif ( iPeriod==0 ):     elif ( iPeriod==0 ):
         lumiText += lumi_sqrtS         lumiText += lumi_sqrtS
Line 118: Line 132:
     posX_ = 0     posX_ = 0
     if( iPosX%10<=1 ):     if( iPosX%10<=1 ):
-        posX_ =   l + relPosX*(1-l-r)+        posX_ =   l + relPosX*(1-l-r)   # left aligned
     elif( iPosX%10==2 ):     elif( iPosX%10==2 ):
-        posX_ =  l + 0.5*(1-l-r)+        posX_ =  l + 0.5*(1-l-r)        # centered
     elif( iPosX%10==3 ):     elif( iPosX%10==3 ):
-        posX_ =  1-r - relPosX*(1-l-r)+        posX_ =  1-r - relPosX*(1-l-r)  # right aligned
  
     posY_ = 1-t - relPosY*(1-t-b)     posY_ = 1-t - relPosY*(1-t-b)
plots/cms_lumi.1474672761.txt.gz · Last modified: 2016/09/24 01:19 by iwn