ATLAS Offline Software
fillPixelHists.py
Go to the documentation of this file.
1 # ================================
2 # Fills the Pixel 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_pix_barrel_ec, m_pix_layer_disk, m_pix_phi_module, m_pix_eta_module, m_pix_x, m_pix_y, m_pix_z);
7 for i in range(len(pixelElements1)):
8  pix_x1 = pixelElements1[i][4]
9  pix_y1 = pixelElements1[i][5]
10  pix_z1 = pixelElements1[i][6]
11 
12  pix_x2 = pixelElements2[i][4]
13  pix_y2 = pixelElements2[i][5]
14  pix_z2 = pixelElements2[i][6]
15 
16  if pixelElements1[i][0] == 0:
17  fillBarrelHists(pix_x1,pix_y1,pix_z1
18  ,pix_x2,pix_y2,pix_z2
19  ,pixelHists
20  )
21 
22 
23  # Fill the Pixel Trans cans
24  pixelTransCan[int(pixelElements1[i][3]+6)].cd()
25  line.SetLineColor(kRed+1)
26  line.DrawArrow(pix_x1,pix_y1,pix_x1+TRASL_FACTOR*(pix_x2-pix_x1),pix_y1+TRASL_FACTOR*(pix_y2-pix_y1),0.01,"")
27 
28  if int(pixelElements1[i][3]) == 0:
29  IDTransCan.cd()
30  line.SetLineColor(kRed+1)
31  line.DrawArrow(pix_x1,pix_y1,pix_x1+TRASL_FACTOR*(pix_x2-pix_x1),pix_y1+TRASL_FACTOR*(pix_y2-pix_y1),0.01,"")
32 
33 
34  # Fill 3D plot lists
35  color = 51 + int(pixelElements1[i][2])
36  if color > 100:
37  color = 51 - (color- 100)
38 
39  pixPoly = TPolyLine3D(2)
40  pixPoly.SetLineWidth(1)
41  pixPoly.SetLineColor(color)
42  pixPoly.SetPoint(0,
43  pix_x1,
44  pix_y1,
45  pix_z1)
46  pixPoly.SetPoint(1,
47  pix_x1+TRASL_FACTOR*(pix_x2-pix_x1),
48  pix_y1+TRASL_FACTOR*(pix_y2-pix_y1),
49  pix_z1+TRASL_FACTOR*(pix_z2-pix_z1))
50  pixLines[int(pixelElements1[i][1])-1].append(pixPoly)
51 
52  pixMark = TPolyMarker3D(1)
53  pixMark.SetMarkerSize(4)
54  pixMark.SetMarkerColor(color)
55  pixMark.SetMarkerStyle(7)
56  pixMark.SetPoint(0,
57  pix_x1,
58  pix_y1,
59  pix_z1)
60  pixPoints[int(pixelElements1[i][1])-1].append(pixMark)
61 
62  # Endcap A
63  if pixelElements1[i][0] == 2:
64  fillEndcapHists(pix_x1,pix_y1,pix_z1
65  ,pix_x2,pix_y2,pix_z2
66  ,pixelHists
67  ,2
68  )
69 
70 
71  # Endcap C
72  if pixelElements1[i][0] == -2:
73  fillEndcapHists(pix_x1,pix_y1,pix_z1
74  ,pix_x2,pix_y2,pix_z2
75  ,pixelHists
76  ,0
77  )
78 
79 pix3DCan.cd()
80 fullPixAxes = make_axes()
81 fullPixAxes.Draw()
82 fullPixTitle = make_title("PIX Visualization Barrel")
83 fullPixTitle.Draw()
84 for i in range(len(pix3DLayers)):
85  pix3DLayers[i].cd()
86  pixAxes[i].Draw()
87  pixTitles[i].Draw()
88  for j in range(len(pixLines[i])):
89  pix3DCan.cd()
90  pixLines[i][j].Draw()
91  pixPoints[i][j].Draw()
92  pix3DLayers[i].cd()
93  pixLines[i][j].Draw()
94  pixPoints[i][j].Draw()
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