Belle II Software development
printSVDLadders Class Reference
Inheritance diagram for printSVDLadders:

Public Member Functions

def beginRun (self)
 

Detailed Description

class to print svd ladders

Definition at line 180 of file dumpGeometryParameters.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 183 of file dumpGeometryParameters.py.

183 def beginRun(self):
184 '''begin run'''
185
187
188 print("printing all L3 backward sensors position of the SVD in the geometry:")
189 print("format: sensorID X(cm) Y(cm) phi(rad) phi(deg)")
190 for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
191 layerNumber = layer.getLayerNumber()
192
193 if not layerNumber == 3:
194 continue
195
196 for ladder in geoCache.getLadders(layer):
197 ladderNumber = ladder.getLadderNumber()
198 for sensor in geoCache.getSensors(ladder):
199 sensorNumber = sensor.getSensorNumber()
200 if not(sensorNumber == layerNumber - 1):
201 continue
202 # sensor ID string
203 sensorID = str(layerNumber) + "." + str(ladderNumber)
204 # get global coordinates:
205 local = r.Math.XYZVector(0, 0, 0)
206 glob = geoCache.getSensorInfo(sensor).pointToGlobal(local)
207
208 angleRad = m.atan2(glob.Y(), glob.X())
209 print(angleRad)
210 if(angleRad < 0):
211 angleRad = 2 * m.pi + angleRad
212 print("second = " + str(angleRad))
213
214 angleDeg = m.degrees(angleRad)
215
216 xStr = f"{round(glob.X(), 2):.2f}"
217 yStr = f"{round(glob.Y(), 2):.2f}"
218 radStr = f"{round(angleRad, 4):.2f}"
219 degStr = f"{round(angleDeg, 2):.2f}"
220 print(sensorID + ' ' + xStr + ' ' + yStr + ' ' + radStr + ' ' + degStr)
221
222
223# add your GT here:
224# gt = ""
225# b2conditions.prepend_globaltag(gt)
226
227# Create paths
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

The documentation for this class was generated from the following file: