ATLAS Offline Software
fillIBLHists.py
Go to the documentation of this file.
1 # ================================
2 # Fills the Ibl Histograms
3 # Author John Alison <johnda@hep.upenn.edu>
4 
5 # In the text file, the followint is the order of the information
6 # m_ibl_barrel_ec, m_ibl_layer_disk, m_ibl_phi_module, m_ibl_eta_module, m_ibl_x, m_ibl_y, m_ibl_z);
7 
8 for i in range(len(iblElements1)):
9  ibl_x1 = iblElements1[i][4]
10  ibl_y1 = iblElements1[i][5]
11  ibl_z1 = iblElements1[i][6]
12 
13  ibl_x2 = iblElements2[i][4]
14  ibl_y2 = iblElements2[i][5]
15  ibl_z2 = iblElements2[i][6]
16 
17  if iblElements1[i][0] == 0:
18  fillBarrelHists(ibl_x1,ibl_y1,ibl_z1
19  ,ibl_x2,ibl_y2,ibl_z2
20  ,iblHists
21  )
22 
23  # Fill the Ibl Trans cans
24  iblTransCan[int(iblElements1[i][3]+10)].cd()
25  line.SetLineColor(kMagenta+1)
26  line.DrawArrow(ibl_x1,ibl_y1,ibl_x1+TRASL_FACTOR*(ibl_x2-ibl_x1),ibl_y1+TRASL_FACTOR*(ibl_y2-ibl_y1),0.01,"")
27 
28  if int(iblElements1[i][3]) == 0:
29  IDTransCan.cd()
30  line.SetLineColor(kMagenta+1)
31  line.DrawArrow(ibl_x1,ibl_y1,ibl_x1+TRASL_FACTOR*(ibl_x2-ibl_x1),ibl_y1+TRASL_FACTOR*(ibl_y2-ibl_y1),0.01,"")
32 
33 
34  # Fill 3D plot lists
35  iblPoly = TPolyLine3D(2)
36  iblPoly.SetLineWidth(1)
37  iblPoly.SetLineColor(51 + 3*int(iblElements1[i][2]))
38  iblPoly.SetPoint(0,
39  ibl_x1,
40  ibl_y1,
41  ibl_z1)
42  iblPoly.SetPoint(1,
43  ibl_x1+TRASL_FACTOR*(ibl_x2-ibl_x1),
44  ibl_y1+TRASL_FACTOR*(ibl_y2-ibl_y1),
45  ibl_z1+TRASL_FACTOR*(ibl_z2-ibl_z1))
46  iblLines[int(iblElements1[i][2])].append(iblPoly)
47 
48  iblMark = TPolyMarker3D(1)
49  iblMark.SetMarkerSize(4)
50  #iblMark.SetMarkerColor(kMagenta-9+int(iblElements1[i][2]))
51  iblMark.SetMarkerColor(51 +3*int(iblElements1[i][2]))
52  iblMark.SetMarkerStyle(7)
53  iblMark.SetPoint(0,
54  ibl_x1,
55  ibl_y1,
56  ibl_z1)
57  iblPoints[int(iblElements1[i][2])].append(iblMark)
58 
59  # DBM A
60  if iblElements1[i][0] == 4:
61  fillEndcapHists(ibl_x1,ibl_y1,ibl_z1
62  ,ibl_x2,ibl_y2,ibl_z2
63  ,iblHists
64  ,2
65  )
66 
67 
68  # DBM C
69  if iblElements1[i][0] == -4:
70  fillEndcapHists(ibl_x1,ibl_y1,ibl_z1
71  ,ibl_x2,ibl_y2,ibl_z2
72  ,iblHists
73  ,0
74  )
75 
76 # Draw 3D Plots
77 ibl3DCan.cd()
78 fullIblAxis = make_axes()
79 fullIblAxis.Draw()
80 fullIblTitle = make_title("IBL Visualization")
81 fullIblTitle.Draw()
82 
83 for i in range(len(ibl3DStaves)):
84  ibl3DStaves[i].cd()
85  iblAxes[i].Draw()
86  iblTitles[i].Draw()
87  for j in range(len(iblLines[i])):
88  ibl3DCan.cd()
89  iblLines[i][j].Draw()
90  iblPoints[i][j].Draw()
91  ibl3DStaves[i].cd()
92  iblLines[i][j].Draw()
93  iblPoints[i][j].Draw()
94 
95 
96 
97 
make3DCanvas.make_axes
def make_axes()
Definition: make3DCanvas.py:6
comparisonUtils.fillBarrelHists
def fillBarrelHists(x1, y1, z1, x2, y2, z2, theHists)
Definition: comparisonUtils.py:5
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
comparisonUtils.fillEndcapHists
def fillEndcapHists(x1, y1, z1, x2, y2, z2, theHists, side)
Definition: comparisonUtils.py:65
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
make3DCanvas.make_title
def make_title(text)
Definition: make3DCanvas.py:17
calibdata.cd
cd
Definition: calibdata.py:51