ATLAS Offline Software
writePlots.py
Go to the documentation of this file.
1 # ================================
2 # Creates Writes out the Histograms
3 # Author John Alison <johnda@hep.upenn.edu>
4 
5 def writeGeometryHists(name,hists):
6 
7  geo1 = []
8  for i in range(len(hists)):
9  geo1.append(hists[i].geo1)
10  WriteHist("Geometry 1"+name,geo1
11  ,drawEndcapLines=False,drawTRTFirst=False)
12  geo2 = []
13  for i in range(len(hists)):
14  geo2.append(hists[i].geo2)
15  WriteHist("Geometry 2"+name,geo2
16  ,drawEndcapLines=True)
17 
18  DxyVsR = []
19  for i in range(len(hists)):
20  DxyVsR.append(hists[i].DxyVsR)
21  WriteHist("Delta XY vs R"+name,DxyVsR)
22 
23  DxVsR = []
24  for i in range(len(hists)):
25  DxVsR.append(hists[i].DxVsR)
26  WriteHist("Delta X vs R"+name,DxVsR)
27 
28  DxVsZ = []
29  for i in range(len(hists)):
30  DxVsZ.append(hists[i].DxVsZ)
31  WriteHist("Delta X vs Z"+name,DxVsZ)
32 
33  DyVsR = []
34  for i in range(len(hists)):
35  DyVsR.append(hists[i].DyVsR)
36  WriteHist("Delta Y vs R"+name,DyVsR)
37 
38  DyVsZ = []
39  for i in range(len(hists)):
40  DyVsZ.append(hists[i].DyVsZ)
41  WriteHist("Delta Y vs Z"+name,DyVsZ)
42 
43  DphiVsZ = []
44  for i in range(len(hists)):
45  DphiVsZ.append(hists[i].DphiVsZ)
46  WriteHist("Delta Phi vs Z"+name,DphiVsZ
47  ,drawEndcapLines=True)
48 
49  DphiVsR = []
50  for i in range(len(hists)):
51  DphiVsR.append(hists[i].DphiVsR)
52  WriteHist("Delta phi vs R"+name,DphiVsR)
53 
54  DrVsR = []
55  for i in range(len(hists)):
56  DrVsR.append(hists[i].DrVsR)
57  WriteHist("Delta R vs R"+name,DrVsR)
58 
59  DzVsR = []
60  for i in range(len(hists)):
61  DzVsR.append(hists[i].DzVsR)
62  WriteHist("Delta Z vs R"+name,DzVsR)
63 
64 
65  DrVsPhi = []
66  for i in range(len(hists)):
67  DrVsPhi.append(hists[i].DrVsPhi)
68  WriteHist("Delta R vs phi"+name,DrVsPhi)
69 
70  DxyVsZ = []
71  for i in range(len(hists)):
72  DxyVsZ.append(hists[i].DxyVsZ)
73  WriteHist("Delta XY vs Z"+name,DxyVsZ)
74 
75  Dx = []
76  for i in range(len(hists)):
77  Dx.append(hists[i].Dx)
78  WriteHist("Delta X"+name,Dx
79  ,drawEndcapLines=False,drawTRTFirst=True)
80 
81  Dy = []
82  for i in range(len(hists)):
83  Dy.append(hists[i].Dy)
84  WriteHist("Delta Y"+name,Dy
85  ,drawEndcapLines=False,drawTRTFirst=True)
86 
87  Dz = []
88  for i in range(len(hists)):
89  Dz.append(hists[i].Dz)
90  WriteHist("Delta Z"+name,Dz
91  ,drawEndcapLines=False,drawTRTFirst=True)
92 
93 
94 writeGeometryHists("",[iblHists,pixelHists,sctHists,trtHists])
95 
96 for thisMod in range(len(drawTRTModules)):
97  thisLay = drawTRTModules[thisMod][0]
98  thisPhi = drawTRTModules[thisMod][1]
99 
100  thisTRTHists = trtModuleHists[(thisLay),(thisPhi)]
101 
102  thisTRTDir = rootFile.mkdir("TRT Module Lay: "+str(thisLay)+" Phi: "+str(thisPhi))
103 
104  thisTRTDir.cd()
105  writeGeometryHists(" Lay_"+str(thisLay)+"Phi_"+str(thisPhi),[thisTRTHists])
106  rootFile.cd()
107 
108 IDTransCan.Write()
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
comparisonUtils.WriteHist
def WriteHist(title, hists, drawEndcapLines=False, drawTRTFirst=False)
Definition: comparisonUtils.py:189
writePlots.writeGeometryHists
def writeGeometryHists(name, hists)
Definition: writePlots.py:5
str
Definition: BTagTrackIpAccessor.cxx:11