Definition at line 145 of file plotBeamSpotVert.py.
 
◆ genPlot()
  
  | 
        
          | def ROOTUtils.PlotLibrary.genPlot | ( |  | self, |  
          |  |  |  | what = 'ALL', |  
          |  |  |  | code = 'plot', |  
          |  |  |  | labels = [], |  
          |  |  | * | args |  
          |  | ) |  |  |  | inherited | 
 
Make plots using a general code. genPlot makes either a single plot defined
   by argument what, or all plots (if what=''). The plots made in the latter
   case are specified by whatList. A canvas that is subdivided if necessary
   is created before the plotting code is called.
 
Definition at line 116 of file roofit/ROOTUtils.py.
  116     def genPlot(self,what='ALL',code='plot',labels=[],*args):
 
  117         """Make plots using a general code. genPlot makes either a single plot defined 
  118            by argument what, or all plots (if what=''). The plots made in the latter 
  119            case are specified by whatList. A canvas that is subdivided if necessary 
  120            is created before the plotting code is called.""" 
  121         if what==
'' or what.upper()==
'ALL':
 
  122             c = self.protect( MyCanvas(
'%s-%s-%s' % (self.name,what,code),
 
  123                                        self.allCanvasSize,self.allCanvasDivs[0],self.allCanvasDivs[1]) )
 
  125             for w 
in self.whatList:
 
  129                     self.__class__.__dict__[code](self,w,*args)
 
  131                     self.__class__.__bases__[0].__dict__[code](self,w,*args)
 
  134                 for o 
in self.gPadSaveAsList:
 
  136                         ROOT.gPad.SaveAs(
'%s-%s-%s%s' % (self.name,code,w,o))
 
  141             if labels!=[] 
and self.allCanvasDivs[0]*self.allCanvasDivs[1] > len(self.whatList):
 
  150                 print "ERROR: can't add labels unless we have an empty pad to use.  Ignoring labels." 
  152             for o 
in self.saveAsList:
 
  154                     c.SaveAs(
'%s-%s-%s%s' % (self.name,code,what,o))
 
  159             c = self.protect( MyCanvas(what,self.singleCanvasSize) )
 
  161                 self.__class__.__dict__[code](self,what,*args)
 
  163                 self.__class__.__bases__[0].__dict__[code](self,what,*args)
 
  165             for o 
in self.saveAsList:
 
  167                     c.SaveAs(
'%s-%s-%s%s' % (self.name,code,what,o))
 
 
 
◆ hist()
      
        
          | def plotBeamSpotVert.Plots.hist | ( |  | self | ) |  | 
      
 
Definition at line 147 of file plotBeamSpotVert.py.
  151         ROOT.gStyle.SetOptStat(options.optstat)
 
  153             ROOT.gStyle.SetOptFit(1111)
 
  155         c.SetRightMargin(0.14)
 
  156         h = 
ROOTUtils.protect(ROOT.TH1F(hname,
'Primary vertex: %s;Primary vertex %s %s' % (var,var,units),nbins,xmin,xmax))
 
  157         nt.Draw(
'%s >> %s' % (var,hname),cuts)
 
  161         comment = options.comment 
if options.comment 
is not None else '#geq %i tracks/vertex;%s' % (options.ntracks,options.cuts)
 
  163         ROOT.gPad.SetLogy(options.logy)
 
 
 
 
◆ histErr()
      
        
          | def plotBeamSpotVert.Plots.histErr | ( |  | self | ) |  | 
      
 
Definition at line 167 of file plotBeamSpotVert.py.
  171         ROOT.gStyle.SetOptStat(options.optstat)
 
  172         ROOT.gStyle.SetOptFit(0)
 
  174         c.SetRightMargin(0.14)
 
  175         h = 
ROOTUtils.protect(ROOT.TH1F(hname,
'Primary vertex error: %s;Primary vertex error #sqrt{V_{%s}} (#mum);Number of vertices' % (hname,vName),
 
  177         nt.Draw(
'1e3*sqrt(%s) >> %s' % (var,hname),cuts)
 
  179         comment = options.comment 
if options.comment 
is not None else '#geq %i tracks/vertex;%s' % (options.ntracks,options.cuts)
 
  181         ROOT.gPad.SetLogy(options.logy)
 
 
 
 
◆ histErrComp()
      
        
          | def plotBeamSpotVert.Plots.histErrComp | ( |  | self | ) |  | 
      
 
Definition at line 185 of file plotBeamSpotVert.py.
  185     def histErrComp(self):
 
  189         ROOT.gStyle.SetOptStat(0)
 
  190         ROOT.gStyle.SetOptFit(0)
 
  192         c.SetRightMargin(0.14)
 
  193         h = 
ROOTUtils.protect(ROOT.TH1F(hname,
'Vertex Error: %s;Vertex error #sqrt{V_{%s}} [#mum];Fraction of entries' % (hname,vName),
 
  195         nt.Draw(
'1e3*sqrt(%s) >> %s' % (var,hname),cuts)
 
  198         pname = hname+
'_pileup' 
  199         p = 
ROOTUtils.protect(ROOT.TH1F(pname,
'Vertex Error: %s;Vertex error #sqrt{V_{%s}} [#mum];Fraction of entries' % (hname,vName),
 
  201         pcuts = cuts.replace(
'vType==1',
'vType==3')
 
  203         nt.Draw(
'1e3*sqrt(%s) >> %s' % (var,pname),pcuts,
"SAME")
 
  209         comment = options.comment 
if options.comment 
is not None else '#geq %i tracks/vertex;%s' % (options.ntracks,options.cuts)
 
  211         legend = ROOT.TLegend(.50,.6,.85,.72)
 
  212         legend.AddEntry(h,
'Primary vertices',
'L')
 
  213         legend.AddEntry(p,
'Pileup vertices',
'L')
 
  214         legend.SetFillColor(0)
 
  215         legend.SetBorderSize(0)
 
  217         ROOT.gPad.SetLogy(options.logy)
 
 
 
◆ plot()
  
  | 
        
          | def ROOTUtils.PlotLibrary.plot | ( |  | self, |  
          |  |  |  | plotName = '', |  
          |  |  | * | args |  
          |  | ) |  |  |  | inherited | 
 
Make one or all (if plotName=='') plots.
 
Definition at line 106 of file roofit/ROOTUtils.py.
  106     def plot(self, plotName='',*args):
 
  107         """Make one or all (if plotName=='') plots.""" 
  109             self.__class__.__dict__[plotName](self,*args)
 
  111             for i 
in self.__class__.__dict__:
 
  112                 if i[0]==
'_': 
continue   
  113                 if i 
in self.otherMethods: 
continue 
  114                 self.__class__.__dict__[i](self,*args)
 
 
 
◆ protect()
  
  | 
        
          | def ROOTUtils.PlotLibrary.protect | ( |  | self, |  
          |  |  |  | obj |  
          |  | ) |  |  |  | inherited | 
 
Protect ROOT object from garbage collection.
 
Definition at line 101 of file roofit/ROOTUtils.py.
  102         """Protect ROOT object from garbage collection.""" 
  103         self.rootObjects.
append(obj)
 
 
 
 
◆ xz()
      
        
          | def plotBeamSpotVert.Plots.xz | ( |  | self | ) |  | 
      
 
Definition at line 221 of file plotBeamSpotVert.py.
  223         ROOT.gStyle.SetOptStat(0)
 
  225         c.SetRightMargin(0.14)
 
  226         h = 
ROOTUtils.protect(ROOT.TH2F(
'pvXZ',
'Primary vertex: x vs z;Primary vertex z [mm];Primary vertex x [mm]',nbins,xmin,xmax,nbins,ymin,ymax))
 
  227         nt.Draw(
'x:z >> pvXZ',cuts)
 
  229         h.GetYaxis().SetTitleOffset(1.0)
 
 
 
 
◆ yx()
      
        
          | def plotBeamSpotVert.Plots.yx | ( |  | self | ) |  | 
      
 
Definition at line 249 of file plotBeamSpotVert.py.
  250         ROOT.gStyle.SetOptStat(0)
 
  252         c.SetRightMargin(0.14)
 
  253         h = 
ROOTUtils.protect(ROOT.TH2F(
'pvYX',
'Primary vertex: y vs x;Primary vertex x [mm];Primary vertex y [mm]',nbins,xmin,xmax,nbins,ymin,ymax))
 
  254         nt.Draw(
'y:x >> pvYX',cuts)
 
  256         h.GetYaxis().SetTitleOffset(1.0)
 
 
 
 
◆ yz()
      
        
          | def plotBeamSpotVert.Plots.yz | ( |  | self | ) |  | 
      
 
Definition at line 236 of file plotBeamSpotVert.py.
  237         ROOT.gStyle.SetOptStat(0)
 
  239         c.SetRightMargin(0.14)
 
  240         h = 
ROOTUtils.protect(ROOT.TH2F(
'pvYZ',
'Primary vertex: y vs z;Primary vertex z [mm];Primary vertex y [mm]',nbins,xmin,xmax,nbins,ymin,ymax))
 
  241         nt.Draw(
'y:z >> pvYZ',cuts)
 
  243         h.GetYaxis().SetTitleOffset(1.0)
 
 
 
 
◆ allCanvasDivs
  
  | 
        
          | ROOTUtils.PlotLibrary.allCanvasDivs |  | inherited | 
 
 
◆ allCanvasSize
  
  | 
        
          | ROOTUtils.PlotLibrary.allCanvasSize |  | inherited | 
 
 
◆ gPadSaveAsList
  
  | 
        
          | ROOTUtils.PlotLibrary.gPadSaveAsList |  | inherited | 
 
 
◆ name
  
  | 
        
          | ROOTUtils.PlotLibrary.name |  | inherited | 
 
 
◆ otherMethods
  
  | 
        
          | ROOTUtils.PlotLibrary.otherMethods |  | inherited | 
 
 
◆ rootObjects
  
  | 
        
          | ROOTUtils.PlotLibrary.rootObjects |  | inherited | 
 
 
◆ saveAsList
  
  | 
        
          | ROOTUtils.PlotLibrary.saveAsList |  | inherited | 
 
 
◆ singleCanvasSize
  
  | 
        
          | ROOTUtils.PlotLibrary.singleCanvasSize |  | inherited | 
 
 
◆ whatList
  
  | 
        
          | ROOTUtils.PlotLibrary.whatList |  | inherited | 
 
 
The documentation for this class was generated from the following file:
 
def drawText(x=0.74, y=0.87, dy=0.06, text='', font=62, color=1, align=11, linesep=';')