95 sGeo = ROOT.gGeoManager
96 ScifiHorPlaneVol = sGeo.FindVolumeFast(
"ScifiHorPlaneVol")
97 for l1
in ScifiHorPlaneVol.GetNodes():
98 t1 = l1.GetMatrix().GetTranslation()[1]
99 print(l1.GetName(),t1)
100 for l2
in l1.GetVolume().GetNodes():
101 t2 = l2.GetMatrix().GetTranslation()[1]
102 print(
" ",l2.GetName(),t2,t1+t2)
120 ut.bookHist(h,
'dx',
'dx',100,-0.1,0.1)
121 ut.bookHist(h,
'dy',
'dy',100,-1.,1.)
122 ut.bookHist(h,
'dz',
'dz',100,-0.2,0.2)
127 scifi = modules[
'Scifi']
129 for station
in range(1,6):
130 for orientation
in range(0,2):
132 globChannel = station* 1000000+ orientation*100000 +channel
133 scifi.GetSiPMPosition(globChannel,AS,BS)
134 for fibre
in F[channel]:
135 globFibre = station* 1000000+ orientation*100000+fibre
136 scifi.GetPosition(globFibre,AF,BF)
144 rc = h[
'dx'].Fill(dx)
145 rc = h[
'dy'].Fill(dy)
146 rc = h[
'dz'].Fill(dz)
150 ut.bookCanvas(h,
'c1',
' ;x;y',800,800,1,1)
151 s = int(channel/1000000)
152 o = int( (channel-1000000*s)/100000)
153 locChannel = channel%100000
154 fibreVol = sGeo.FindVolumeFast(
'FiberVolume')
155 R = fibreVol.GetShape().GetDX()
156 sipmVol = sGeo.FindVolumeFast(
"ChannelVol")
157 DY = sipmVol.GetShape().GetDY()
158 DZ = sipmVol.GetShape().GetDZ()
164 for fibre
in F[locChannel]:
165 globFibre = int(s*1000000 + o*100000 + fibre)
166 scifi.GetPosition(globFibre,AF,BF)
167 loc = scifi.GetLocalPos(globFibre,AF)
168 h[
'ellipse'+str(n)]=ROOT.TEllipse(loc[0],loc[2],R,0)
170 if xmin>loc[0]: xmin = loc[0]
171 if ymin>loc[2]: ymin = loc[2]
172 if xmax<loc[0]: xmax = loc[0]
173 if ymax<loc[2]: ymax = loc[2]
174 print(xmin,xmax,ymin,ymax)
177 ut.bookHist(h,
'x',
'',100,x0-D/2,x0+D/2,100,ymin-1.5*R,ymax+1.5*R)
181 print(fibre,globFibre,loc[0],loc[1],loc[2])
182 el = h[
'ellipse'+str(i)]
185 scifi.GetSiPMPosition(channel,AF,BF)
186 loc = scifi.GetLocalPos(globFibre,AF)
187 h[
'rectang']=ROOT.TBox(loc[0]-DY,loc[2]-DZ,loc[0]+DY,loc[2]+DZ)
188 h[
'rectang'].SetFillColor(4)
189 h[
'rectang'].SetFillStyle(3001)
190 h[
'rectang'].Draw(
'same')