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

Public Member Functions

 __init__ (self, scale, scale2=0.)
 
 __call__ (self, xyz)
 

Public Attributes

 scale2 = scale2
 second scale for 1/r member
 
 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

 Curl 

Definition at line 83 of file misalignment.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
scale,
scale2 = 0. )
 init with scale, optionally scale2 for 1/r dependency 

Definition at line 86 of file misalignment.py.

86 def __init__(self, scale, scale2=0.):
87 """ init with scale, optionally scale2 for 1/r dependency """
88
89
90 self.scale2 = scale2
91 super().__init__(scale)
92

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 93 of file misalignment.py.

93 def _transform(self, r, phi, z):
94 """ the transformation """
95 return [0., self.scale * r + self.scale2 / r, 0.]
96
97

◆ _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.

◆ scale2

scale2 = scale2

second scale for 1/r member

Definition at line 90 of file misalignment.py.


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