Belle II Software development
GlobalDeformation Class Reference
Inheritance diagram for GlobalDeformation:
Bowing Clamshell Curl Elliptical RadialExpansion Skew Telescope Twist ZExpansion

Public Member Functions

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

Public Attributes

 scale
 scaling parameter of the deformation
 

Protected Member Functions

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

Detailed Description

Base class to calculate global deformation of the detector

Definition at line 19 of file misalignment.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  scale 
)
 Constructor, sets the scale of the transformation 

Reimplemented in RadialExpansion, Telescope, Elliptical, Clamshell, Skew, Bowing, Twist, ZExpansion, and Curl.

Definition at line 24 of file misalignment.py.

24 def __init__(self, scale):
25 """ Constructor, sets the scale of the transformation """
26
27
28 self.scale = scale
29

Member Function Documentation

◆ __call__()

def __call__ (   self,
  xyz 
)
 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()

def _rphiz_to_xyz (   self,
  rphiz 
)
protected
 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()

def _transform (   self,
  r,
  phi,
  z 
)
protected
 Fcn to be overriden by child classes, return vector (list of 3 numbers) of displacement 

Reimplemented in RadialExpansion, Curl, Telescope, Elliptical, Clamshell, Skew, Bowing, Twist, and ZExpansion.

Definition at line 48 of file misalignment.py.

48 def _transform(self, r, phi, z):
49 """ Fcn to be overriden by child classes, return vector (list of 3 numbers) of displacement """
50

◆ _xyz_to_rphiz()

def _xyz_to_rphiz (   self,
  xyz 
)
protected
 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

scaling parameter of the deformation

Definition at line 28 of file misalignment.py.


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