CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemGeoAlign Class Reference

#include <CgemGeoAlign.h>

Public Member Functions

 CgemGeoAlign ()
 
void initAlignPar (std::string alignFile)
 
void setLayerR (int layer, double r)
 
double getDx (int layer)
 
double getDy (int layer)
 
double getDz (int layer)
 
double getRx (int layer)
 
double getRy (int layer)
 
double getRz (int layer)
 
void setDx (int layer, double v)
 
void setDy (int layer, double v)
 
void setDz (int layer, double v)
 
void setRx (int layer, double v)
 
void setRy (int layer, double v)
 
void setRz (int layer, double v)
 
void resetAlignPar ()
 
StraightLine StraightLineConversion (int layer, StraightLine lineOriginal)
 
void StraightLineConversion_v1 (int layer, double lineOriginal[], double lineConverted[])
 
void HelixConversion (int layer, double helixOriginal[], double helixConverted[])
 
HepPoint3D point_transform (int layer, HepPoint3D pos)
 
void point_transform (double &x, double &y, double &z, double shift_x, double shift_y, double shift_z, double rotation_z)
 
HepPoint3D point_invTransform (int layer, HepPoint3D pos)
 
 CgemGeoAlign ()
 
void initAlignPar (std::string alignFile)
 
void setLayerR (int layer, double r)
 
double getDx (int layer)
 
double getDy (int layer)
 
double getDz (int layer)
 
double getRx (int layer)
 
double getRy (int layer)
 
double getRz (int layer)
 
void setDx (int layer, double v)
 
void setDy (int layer, double v)
 
void setDz (int layer, double v)
 
void setRx (int layer, double v)
 
void setRy (int layer, double v)
 
void setRz (int layer, double v)
 
void resetAlignPar ()
 
StraightLine StraightLineConversion (int layer, StraightLine lineOriginal)
 
void StraightLineConversion_v1 (int layer, double lineOriginal[], double lineConverted[])
 
void HelixConversion (int layer, double helixOriginal[], double helixConverted[])
 
HepPoint3D point_transform (int layer, HepPoint3D pos)
 
void point_transform (double &x, double &y, double &z, double shift_x, double shift_y, double shift_z, double rotation_z)
 
HepPoint3D point_invTransform (int layer, HepPoint3D pos)
 

Detailed Description

Constructor & Destructor Documentation

◆ CgemGeoAlign() [1/2]

CgemGeoAlign::CgemGeoAlign ( )

Definition at line 20 of file CgemGeoAlign.cxx.

20 {
21 m_r[0] = 87.915;
22 m_r[1] = 130.415;
23 m_r[2] = 172.915;
24}

◆ CgemGeoAlign() [2/2]

CgemGeoAlign::CgemGeoAlign ( )

Member Function Documentation

◆ getDx() [1/2]

double CgemGeoAlign::getDx ( int  layer)
inline

Definition at line 17 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

17{ return m_dx[layer]; }

◆ getDx() [2/2]

double CgemGeoAlign::getDx ( int  layer)
inline

Definition at line 17 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

17{ return m_dx[layer]; }

◆ getDy() [1/2]

double CgemGeoAlign::getDy ( int  layer)
inline

Definition at line 18 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

18{ return m_dy[layer]; }

◆ getDy() [2/2]

double CgemGeoAlign::getDy ( int  layer)
inline

Definition at line 18 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

18{ return m_dy[layer]; }

◆ getDz() [1/2]

double CgemGeoAlign::getDz ( int  layer)
inline

Definition at line 19 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

19{ return m_dz[layer]; }

◆ getDz() [2/2]

double CgemGeoAlign::getDz ( int  layer)
inline

Definition at line 19 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

19{ return m_dz[layer]; }

◆ getRx() [1/2]

double CgemGeoAlign::getRx ( int  layer)
inline

Definition at line 20 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

20{ return m_rx[layer]; }

◆ getRx() [2/2]

double CgemGeoAlign::getRx ( int  layer)
inline

Definition at line 20 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

20{ return m_rx[layer]; }

◆ getRy() [1/2]

double CgemGeoAlign::getRy ( int  layer)
inline

Definition at line 21 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

21{ return m_ry[layer]; }

◆ getRy() [2/2]

double CgemGeoAlign::getRy ( int  layer)
inline

Definition at line 21 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

21{ return m_ry[layer]; }

◆ getRz() [1/2]

double CgemGeoAlign::getRz ( int  layer)
inline

Definition at line 22 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

22{ return m_rz[layer]; }

◆ getRz() [2/2]

double CgemGeoAlign::getRz ( int  layer)
inline

Definition at line 22 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

22{ return m_rz[layer]; }

◆ HelixConversion() [1/2]

void CgemGeoAlign::HelixConversion ( int  layer,
double  helixOriginal[],
double  helixConverted[] 
)

Definition at line 233 of file CgemGeoAlign.cxx.

233 {
234}

◆ HelixConversion() [2/2]

void CgemGeoAlign::HelixConversion ( int  layer,
double  helixOriginal[],
double  helixConverted[] 
)

◆ initAlignPar() [1/2]

void CgemGeoAlign::initAlignPar ( std::string  alignFile)

Referenced by CgemGeomSvc::initialize().

◆ initAlignPar() [2/2]

void CgemGeoAlign::initAlignPar ( std::string  alignFile)

◆ point_invTransform() [1/2]

HepPoint3D CgemGeoAlign::point_invTransform ( int  layer,
HepPoint3D  pos 
)

Definition at line 275 of file CgemGeoAlign.cxx.

275 {
276 double xp = pos.x();
277 double yp = pos.y();
278 double zp = pos.z();
279
280 double rz = -1.*m_rz[layer];
281 double xrot = xp*cos(rz) + yp*sin(rz);
282 double yrot = -1.*xp*sin(rz) + yp*cos(rz);
283
284 double x = xrot + m_dx[layer];
285 double y = yrot + m_dy[layer];
286 double z = zp + m_dz[layer];
287
288 // cout << "before invTransform: " << setw(15) << xp<< setw(15) << yp << setw(15) << zp << endl;
289 // cout << " after invTransform: " << setw(15) << xp<< setw(15) << yp << setw(15) << zp << endl;
290
291 return HepPoint3D(x, y, z);
292}
Double_t x[10]
HepGeom::Point3D< double > HepPoint3D
Definition: Gam4pikp.cxx:37
double sin(const BesAngle a)
double cos(const BesAngle a)

Referenced by CgemMidDriftPlane::getPointAligned().

◆ point_invTransform() [2/2]

HepPoint3D CgemGeoAlign::point_invTransform ( int  layer,
HepPoint3D  pos 
)

◆ point_transform() [1/4]

void CgemGeoAlign::point_transform ( double &  x,
double &  y,
double &  z,
double  shift_x,
double  shift_y,
double  shift_z,
double  rotation_z 
)

Definition at line 248 of file CgemGeoAlign.cxx.

249 {
250 // double x_origin = x;
251 // double y_origin = y;
252 // double z_origin = z;
253
254 // double x_rotate = x_origin*cos(rotation_z) + y_origin*sin(rotation_z);
255 // double y_rotate = -1.*x_origin*sin(rotation_z) + y_origin*cos(rotation_z);
256 // double z_rotate = z_origin;
257
258 // double x_shift = x_rotate + shift_x;
259 // double y_shift = y_rotate + shift_y;
260 // double z_shift = z_rotate + shift_z;
261
262 // x = x_shift;
263 // y = y_shift;
264 // z = z_shift;
265
266 double x_shift = x - shift_x;
267 double y_shift = y - shift_y;
268 double z_shift = z - shift_z;
269
270 x = x_shift*cos(rotation_z) + y_shift*sin(rotation_z);
271 y = -1.*x_shift*sin(rotation_z) + y_shift*cos(rotation_z);
272 z = z_shift;
273}

◆ point_transform() [2/4]

void CgemGeoAlign::point_transform ( double &  x,
double &  y,
double &  z,
double  shift_x,
double  shift_y,
double  shift_z,
double  rotation_z 
)

◆ point_transform() [3/4]

HepPoint3D CgemGeoAlign::point_transform ( int  layer,
HepPoint3D  pos 
)

Definition at line 236 of file CgemGeoAlign.cxx.

236 {
237 double x_shift = pos.x() - m_dx[layer];
238 double y_shift = pos.y() - m_dy[layer];
239 double z_shift = pos.z() - m_dz[layer];
240
241 double x = x_shift*cos(m_rz[layer]) + y_shift*sin(m_rz[layer]);
242 double y = -1.*x_shift*sin(m_rz[layer]) + y_shift*cos(m_rz[layer]);
243 double z = z_shift;
244
245 return HepPoint3D(x,y,z);
246}

Referenced by StraightLineConversion(), and StraightLineConversion_v1().

◆ point_transform() [4/4]

HepPoint3D CgemGeoAlign::point_transform ( int  layer,
HepPoint3D  pos 
)

◆ resetAlignPar() [1/2]

void CgemGeoAlign::resetAlignPar ( )

Definition at line 45 of file CgemGeoAlign.cxx.

45 {
46 for (int layer=0; layer<3; layer++){
47 m_dx[layer] = m_dxOrig[layer];
48 m_dy[layer] = m_dyOrig[layer];
49 m_dz[layer] = m_dzOrig[layer];
50 m_rx[layer] = m_rxOrig[layer];
51 m_ry[layer] = m_ryOrig[layer];
52 m_rz[layer] = m_rzOrig[layer];
53 }
54}

◆ resetAlignPar() [2/2]

void CgemGeoAlign::resetAlignPar ( )

◆ setDx() [1/2]

void CgemGeoAlign::setDx ( int  layer,
double  v 
)
inline

Definition at line 25 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

25{ m_dx[layer] = v; }
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

◆ setDx() [2/2]

void CgemGeoAlign::setDx ( int  layer,
double  v 
)
inline

Definition at line 25 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

25{ m_dx[layer] = v; }

◆ setDy() [1/2]

void CgemGeoAlign::setDy ( int  layer,
double  v 
)
inline

Definition at line 26 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

26{ m_dy[layer] = v; }

◆ setDy() [2/2]

void CgemGeoAlign::setDy ( int  layer,
double  v 
)
inline

Definition at line 26 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

26{ m_dy[layer] = v; }

◆ setDz() [1/2]

void CgemGeoAlign::setDz ( int  layer,
double  v 
)
inline

Definition at line 27 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

27{ m_dz[layer] = v; }

◆ setDz() [2/2]

void CgemGeoAlign::setDz ( int  layer,
double  v 
)
inline

Definition at line 27 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

27{ m_dz[layer] = v; }

◆ setLayerR() [1/2]

void CgemGeoAlign::setLayerR ( int  layer,
double  r 
)
inline

Definition at line 15 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

15{ m_r[layer] = r; }

Referenced by CgemGeomSvc::initialize().

◆ setLayerR() [2/2]

void CgemGeoAlign::setLayerR ( int  layer,
double  r 
)
inline

Definition at line 15 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

15{ m_r[layer] = r; }

◆ setRx() [1/2]

void CgemGeoAlign::setRx ( int  layer,
double  v 
)
inline

Definition at line 28 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

28{ m_rx[layer] = v; }

◆ setRx() [2/2]

void CgemGeoAlign::setRx ( int  layer,
double  v 
)
inline

Definition at line 28 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

28{ m_rx[layer] = v; }

◆ setRy() [1/2]

void CgemGeoAlign::setRy ( int  layer,
double  v 
)
inline

Definition at line 29 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

29{ m_ry[layer] = v; }

◆ setRy() [2/2]

void CgemGeoAlign::setRy ( int  layer,
double  v 
)
inline

Definition at line 29 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

29{ m_ry[layer] = v; }

◆ setRz() [1/2]

void CgemGeoAlign::setRz ( int  layer,
double  v 
)
inline

Definition at line 30 of file Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeoAlign.h.

30{ m_rz[layer] = v; }

◆ setRz() [2/2]

void CgemGeoAlign::setRz ( int  layer,
double  v 
)
inline

Definition at line 30 of file InstallArea/include/CgemGeomSvc/CgemGeomSvc/CgemGeoAlign.h.

30{ m_rz[layer] = v; }

◆ StraightLineConversion() [1/2]

StraightLine CgemGeoAlign::StraightLineConversion ( int  layer,
StraightLine  lineOriginal 
)

Definition at line 56 of file CgemGeoAlign.cxx.

56 {
57 // 1. Get 2 points on straight line:
58 HepPoint3D p1 = lineOriginal.xAtR(m_r[layer], -1);
59 HepPoint3D p2 = lineOriginal.xAtR(m_r[layer], 1);
60
61 double dist = p1.distance2(p2);
62 if(fabs(dist) < 0.001){
63 double s1 = lineOriginal.sAtR(m_r[layer], -1);
64 double s2 = lineOriginal.sAtR(m_r[layer], 1);
65
66 p1 = lineOriginal.x(s1);
67 p2 = lineOriginal.x(s2);
68 }
69
70 // 2. Transformation
71 // cout << "alignment par: " << setw(15) << m_dx[layer] << setw(15) << m_dy[layer]
72 // << setw(15) << m_dz[layer] << setw(15) << m_rz[layer] << endl;
73
74 // cout << "2 points before transform: "
75 // << setw(15) << p1.x() << setw(15) << p1.y() << setw(15) << p1.z()
76 // << setw(15) << p2.x() << setw(15) << p2.y() << setw(15) << p2.z() << endl;
77
78 HepPoint3D newP1 = point_transform(layer, p1);
79 HepPoint3D newP2 = point_transform(layer, p2);
80
81 // cout << "2 points after transform: "
82 // << setw(15) << newP1.x() << setw(15) << newP1.y() << setw(15) << newP1.z()
83 // << setw(15) << newP2.x() << setw(15) << newP2.y() << setw(15) << newP2.z() << endl;
84
85 // 3. New line parameters
86 StraightLine newLine(newP1, newP2);
87
88 // cout << "use StraightLine" << endl;
89 // cout << "track before transform: " << setw(15) << lineOriginal.dr() << setw(15) << lineOriginal.phi0()
90 // << setw(15) << lineOriginal.dz() << setw(15) << lineOriginal.tanl() << endl;
91 // cout << "track after transform: " << setw(15) << newLine.dr() << setw(15) << newLine.phi0()
92 // << setw(15) << newLine.dz() << setw(15) << newLine.tanl() << endl << endl;
93
94 return newLine;
95}
HepPoint3D point_transform(int layer, HepPoint3D pos)
HepPoint3D x(double s=0.) const
returns position after moving s in downwoards
HepPoint3D xAtR(double R, int direction=1) const
double sAtR(double R, int direction=1) const

Referenced by CgemMidDriftPlane::getPointAligned().

◆ StraightLineConversion() [2/2]

StraightLine CgemGeoAlign::StraightLineConversion ( int  layer,
StraightLine  lineOriginal 
)

◆ StraightLineConversion_v1() [1/2]

void CgemGeoAlign::StraightLineConversion_v1 ( int  layer,
double  lineOriginal[],
double  lineConverted[] 
)

Definition at line 97 of file CgemGeoAlign.cxx.

97 {
98
99 // m_dx[0] = 1;
100 // m_dy[0] = 1;
101 // m_dz[0] = 1;
102 // m_rz[0] = 0; //TMath::Pi()/2.;
103
104 // 0. Get original straight line parameters:
105
106 double drho = lineOriginal[0];
107 double phi0 = lineOriginal[1];
108 double dz = lineOriginal[2];
109 double tgl = lineOriginal[3];
110
111 // 1. Get 2 points on straight line:
112
113 //--- Line on x-y plane: y = ax + b
114 //--- Line on s-z plane: z = -1.*tgl*s + dz;
115 // s = sqrt((x-x0)^2+(y-y0)^2)
116
117 int flg_parallel_x = 0;
118 int flg_parallel_y = 0;
119
120 if(phi0 == TMath::Pi()/2. || phi0 == -1.*TMath::Pi()/2.) flg_parallel_x = 1;
121 if(phi0 == 0 || phi0 == TMath::Pi()) flg_parallel_y = 1;
122
123 double a, b, x0, x1, x2, y0, y1, y2, s1, s2, z1, z2;
124 x0 = drho*cos(phi0);
125 y0 = drho*sin(phi0);
126
127 if(flg_parallel_x == 0 && flg_parallel_y == 0){
128 a = tan(TMath::Pi()/2.+phi0);
129 b = drho / cos(phi0);
130
131 x1 = 0;
132 y1 = drho / cos(phi0);
133 s1 = sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
134 z1 = -1.*tgl*s1 + dz;
135
136 x2 = -1.*b/a;
137 y2 = 0;
138 s2 = sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0));
139 z2 = -1.*tgl*s2 + dz;
140 if(x1==x2 || y1==y2 || z1==z2){
141 x2 = (1.-b)/a;
142 y2 = 1;
143 s2 = sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0));
144 z2 = -1.*tgl*s2 + dz;
145 }
146 }
147 else if(flg_parallel_x == 1){
148 x1 = drho; y1 = 0; s1 = sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)); z1 = -1.*tgl*s1 + dz;
149 x2 = drho; y2 = 1; s2 = sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0)); z2 = -1.*tgl*s2 + dz;
150 }
151 else if(flg_parallel_y == 1){
152 x1 = 0; y1 = drho; s1 = sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)); z1 = -1.*tgl*s1 + dz;
153 x2 = 1; y2 = drho; s2 = sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0)); z2 = -1.*tgl*s2 + dz;
154 }
155
156 // 2. Transformation
157
158 double shift_x = m_dx[layer];
159 double shift_y = m_dy[layer];
160 double shift_z = m_dz[layer];
161 double rotation_z = m_rz[layer];
162
163 // cout << "alignment par: " << setw(15) << shift_x << setw(15) << shift_y
164 // << setw(15) << shift_z << setw(15) << rotation_z << endl;
165
166 // cout << "2 points before transform: "
167 // << setw(15) << x1 << setw(15) << y1 << setw(15) << z1
168 // << setw(15) << x2 << setw(15) << y2 << setw(15) << z2 << endl;
169
170 point_transform(x1, y1, z1, shift_x, shift_y, shift_z, rotation_z);
171 point_transform(x2, y2, z2, shift_x, shift_y, shift_z, rotation_z);
172
173 // cout << "2 points after transform: "
174 // << setw(15) << x1 << setw(15) << y1 << setw(15) << z1
175 // << setw(15) << x2 << setw(15) << y2 << setw(15) << z2 << endl;
176
177 // 3. New line parameters
178
179 //--- Line on x-y plane: y = ax + b
180 // y1 = ax1 + b
181 // y2 = ax2 + b
182 // a = (y1-y2)/(x1-x2) = -tan(TMath::Pi()/2.-phi0) = tan(phi0-TMath::Pi()/2.);
183 // b = y1-a*x1 = drho / cos(phi0);
184 // phi0 = atan(a)+TMath::Pi()/2.;
185 // drho = b*cos(phi0);
186 //--- Line on s-z plane: z = -1.*tgl*s + dz;
187 // s = sqrt((x-x0)^2+(y-y0)^2)
188 // z1 = -1.*tgl*sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))+dz
189 // z2 = -1.*tgl*sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0))+dz
190 // tgl = (z1-z2)/(-1.*(sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))-sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0))));
191 // dz = z1 + tgl*sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
192
193 double new_a;
194 double new_b;
195 double new_phi0;
196 double new_drho;
197 double new_tgl;
198 double new_dz;
199
200 if(x1!=x2 && y1!=y2){
201 new_a = (y1-y2)/(x1-x2);
202 new_b = y1-new_a*x1;
203 new_phi0 = atan(new_a)+TMath::Pi()/2.;
204 new_drho = new_b*cos(phi0);
205 new_tgl = (z1-z2)/(-1.*(sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))-sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0))));
206 new_dz = z1 + new_tgl*sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
207 }
208 else if(x1==x2){
209 new_phi0 = 0;
210 new_drho = x1;
211 new_tgl = (z1-z2)/(-1.*(sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))-sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0))));
212 new_dz = z1 + new_tgl*sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
213 }
214 else if(y1==y2){
215 new_phi0 = TMath::Pi()/2.;
216 new_drho = y1;
217 new_tgl = (z1-z2)/(-1.*(sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))-sqrt((x2-x0)*(x2-x0)+(y2-y0)*(y2-y0))));
218 new_dz = z1 + new_tgl*sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
219 }
220
221 lineConverted[0] = new_drho;
222 lineConverted[1] = new_phi0;
223 lineConverted[2] = new_dz;
224 lineConverted[3] = new_tgl;
225
226 // cout << "track before transform: " << setw(15) << lineOriginal[0] << setw(15) << lineOriginal[1]
227 // << setw(15) << lineOriginal[2] << setw(15) << lineOriginal[3] << endl;
228 // cout << "track after transform: " << setw(15) << lineConverted[0] << setw(15) << lineConverted[1]
229 // << setw(15) << lineConverted[2] << setw(15) << lineConverted[3] << endl << endl;
230
231}
double tan(const BesAngle a)

◆ StraightLineConversion_v1() [2/2]

void CgemGeoAlign::StraightLineConversion_v1 ( int  layer,
double  lineOriginal[],
double  lineConverted[] 
)

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