Belle II Software development
Telescope Class Reference
Inheritance diagram for Telescope:
GlobalDeformation

Public Member Functions

 __init__ (self, scale)
 
 __call__ (self, xyz)
 

Public Attributes

 scale = scale
 scaling parameter of the deformation
 

Protected Member Functions

 _transform (self, r, phi, z)
 
 _xyz_to_rphiz (self, xyz)
 
 _rphiz_to_xyz (self, rphiz)
 

Detailed Description

 Telescope 

Definition at line 98 of file misalignment.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
scale )
 init 

Definition at line 101 of file misalignment.py.

101 def __init__(self, scale):
102 """ init """
103 super().__init__(scale)
104

Member Function Documentation

◆ __call__()

__call__ ( self,
xyz )
inherited
 Return TVector3 with difference in global position induced by the deformation,
given the original x,y,z position as TVector3 or a list with length of 3.

Definition at line 30 of file misalignment.py.

30 def __call__(self, xyz):
31 """ Return TVector3 with difference in global position induced by the deformation,
32 given the original x,y,z position as TVector3 or a list with length of 3.
33 """
34
35 rphiz = self._xyz_to_rphiz(xyz)
36 d_rphiz = self._transform(rphiz[0], rphiz[1], rphiz[2])
37
38 rphiz[0] += d_rphiz[0]
39 rphiz[1] += d_rphiz[1]
40 rphiz[2] += d_rphiz[2]
41
42 new_xyz = self._rphiz_to_xyz(rphiz)
43
44 d_xyz = ROOT.TVector3(new_xyz[0] - xyz[0], new_xyz[1] - xyz[1], new_xyz[2] - xyz[2])
45
46 return d_xyz
47

◆ _rphiz_to_xyz()

_rphiz_to_xyz ( self,
rphiz )
protectedinherited
 Convert (r,phi,z) to (x,y,z) 

Definition at line 62 of file misalignment.py.

62 def _rphiz_to_xyz(self, rphiz):
63 """ Convert (r,phi,z) to (x,y,z) """
64 import math
65 z = rphiz[2]
66 y = rphiz[0] * math.sin(rphiz[1])
67 x = rphiz[0] * math.cos(rphiz[1])
68 return [x, y, z]
69
70

◆ _transform()

_transform ( self,
r,
phi,
z )
protected
 the transformation 

Reimplemented from GlobalDeformation.

Definition at line 105 of file misalignment.py.

105 def _transform(self, r, phi, z):
106 """ the transformation """
107 return [0., 0., self.scale * r]
108
109

◆ _xyz_to_rphiz()

_xyz_to_rphiz ( self,
xyz )
protectedinherited
 Convert (x,y,z) to (r,phi,z) 

Definition at line 51 of file misalignment.py.

51 def _xyz_to_rphiz(self, xyz):
52 """ Convert (x,y,z) to (r,phi,z) """
53 import math
54 x = xyz[0]
55 y = xyz[1]
56 z = xyz[2]
57 r = math.sqrt(x * x + y * y)
58 phi = math.atan2(y, x)
59 rphiz = [r, phi, z]
60 return rphiz
61

Member Data Documentation

◆ scale

scale = scale
inherited

scaling parameter of the deformation

Definition at line 28 of file misalignment.py.


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