11 from math
import sqrt, atan2
14 from ROOT
import TFile, gROOT,gStyle, TH2F, TH1F, kRed, kGreen, kBlue, kYellow, kMagenta, TCanvas, gPad, TArrow, TText, TFile,TLine, TColor, TLatex
16 from ROOT
import TPolyLine3D, TPolyMarker3D, TAxis3D
18 include(
"InDetSimpleVisual/rootlogon.py")
21 gStyle.SetMarkerStyle(7)
24 include(
"InDetSimpleVisual/comparisonUtils.py")
27 rootFile = TFile(outputFile,
"RECREATE")
30 inputfile1 =
open(inputFile1,
"r")
31 inputfile2 =
open(inputFile2,
"r")
35 if not "deltaR" in dir():
37 if not "deltaPhiTrans" in dir():
39 if not "deltaPhi" in dir():
41 if not "deltaX" in dir():
43 if not "deltaY" in dir():
45 if not "deltaZ" in dir():
47 if not "deltaXY" in dir():
49 if not "TRASL_FACTOR" in dir():
51 if not "drawPix" in dir():
53 if not "drawSCT" in dir():
55 if not "drawTRT" in dir():
57 if not "drawIBL" in dir():
61 if not "drawTRTModules" in dir():
66 iblElements1 = geometry1[0]
67 pixelElements1 = geometry1[1]
68 sctElements1 = geometry1[2]
69 trtElements1 = geometry1[3]
73 iblElements2 = geometry2[0]
74 pixelElements2 = geometry2[1]
75 sctElements2 = geometry2[2]
76 trtElements2 = geometry2[3]
79 include(
"InDetSimpleVisual/makeHists.py")
80 include(
"InDetSimpleVisual/makeTransCanvas.py")
81 include(
"InDetSimpleVisual/make3DCanvas.py")
86 include(
"InDetSimpleVisual/fillIBLHists.py")
88 iblDir = rootFile.mkdir(
"IBL misalignments")
89 for i
in range(len(iblTransCan)):
91 iblTransCan[i].Write()
94 ibl3DStaves[i].Write()
101 include(
"InDetSimpleVisual/fillPixelHists.py")
103 pixelDir = rootFile.mkdir(
"Pixel misalignments")
104 for i
in range(len(pixelTransCan)):
106 pixelTransCan[i].Write()
109 pix3DLayers[i].Write()
116 include(
"InDetSimpleVisual/fillSCTHists.py")
118 sctDir = rootFile.mkdir(
"SCT misalignments")
119 for i
in range(len(sctTransCan)):
121 sctTransCan[i].Write()
124 sct3DLayers[i].Write()
130 trtDir = rootFile.mkdir(
"TRT misalignments")
132 include(
"InDetSimpleVisual/fillTRTHists.py")
135 for i
in range(len(trtTransCan)):
137 trtTransCan[i].Write()
140 for pair
in trtModTransCan:
141 thisCanPair = trtModTransCan[pair]
143 thisCanPair[0].Write()
144 thisCanPair[1].Write()
147 EA_strawPlanDir = trtDir.mkdir(
"Endcap A Straw Planes")
148 for i
in range(len(trtEndcapAStrawPlanes)):
150 trtEndcapAStrawPlanes[i].Write()
153 EC_strawPlanDir = trtDir.mkdir(
"Endcap C Straw Planes")
154 for i
in range(len(trtEndcapCStrawPlanes)):
156 trtEndcapCStrawPlanes[i].Write()
159 include(
"InDetSimpleVisual/makeTRTBarrelCans.py")
163 include(
"InDetSimpleVisual/writePlots.py")