ATLAS Offline Software
Classes | Functions | Variables
beamspotPlotBcids Namespace Reference

Classes

class  Beamspot
 
class  Event
 

Functions

def makeListFromString (s, token=',')
 
def AddText (xmin, ymin, text, size=0.015, font=None)
 
def findBeamspots (file, dir, pattern)
 
def makeFloatFromString (s)
 
def splitBeamspotTreeTitle (title, cutToken="CUT")
 
def getTree (name, file, dir)
 
def makePull (tree, xval='x0', xcov='x0x0', xTrue=0., isCovErr=True, xlow=-8, xhigh=8, xbins=100, doGausFit=False, cuts="")
 
def makeBeamspotPlots (name, beamspots)
 
def makeBeamspotCutPlots (name, points)
 
def makeCutPlotPulls (file, dir, pattern, name)
 

Variables

string __author__ = 'James Walder'
 
string __version__ = '$Id$'
 
string __usage__ = '%prog [options] '
 
 parser = OptionParser(usage=__usage__, version=__version__)
 
 dest
 
 default
 
 help
 
 action
 
 False
 
 options
 
 args
 
list legends = []
 
list pdglines = []
 
list labels = []
 
list ghists = []
 
list failed = []
 
list graphs = []
 
list canvases = []
 
float PointSize = 1.6
 
float MaxHeightFactor = 1.5
 
float plotTextSize = 0.04
 
def files = makeListFromString(options.files)
 
 fii = TFile(files[0])
 
def infiles = makeListFromString(options.files)
 open the files More...
 
 chain = TChain(options.dir+"/"+options.tree)
 
 nEntries = chain.GetEntries()
 
 lrun = chain.GetLeaf("event/run")
 
 lbcid = chain.GetLeaf("event/bcid")
 
 lnEvents = chain.GetLeaf("event/nEvents")
 
 llbStart = chain.GetLeaf("event/lumiStart")
 
 llumiRange = chain.GetLeaf("event/lumiRange")
 
 lstatusWord = chain.GetLeaf("event/statusWord")
 
 lx0 = chain.GetLeaf("bs/x0")
 
 ly0 = chain.GetLeaf("bs/y0")
 
 lz = chain.GetLeaf("bs/z")
 
 lsx = chain.GetLeaf("bs/sx")
 
 lsy = chain.GetLeaf("bs/sy")
 
 lsz = chain.GetLeaf("bs/sz")
 
 lax = chain.GetLeaf("bs/ax")
 
 lay = chain.GetLeaf("bs/ay")
 
 lrhoxy = chain.GetLeaf("bs/rhoxy")
 
 lk = chain.GetLeaf("bs/k")
 
 lxc = chain.GetLeaf("bsCentroid/xc")
 
 lyc = chain.GetLeaf("bsCentroid/yc")
 
 lCovx0 = chain.GetLeaf("bsCov/x0x0")
 
 lCovy0 = chain.GetLeaf("bsCov/y0y0")
 
 lCovz = chain.GetLeaf("bsCov/zz")
 
 lCovsx = chain.GetLeaf("bsCov/sxsx")
 
 lCovsy = chain.GetLeaf("bsCov/sysy")
 
 lCovsz = chain.GetLeaf("bsCov/szsz")
 
 lCovax = chain.GetLeaf("bsCov/axax")
 
 lCovay = chain.GetLeaf("bsCov/ayay")
 
 lCovrhoxy = chain.GetLeaf("bsCov/rhoxyrhoxy")
 
 lCovk = chain.GetLeaf("bsCov/kk")
 
 lCovxc = chain.GetLeaf("bsCovCentroid/xcxc")
 
 lCovyc = chain.GetLeaf("bsCovCentroid/ycyc")
 
dictionary bcidEvents = {}
 format of data More...
 
int count = 0
 
 run = lrun.GetValue()
 
 bcid = lbcid.GetValue()
 
 nEvents = lnEvents.GetValue()
 
 lbStart = llbStart.GetValue()
 
 lumiRange = llumiRange.GetValue()
 
 statusWord = lstatusWord.GetValue()
 
 evt = Event()
 
 bs = Beamspot()
 
 x0
 
 y0
 
 xc
 
 yc
 
 z
 
 sx
 
 sy
 
 sz
 
 ax
 
 ay
 
 k
 
 rhoxy
 
 Ek
 
 Ex0
 
 Ey0
 
 Exc
 
 Eyc
 
 Ez
 
 Esx
 
 Esy
 
 Esz
 
 Eax
 
 Eay
 
 Erhoxy
 
dictionary plots = {}
 
 cx = TCanvas("cx","",800,600)
 v[6].Draw("ap") c.cd(11) v[7].Draw("ap") canvases.append(c) More...
 
 cy = TCanvas("cy","",800,600)
 
 cz = TCanvas("cz","",800,600)
 
 csx = TCanvas("csx","",800,600)
 
 csy = TCanvas("csy","",800,600)
 
 csz = TCanvas("csz","",800,600)
 
 cax = TCanvas("cax","",800,600)
 
 cay = TCanvas("cay","",800,600)
 
 ck = TCanvas("ck","",800,600)
 
 crhoxy = TCanvas("crhoxy","",800,600)
 
 cnEvents = TCanvas("cnEvents","",800,600)
 
 legx = TLegend(0.75,0.65,0.92,0.94)
 
 legy = TLegend(0.75,0.65,0.92,0.94)
 
 legz = TLegend(0.75,0.65,0.92,0.94)
 
 legsx = TLegend(0.75,0.65,0.92,0.94)
 
 legsy = TLegend(0.75,0.65,0.92,0.94)
 
 legsz = TLegend(0.75,0.65,0.92,0.94)
 
 legax = TLegend(0.75,0.65,0.92,0.94)
 
 legay = TLegend(0.75,0.65,0.92,0.94)
 
 legk = TLegend(0.75,0.65,0.92,0.94)
 
 legrhoxy = TLegend(0.75,0.65,0.92,0.94)
 
 legnEvents = TLegend(0.75,0.65,0.92,0.94)
 
list legs = [ legx,legy ,legz ,legsx,legsy,legsz,legax,legay,legk ,legrhoxy,legnEvents]
 
int c = 0
 
int m = 0
 
bool first = True
 
list colours = [ EColor.kRed+1, EColor.kBlue+1, EColor.kGreen-8, EColor.kYellow+4]
 
list markers = [20,25,22,27,23,28,30,21]
 
string dr = "apl"
 
list x = [v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10]]
 
 a = i.GetYaxis()
 
 min = a.GetXmin()
 
 max = a.GetXmax()
 
float fontSize = 0.1
 
 s = raw_input('--> ')
 

Function Documentation

◆ AddText()

def beamspotPlotBcids.AddText (   xmin,
  ymin,
  text,
  size = 0.015,
  font = None 
)

Definition at line 19 of file beamspotPlotBcids.py.

19 def AddText(xmin,ymin,text,size=0.015, font=None):
20  m = TLatex() # //l.SetTextAlign(12); l.SetTextSize(tsize);
21  m.SetNDC();
22  #m.SetTextFont(72);
23  m.SetTextColor(EColor.kBlack);
24  m.SetTextSize(size)
25  if font != None:
26  m.SetTextFont(font)
27  m.DrawLatex(xmin,ymin,text);
28  labels.append(m)
29 
30 

◆ findBeamspots()

def beamspotPlotBcids.findBeamspots (   file,
  dir,
  pattern 
)

Definition at line 135 of file beamspotPlotBcids.py.

135 def findBeamspots(file,dir, pattern):
136  import re
137  from ROOT import gDirectory
138  file.cd(dir)
139  p = re.compile(pattern)
140  print p.pattern
141  n = gDirectory.GetListOfKeys().GetSize()
142  print "N: ", n
143  matched = []
144  for i in range(n):
145  name = gDirectory.GetListOfKeys().At(i).GetName()
146  if not p.match(name):
147  continue
148  print name
149  #print p.match(name)
150  h = gDirectory.Get(gDirectory.GetListOfKeys().At(i).GetName())
151  #print h, h.GetName()
152  matched.append(h)
153 
154  file.cd()
155  return matched
156 
157 

◆ getTree()

def beamspotPlotBcids.getTree (   name,
  file,
  dir 
)

Definition at line 180 of file beamspotPlotBcids.py.

180 def getTree(name, file, dir):
181  tr = file.Get( dir +"/" + name)
182  print type(tr)
183  return tr
184 
185 # beamspot tree-type stuff

◆ makeBeamspotCutPlots()

def beamspotPlotBcids.makeBeamspotCutPlots (   name,
  points 
)

Definition at line 305 of file beamspotPlotBcids.py.

305 def makeBeamspotCutPlots(name, points):
306  nPoints = len(points)
307 
308  x = TGraphErrors(nPoints)
309  x.SetName(name)
310  x.SetTitle(name + " x; lb; x [mm]")
311  y = TGraphErrors(nPoints)
312  y.SetName(name)
313  y.SetTitle(name + " y; lb; y [mm]")
314  z = TGraphErrors(nPoints)
315  z.SetName(name)
316  z.SetTitle(name + " z; lb; z [mm]")
317  sx = TGraphErrors(nPoints)
318  sx.SetName(name)
319  sx.SetTitle(name + " sx; lb; #sigma(x) [mm]")
320  sy = TGraphErrors(nPoints)
321  sy.SetName(name)
322  sy.SetTitle(name + " sy; lb; #sigma(y) [mm]")
323  sz = TGraphErrors(nPoints)
324  sz.SetName(name)
325  sz.SetTitle(name + " sz; lb; #sigma(z) [mm]")
326 
327  xrms = TGraphErrors(nPoints)
328  xrms.SetName(name+"_rms")
329  xrms.SetTitle(name+"_rms" + " x")
330  yrms = TGraphErrors(nPoints)
331  yrms.SetName(name+"_rms")
332  yrms.SetTitle(name+"_rms" + " y")
333  zrms = TGraphErrors(nPoints)
334  zrms.SetName(name+"_rms")
335  zrms.SetTitle(name+"_rms" + " z")
336  sxrms = TGraphErrors(nPoints)
337  sxrms.SetName(name+"_rms")
338  sxrms.SetTitle(name+"_rms" + " sx")
339  syrms = TGraphErrors(nPoints)
340  syrms.SetName(name+"_rms")
341  syrms.SetTitle(name+"_rms" + " sy")
342  szrms = TGraphErrors(nPoints)
343  szrms.SetName(name+"_rms")
344  szrms.SetTitle(name+"_rms" + " sz")
345 
346  graphs.extend([x,y,z,sx,sy,sz,xrms,yrms,zrms,sxrms,syrms,szrms])
347  print len(points)
348  for i in range(len(points)):
349  xval = points[i][0]
350  yvals = points[i][1]
351 
352  xerr =0;
353 
354  x.SetPoint(i, xval, yvals[0][0])
355  y.SetPoint(i, xval, yvals[1][0])
356  z.SetPoint(i, xval, yvals[2][0])
357  sx.SetPoint(i, xval, yvals[3][0])
358  sy.SetPoint(i, xval, yvals[4][0])
359  sz.SetPoint(i, xval, yvals[5][0])
360 
361  x.SetPointError(i, xerr, yvals[0][1])
362  y.SetPointError(i, xerr, yvals[1][1])
363  z.SetPointError(i, xerr, yvals[2][1])
364  sx.SetPointError(i, xerr, yvals[3][1])
365  sy.SetPointError(i, xerr, yvals[4][1])
366  sz.SetPointError(i, xerr, yvals[5][1])
367 
368 
369  xrms.SetPoint(i, xval, yvals[0][2])
370  yrms.SetPoint(i, xval, yvals[1][2])
371  zrms.SetPoint(i, xval, yvals[2][2])
372  sxrms.SetPoint(i, xval, yvals[3][2])
373  syrms.SetPoint(i, xval, yvals[4][2])
374  szrms.SetPoint(i, xval, yvals[5][2])
375 
376  xrms.SetPointError(i, xerr, yvals[0][3])
377  yrms.SetPointError(i, xerr, yvals[1][3])
378  zrms.SetPointError(i, xerr, yvals[2][3])
379  sxrms.SetPointError(i, xerr, yvals[3][3])
380  syrms.SetPointError(i, xerr, yvals[4][3])
381  szrms.SetPointError(i, xerr, yvals[5][3])
382 
383  c = TCanvas("cx")
384  c.Divide(3,1)
385  c.cd(1)
386  x.Draw("ap")
387  c.cd(2)
388  y.Draw("ap+Y+")
389  c.cd(3)
390  yaxis_xrms = TGaxis( -1, 0.2, 1 ,0.2, -1, 2,510,"+R")
391  yaxis_xrms.ImportAxisAttributes( y.GetHistogram().GetYaxis() )
392  #g = TMultiGraph()
393  #g.Add(x,"aXp")
394  #g.Add(y,"aY*")
395  #g.Draw("a")
396  # graphs.append(g)
397  # aa = y.GetHistogram()
398 
399  #x.Draw("ap")
400  yaxis_xrms.Draw()
401  #axis.PaintAxis(0,0.5,0.1,0.6,0.4,1.4,510,"+R")
402  #y.Draw("pY+sames")
403  #b.Draw("sames")
404  c.Modified()
405  c.Update()
406  #c.Print()
407  canvases.append(c)
408 

◆ makeBeamspotPlots()

def beamspotPlotBcids.makeBeamspotPlots (   name,
  beamspots 
)

Definition at line 225 of file beamspotPlotBcids.py.

225 def makeBeamspotPlots( name, beamspots):
226  if len(beamspots) == 0:
227  print "No beamspot"
228 
229  nPoints = len(beamspots)
230  print "Found", nPoints
231 
232  x = TGraphErrors(nPoints)
233  x.SetName(name + "_x")
234  x.SetTitle(name + " x; lb; x [mm]")
235  y = TGraphErrors(nPoints)
236  y.SetName(name + "_y")
237  y.SetTitle(name + " y; lb; y [mm]")
238  z = TGraphErrors(nPoints)
239  z.SetName(name + "_z")
240  z.SetTitle(name + " z; lb; z [mm]")
241  sx = TGraphErrors(nPoints)
242  sx.SetName(name + "_sx")
243  sx.SetTitle(name + " sx; lb; #sigma(x) [mm]")
244  sy = TGraphErrors(nPoints)
245  sy.SetName(name + "_sy")
246  sy.SetTitle(name + " sy; lb; #sigma(y) [mm]")
247  sz = TGraphErrors(nPoints)
248  sz.SetName(name + "_sz")
249  sz.SetTitle(name + " sz; lb; #sigma(z) [mm]")
250  ax = TGraphErrors(nPoints)
251  ax.SetName(name + "_ax")
252  ax.SetTitle(name + " ax; lb; slope x-z [rad]")
253  ay = TGraphErrors(nPoints)
254  ay.SetName(name + "_ay")
255  ay.SetTitle(name + " ay; lb; slope y-z [rad]")
256  k = TGraphErrors(nPoints)
257  k.SetName(name + "_k")
258  k.SetTitle(name + " k; lb; k")
259  rhoxy = TGraphErrors(nPoints)
260  rhoxy.SetName(name + "_rhoxy")
261  rhoxy.SetTitle(name + " rhoxy; lb; #rho_{xy}")
262 
263  nEvents= TGraphErrors(nPoints)
264  nEvents.SetName(name + "_nEvents")
265  nEvents.SetTitle(name + " nEvents; lb; nEvents")
266 
267 
268 
269  graphs.extend([x,y,z,sx,sy,sz,ax,ay,k,rhoxy,nEvents])
270 
271  point =0
272  for evt,bs in beamspots:
273  xmid = evt.lbStart + 0.5*evt.lumiRange
274  xerr = 0.5*evt.lumiRange
275 
276  x.SetPoint(point, xmid, bs.xc)
277  y.SetPoint(point, xmid, bs.yc)
278  z.SetPoint(point, xmid, bs.z)
279  sx.SetPoint(point, xmid,bs.sx )
280  sy.SetPoint(point, xmid,bs.sy )
281  sz.SetPoint(point, xmid,bs.sz )
282  ax.SetPoint(point, xmid, bs.ax)
283  ay.SetPoint(point, xmid, bs.ay)
284  k.SetPoint(point, xmid, bs.k)
285  rhoxy.SetPoint(point, xmid, bs.rhoxy)
286 
287  nEvents.SetPoint(point, xmid, evt.nEvents)
288 
289  x.SetPointError(point, xerr,bs.Exc )
290  y.SetPointError(point, xerr,bs.Eyc )
291  z.SetPointError(point, xerr,bs.Ez )
292  sx.SetPointError(point, xerr,bs.Esx )
293  sy.SetPointError(point, xerr,bs.Esy )
294  sz.SetPointError(point, xerr,bs.Esz )
295  ax.SetPointError(point, xerr,bs.Eax )
296  ay.SetPointError(point, xerr,bs.Eay )
297 
298  k.SetPointError(point, xerr, bs.Ek)
299  rhoxy.SetPointError(point, xerr, bs.Erhoxy)
300  nEvents.SetPointError(point, xerr, sqrt(evt.nEvents))
301 
302  point = point + 1
303  return (x,y,z,sx,sy,sz,ax,ay,k,rhoxy,nEvents)
304 

◆ makeCutPlotPulls()

def beamspotPlotBcids.makeCutPlotPulls (   file,
  dir,
  pattern,
  name 
)

Definition at line 409 of file beamspotPlotBcids.py.

409 def makeCutPlotPulls( file, dir, pattern, name):
410  trueVals = { 'x0':-0.15, 'y0':1., 'z':-9., 'sx':'0.72', 'sy':'0.42', 'sz':44, 'ax':'0.', 'ay':0., 'k':1, 'rhoxy':0.0}
411 
412  # list of trees
413  matched = findBeamspots(file, dir, pattern)
414  points= []
415 
416  for i in matched:
417  # loop over trees and get cut values
418  o, n = splitBeamspotTreeTitle( i.GetName(), "CUT" )
419  # make assumption of only one cut value
420  xval = o[o.keys()[0]]
421  print "JW: ", xval
422  xpos = makePull( getTree( i.GetName(), file, dir), xval='x0', xcov='x0x0', xTrue=trueVals['x0'])
423  ypos = makePull( getTree( i.GetName(), file, dir), xval='y0', xcov='y0y0', xTrue=trueVals['y0'])
424  zpos = makePull( getTree( i.GetName(), file, dir), xval='z', xcov='zz', xTrue=trueVals['z'])
425 
426  sx = makePull( getTree( i.GetName(), file, dir), xval='sx', xcov='sxsx', xTrue=trueVals['sx'])
427  sy = makePull( getTree( i.GetName(), file, dir), xval='sy', xcov='sysy', xTrue=trueVals['sy'])
428  sz = makePull( getTree( i.GetName(), file, dir), xval='sz', xcov='szsz', xTrue=trueVals['sz'])
429  ax = makePull( getTree( i.GetName(), file, dir), xval='ax', xcov='axax', xTrue=trueVals['ax'])
430  ay = makePull( getTree( i.GetName(), file, dir), xval='ay', xcov='ayay', xTrue=trueVals['ay'])
431  k = makePull( getTree( i.GetName(), file, dir), xval='k', xcov='kk', xTrue=trueVals['k'])
432  rhoxy = makePull( getTree( i.GetName(), file, dir), xval='rhoxy', xcov='rhoxyrhoxy', xTrue=trueVals['rhoxy'])
433  points.append( (xval, [xpos, ypos, zpos, sx, sy, sz, ax, ay, k, rhoxy ]) )
434 
435 
436  plots = makeBeamspotCutPlots(name, points)
437 
438 

◆ makeFloatFromString()

def beamspotPlotBcids.makeFloatFromString (   s)

Definition at line 158 of file beamspotPlotBcids.py.

158 def makeFloatFromString(s):
159  subs = { 'p':'.', 'm':'-' }
160  n = ""
161  for i in s:
162  c = i
163  if i in subs.keys():
164  c = subs[i]
165  n = n+c
166  return float(n)
167 
168 

◆ makeListFromString()

def beamspotPlotBcids.makeListFromString (   s,
  token = ',' 
)

Definition at line 14 of file beamspotPlotBcids.py.

14 def makeListFromString(s,token=','):
15  names = s.split(token)
16  return names
17 
18 

◆ makePull()

def beamspotPlotBcids.makePull (   tree,
  xval = 'x0',
  xcov = 'x0x0',
  xTrue = 0.,
  isCovErr = True,
  xlow = -8,
  xhigh = 8,
  xbins = 100,
  doGausFit = False,
  cuts = "" 
)

Definition at line 186 of file beamspotPlotBcids.py.

186 def makePull( tree, xval='x0',xcov='x0x0', xTrue=0., isCovErr=True, xlow=-8, xhigh=8, xbins=100, doGausFit=False, cuts=""):
187  h = TH1D("hPull_"+tree.GetName()+"_"+xval, "hPull_"+tree.GetName()+"_"+xval, xbins, xlow,xhigh)
188  if isCovErr:
189  p = '(%(x)s - %(t)s)/sqrt(%(e)s) >> %(h)s' % { 'x':xval, 't':xTrue, 'e':xcov, 'h':h.GetName()}
190  else:
191  p = '(%(x)s - %(t)s)/(%(e)s) >> %(h)s' % { 'x':xval, 't':xTrue, 'e':xcov, 'h':h.GetName()}
192  print p
193  tree.Draw( p , cuts);
194  h.Print()
195 
196  mean = h.GetMean()
197  meanErr = h.GetMeanError()
198  rms = h.GetRMS()
199  rmsErr = h.GetRMSError()
200  if doGausFit:
201  h.Fit("gaus","LL")
202  f = h.GetFunction("gaus")
203  mean = f.GetParameter(1)
204  meanErr = f.GetParError(1)
205  rms = f.GetParameter(2)
206  rmsErr = f.GetParError(2)
207 
208  return (mean, meanErr, rms, rmsErr)
209 
210 
211 # Start of main programs
212 
213 #Open the files
214 

◆ splitBeamspotTreeTitle()

def beamspotPlotBcids.splitBeamspotTreeTitle (   title,
  cutToken = "CUT" 
)

Definition at line 169 of file beamspotPlotBcids.py.

169 def splitBeamspotTreeTitle(title, cutToken="CUT"):
170  t = title.split(cutToken)
171  namestring = t[0].strip('_')
172  cutstring = t[-1].strip('_')
173  cuts = cutstring.split('_')
174  output = {}
175  for i in range(0,len(cuts),2):
176  output[cuts[i]] = makeFloatFromString(cuts[i+1])
177 
178  return output,namestring
179 

Variable Documentation

◆ __author__

string beamspotPlotBcids.__author__ = 'James Walder'
private

Definition at line 10 of file beamspotPlotBcids.py.

◆ __usage__

string beamspotPlotBcids.__usage__ = '%prog [options] '
private

Definition at line 12 of file beamspotPlotBcids.py.

◆ __version__

string beamspotPlotBcids.__version__ = '$Id$'
private

Definition at line 11 of file beamspotPlotBcids.py.

◆ a

beamspotPlotBcids.a = i.GetYaxis()

Definition at line 622 of file beamspotPlotBcids.py.

◆ action

beamspotPlotBcids.action

Definition at line 101 of file beamspotPlotBcids.py.

◆ args

beamspotPlotBcids.args

Definition at line 104 of file beamspotPlotBcids.py.

◆ ax

beamspotPlotBcids.ax

Definition at line 522 of file beamspotPlotBcids.py.

◆ ay

beamspotPlotBcids.ay

Definition at line 523 of file beamspotPlotBcids.py.

◆ bcid

beamspotPlotBcids.bcid = lbcid.GetValue()

Definition at line 491 of file beamspotPlotBcids.py.

◆ bcidEvents

dictionary beamspotPlotBcids.bcidEvents = {}

format of data

Definition at line 484 of file beamspotPlotBcids.py.

◆ bs

beamspotPlotBcids.bs = Beamspot()

Definition at line 513 of file beamspotPlotBcids.py.

◆ c

int beamspotPlotBcids.c = 0

Definition at line 611 of file beamspotPlotBcids.py.

◆ canvases

list beamspotPlotBcids.canvases = []

Definition at line 125 of file beamspotPlotBcids.py.

◆ cax

beamspotPlotBcids.cax = TCanvas("cax","",800,600)

Definition at line 587 of file beamspotPlotBcids.py.

◆ cay

beamspotPlotBcids.cay = TCanvas("cay","",800,600)

Definition at line 588 of file beamspotPlotBcids.py.

◆ chain

beamspotPlotBcids.chain = TChain(options.dir+"/"+options.tree)

Definition at line 442 of file beamspotPlotBcids.py.

◆ ck

beamspotPlotBcids.ck = TCanvas("ck","",800,600)

Definition at line 589 of file beamspotPlotBcids.py.

◆ cnEvents

beamspotPlotBcids.cnEvents = TCanvas("cnEvents","",800,600)

Definition at line 591 of file beamspotPlotBcids.py.

◆ colours

list beamspotPlotBcids.colours = [ EColor.kRed+1, EColor.kBlue+1, EColor.kGreen-8, EColor.kYellow+4]

Definition at line 614 of file beamspotPlotBcids.py.

◆ count

int beamspotPlotBcids.count = 0

Definition at line 486 of file beamspotPlotBcids.py.

◆ crhoxy

beamspotPlotBcids.crhoxy = TCanvas("crhoxy","",800,600)

Definition at line 590 of file beamspotPlotBcids.py.

◆ csx

beamspotPlotBcids.csx = TCanvas("csx","",800,600)

Definition at line 584 of file beamspotPlotBcids.py.

◆ csy

beamspotPlotBcids.csy = TCanvas("csy","",800,600)

Definition at line 585 of file beamspotPlotBcids.py.

◆ csz

beamspotPlotBcids.csz = TCanvas("csz","",800,600)

Definition at line 586 of file beamspotPlotBcids.py.

◆ cx

beamspotPlotBcids.cx = TCanvas("cx","",800,600)

v[6].Draw("ap") c.cd(11) v[7].Draw("ap") canvases.append(c)

Definition at line 581 of file beamspotPlotBcids.py.

◆ cy

beamspotPlotBcids.cy = TCanvas("cy","",800,600)

Definition at line 582 of file beamspotPlotBcids.py.

◆ cz

beamspotPlotBcids.cz = TCanvas("cz","",800,600)

Definition at line 583 of file beamspotPlotBcids.py.

◆ default

beamspotPlotBcids.default

Definition at line 99 of file beamspotPlotBcids.py.

◆ dest

beamspotPlotBcids.dest

Definition at line 99 of file beamspotPlotBcids.py.

◆ dr

string beamspotPlotBcids.dr = "apl"

Definition at line 618 of file beamspotPlotBcids.py.

◆ Eax

beamspotPlotBcids.Eax

Definition at line 536 of file beamspotPlotBcids.py.

◆ Eay

beamspotPlotBcids.Eay

Definition at line 537 of file beamspotPlotBcids.py.

◆ Ek

beamspotPlotBcids.Ek

Definition at line 527 of file beamspotPlotBcids.py.

◆ Erhoxy

beamspotPlotBcids.Erhoxy

Definition at line 538 of file beamspotPlotBcids.py.

◆ Esx

beamspotPlotBcids.Esx

Definition at line 533 of file beamspotPlotBcids.py.

◆ Esy

beamspotPlotBcids.Esy

Definition at line 534 of file beamspotPlotBcids.py.

◆ Esz

beamspotPlotBcids.Esz

Definition at line 535 of file beamspotPlotBcids.py.

◆ evt

beamspotPlotBcids.evt = Event()

Definition at line 505 of file beamspotPlotBcids.py.

◆ Ex0

beamspotPlotBcids.Ex0

Definition at line 528 of file beamspotPlotBcids.py.

◆ Exc

beamspotPlotBcids.Exc

Definition at line 530 of file beamspotPlotBcids.py.

◆ Ey0

beamspotPlotBcids.Ey0

Definition at line 529 of file beamspotPlotBcids.py.

◆ Eyc

beamspotPlotBcids.Eyc

Definition at line 531 of file beamspotPlotBcids.py.

◆ Ez

beamspotPlotBcids.Ez

Definition at line 532 of file beamspotPlotBcids.py.

◆ failed

list beamspotPlotBcids.failed = []

Definition at line 123 of file beamspotPlotBcids.py.

◆ False

beamspotPlotBcids.False

Definition at line 101 of file beamspotPlotBcids.py.

◆ fii

beamspotPlotBcids.fii = TFile(files[0])

Definition at line 217 of file beamspotPlotBcids.py.

◆ files

def beamspotPlotBcids.files = makeListFromString(options.files)

Definition at line 215 of file beamspotPlotBcids.py.

◆ first

bool beamspotPlotBcids.first = True

Definition at line 613 of file beamspotPlotBcids.py.

◆ fontSize

float beamspotPlotBcids.fontSize = 0.1

Definition at line 683 of file beamspotPlotBcids.py.

◆ ghists

list beamspotPlotBcids.ghists = []

Definition at line 122 of file beamspotPlotBcids.py.

◆ graphs

list beamspotPlotBcids.graphs = []

Definition at line 124 of file beamspotPlotBcids.py.

◆ help

beamspotPlotBcids.help

Definition at line 99 of file beamspotPlotBcids.py.

◆ infiles

def beamspotPlotBcids.infiles = makeListFromString(options.files)

open the files

Definition at line 441 of file beamspotPlotBcids.py.

◆ k

beamspotPlotBcids.k

Definition at line 524 of file beamspotPlotBcids.py.

◆ labels

list beamspotPlotBcids.labels = []

Definition at line 121 of file beamspotPlotBcids.py.

◆ lax

beamspotPlotBcids.lax = chain.GetLeaf("bs/ax")

Definition at line 463 of file beamspotPlotBcids.py.

◆ lay

beamspotPlotBcids.lay = chain.GetLeaf("bs/ay")

Definition at line 464 of file beamspotPlotBcids.py.

◆ lbcid

beamspotPlotBcids.lbcid = chain.GetLeaf("event/bcid")

Definition at line 451 of file beamspotPlotBcids.py.

◆ lbStart

beamspotPlotBcids.lbStart = llbStart.GetValue()

Definition at line 493 of file beamspotPlotBcids.py.

◆ lCovax

beamspotPlotBcids.lCovax = chain.GetLeaf("bsCov/axax")

Definition at line 476 of file beamspotPlotBcids.py.

◆ lCovay

beamspotPlotBcids.lCovay = chain.GetLeaf("bsCov/ayay")

Definition at line 477 of file beamspotPlotBcids.py.

◆ lCovk

beamspotPlotBcids.lCovk = chain.GetLeaf("bsCov/kk")

Definition at line 479 of file beamspotPlotBcids.py.

◆ lCovrhoxy

beamspotPlotBcids.lCovrhoxy = chain.GetLeaf("bsCov/rhoxyrhoxy")

Definition at line 478 of file beamspotPlotBcids.py.

◆ lCovsx

beamspotPlotBcids.lCovsx = chain.GetLeaf("bsCov/sxsx")

Definition at line 473 of file beamspotPlotBcids.py.

◆ lCovsy

beamspotPlotBcids.lCovsy = chain.GetLeaf("bsCov/sysy")

Definition at line 474 of file beamspotPlotBcids.py.

◆ lCovsz

beamspotPlotBcids.lCovsz = chain.GetLeaf("bsCov/szsz")

Definition at line 475 of file beamspotPlotBcids.py.

◆ lCovx0

beamspotPlotBcids.lCovx0 = chain.GetLeaf("bsCov/x0x0")

Definition at line 470 of file beamspotPlotBcids.py.

◆ lCovxc

beamspotPlotBcids.lCovxc = chain.GetLeaf("bsCovCentroid/xcxc")

Definition at line 480 of file beamspotPlotBcids.py.

◆ lCovy0

beamspotPlotBcids.lCovy0 = chain.GetLeaf("bsCov/y0y0")

Definition at line 471 of file beamspotPlotBcids.py.

◆ lCovyc

beamspotPlotBcids.lCovyc = chain.GetLeaf("bsCovCentroid/ycyc")

Definition at line 481 of file beamspotPlotBcids.py.

◆ lCovz

beamspotPlotBcids.lCovz = chain.GetLeaf("bsCov/zz")

Definition at line 472 of file beamspotPlotBcids.py.

◆ legax

beamspotPlotBcids.legax = TLegend(0.75,0.65,0.92,0.94)

Definition at line 599 of file beamspotPlotBcids.py.

◆ legay

beamspotPlotBcids.legay = TLegend(0.75,0.65,0.92,0.94)

Definition at line 600 of file beamspotPlotBcids.py.

◆ legends

list beamspotPlotBcids.legends = []

Definition at line 119 of file beamspotPlotBcids.py.

◆ legk

beamspotPlotBcids.legk = TLegend(0.75,0.65,0.92,0.94)

Definition at line 601 of file beamspotPlotBcids.py.

◆ legnEvents

beamspotPlotBcids.legnEvents = TLegend(0.75,0.65,0.92,0.94)

Definition at line 603 of file beamspotPlotBcids.py.

◆ legrhoxy

beamspotPlotBcids.legrhoxy = TLegend(0.75,0.65,0.92,0.94)

Definition at line 602 of file beamspotPlotBcids.py.

◆ legs

list beamspotPlotBcids.legs = [ legx,legy ,legz ,legsx,legsy,legsz,legax,legay,legk ,legrhoxy,legnEvents]

Definition at line 604 of file beamspotPlotBcids.py.

◆ legsx

beamspotPlotBcids.legsx = TLegend(0.75,0.65,0.92,0.94)

Definition at line 596 of file beamspotPlotBcids.py.

◆ legsy

beamspotPlotBcids.legsy = TLegend(0.75,0.65,0.92,0.94)

Definition at line 597 of file beamspotPlotBcids.py.

◆ legsz

beamspotPlotBcids.legsz = TLegend(0.75,0.65,0.92,0.94)

Definition at line 598 of file beamspotPlotBcids.py.

◆ legx

beamspotPlotBcids.legx = TLegend(0.75,0.65,0.92,0.94)

Definition at line 593 of file beamspotPlotBcids.py.

◆ legy

beamspotPlotBcids.legy = TLegend(0.75,0.65,0.92,0.94)

Definition at line 594 of file beamspotPlotBcids.py.

◆ legz

beamspotPlotBcids.legz = TLegend(0.75,0.65,0.92,0.94)

Definition at line 595 of file beamspotPlotBcids.py.

◆ lk

beamspotPlotBcids.lk = chain.GetLeaf("bs/k")

Definition at line 466 of file beamspotPlotBcids.py.

◆ llbStart

beamspotPlotBcids.llbStart = chain.GetLeaf("event/lumiStart")

Definition at line 453 of file beamspotPlotBcids.py.

◆ llumiRange

beamspotPlotBcids.llumiRange = chain.GetLeaf("event/lumiRange")

Definition at line 454 of file beamspotPlotBcids.py.

◆ lnEvents

beamspotPlotBcids.lnEvents = chain.GetLeaf("event/nEvents")

Definition at line 452 of file beamspotPlotBcids.py.

◆ lrhoxy

beamspotPlotBcids.lrhoxy = chain.GetLeaf("bs/rhoxy")

Definition at line 465 of file beamspotPlotBcids.py.

◆ lrun

beamspotPlotBcids.lrun = chain.GetLeaf("event/run")

Definition at line 450 of file beamspotPlotBcids.py.

◆ lstatusWord

beamspotPlotBcids.lstatusWord = chain.GetLeaf("event/statusWord")

Definition at line 455 of file beamspotPlotBcids.py.

◆ lsx

beamspotPlotBcids.lsx = chain.GetLeaf("bs/sx")

Definition at line 460 of file beamspotPlotBcids.py.

◆ lsy

beamspotPlotBcids.lsy = chain.GetLeaf("bs/sy")

Definition at line 461 of file beamspotPlotBcids.py.

◆ lsz

beamspotPlotBcids.lsz = chain.GetLeaf("bs/sz")

Definition at line 462 of file beamspotPlotBcids.py.

◆ lumiRange

beamspotPlotBcids.lumiRange = llumiRange.GetValue()

Definition at line 494 of file beamspotPlotBcids.py.

◆ lx0

beamspotPlotBcids.lx0 = chain.GetLeaf("bs/x0")

Definition at line 457 of file beamspotPlotBcids.py.

◆ lxc

beamspotPlotBcids.lxc = chain.GetLeaf("bsCentroid/xc")

Definition at line 467 of file beamspotPlotBcids.py.

◆ ly0

beamspotPlotBcids.ly0 = chain.GetLeaf("bs/y0")

Definition at line 458 of file beamspotPlotBcids.py.

◆ lyc

beamspotPlotBcids.lyc = chain.GetLeaf("bsCentroid/yc")

Definition at line 468 of file beamspotPlotBcids.py.

◆ lz

beamspotPlotBcids.lz = chain.GetLeaf("bs/z")

Definition at line 459 of file beamspotPlotBcids.py.

◆ m

int beamspotPlotBcids.m = 0

Definition at line 612 of file beamspotPlotBcids.py.

◆ markers

list beamspotPlotBcids.markers = [20,25,22,27,23,28,30,21]

Definition at line 615 of file beamspotPlotBcids.py.

◆ max

beamspotPlotBcids.max = a.GetXmax()

Definition at line 624 of file beamspotPlotBcids.py.

◆ MaxHeightFactor

float beamspotPlotBcids.MaxHeightFactor = 1.5

Definition at line 128 of file beamspotPlotBcids.py.

◆ min

beamspotPlotBcids.min = a.GetXmin()

Definition at line 623 of file beamspotPlotBcids.py.

◆ nEntries

beamspotPlotBcids.nEntries = chain.GetEntries()

Definition at line 448 of file beamspotPlotBcids.py.

◆ nEvents

beamspotPlotBcids.nEvents = lnEvents.GetValue()

Definition at line 492 of file beamspotPlotBcids.py.

◆ options

beamspotPlotBcids.options

Definition at line 104 of file beamspotPlotBcids.py.

◆ parser

beamspotPlotBcids.parser = OptionParser(usage=__usage__, version=__version__)

Definition at line 98 of file beamspotPlotBcids.py.

◆ pdglines

list beamspotPlotBcids.pdglines = []

Definition at line 120 of file beamspotPlotBcids.py.

◆ plots

dictionary beamspotPlotBcids.plots = {}

Definition at line 550 of file beamspotPlotBcids.py.

◆ plotTextSize

float beamspotPlotBcids.plotTextSize = 0.04

Definition at line 130 of file beamspotPlotBcids.py.

◆ PointSize

float beamspotPlotBcids.PointSize = 1.6

Definition at line 127 of file beamspotPlotBcids.py.

◆ rhoxy

beamspotPlotBcids.rhoxy

Definition at line 525 of file beamspotPlotBcids.py.

◆ run

beamspotPlotBcids.run = lrun.GetValue()

Definition at line 490 of file beamspotPlotBcids.py.

◆ s

beamspotPlotBcids.s = raw_input('--> ')

Definition at line 731 of file beamspotPlotBcids.py.

◆ statusWord

beamspotPlotBcids.statusWord = lstatusWord.GetValue()

Definition at line 495 of file beamspotPlotBcids.py.

◆ sx

beamspotPlotBcids.sx

Definition at line 519 of file beamspotPlotBcids.py.

◆ sy

beamspotPlotBcids.sy

Definition at line 520 of file beamspotPlotBcids.py.

◆ sz

beamspotPlotBcids.sz

Definition at line 521 of file beamspotPlotBcids.py.

◆ x

list beamspotPlotBcids.x = [v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10]]

Definition at line 620 of file beamspotPlotBcids.py.

◆ x0

beamspotPlotBcids.x0

Definition at line 514 of file beamspotPlotBcids.py.

◆ xc

beamspotPlotBcids.xc

Definition at line 516 of file beamspotPlotBcids.py.

◆ y0

beamspotPlotBcids.y0

Definition at line 515 of file beamspotPlotBcids.py.

◆ yc

beamspotPlotBcids.yc

Definition at line 517 of file beamspotPlotBcids.py.

◆ z

beamspotPlotBcids.z

Definition at line 518 of file beamspotPlotBcids.py.

beamspotPlotBcids.AddText
def AddText(xmin, ymin, text, size=0.015, font=None)
Definition: beamspotPlotBcids.py:19
TH1D
Definition: rootspy.cxx:342
beamspotPlotBcids.makeBeamspotPlots
def makeBeamspotPlots(name, beamspots)
Definition: beamspotPlotBcids.py:225
beamspotPlotBcids.getTree
def getTree(name, file, dir)
Definition: beamspotPlotBcids.py:180
beamspotPlotBcids.makePull
def makePull(tree, xval='x0', xcov='x0x0', xTrue=0., isCovErr=True, xlow=-8, xhigh=8, xbins=100, doGausFit=False, cuts="")
Definition: beamspotPlotBcids.py:186
beamspotPlotBcids.makeListFromString
def makeListFromString(s, token=',')
Definition: beamspotPlotBcids.py:14
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
beamspotPlotBcids.splitBeamspotTreeTitle
def splitBeamspotTreeTitle(title, cutToken="CUT")
Definition: beamspotPlotBcids.py:169
beamspotPlotBcids.makeBeamspotCutPlots
def makeBeamspotCutPlots(name, points)
Definition: beamspotPlotBcids.py:305
beamspotPlotBcids.makeCutPlotPulls
def makeCutPlotPulls(file, dir, pattern, name)
Definition: beamspotPlotBcids.py:409
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
beamspotPlotBcids.findBeamspots
def findBeamspots(file, dir, pattern)
Definition: beamspotPlotBcids.py:135
beamspotPlotBcids.makeFloatFromString
def makeFloatFromString(s)
Definition: beamspotPlotBcids.py:158
readCCLHist.float
float
Definition: readCCLHist.py:83