Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:23

0001 # Implementation to draw APE trends
0002 # to check convergence
0003 
0004 import ROOT
0005 from trendPlotter import *
0006 from granularity import *
0007 import os
0008 
0009 try:
0010     base = os.environ['CMSSW_BASE']
0011 except KeyError:
0012     base = "../../../../.."
0013 
0014 plot = TrendPlotter()
0015 plot.setOutputPath(base+"/src/Alignment/APEEstimation/trends/") 
0016 plot.setTitle("Title")
0017 plot.setGranularity(standardGranularity)
0018 
0019 # The x-axis range is chosen depending on which year's APE are drawn.
0020 # One can draw APE trends over multiple years
0021 
0022 # List of tuples for one trend
0023 trendList = []
0024 # The last run is for example the first run of the next IOV minus 1
0025 #~ trendsList.append( (firstRun, lastRun, inputFile) )
0026 
0027 # label, trendList, color (optional, automatic), marker (optional, 0) 
0028 # other options: dashed(optional, false)
0029 plot.addTrend("label", trendList, color = ROOT.kBlack, marker=0)
0030 
0031 # if this is set to false, the plot is made with runs on the x-axis
0032 plot.doLumi = True
0033 
0034 # if this is set to true, a logarithmic y-axis is used
0035 plot.log = False
0036 
0037 plot.draw()