CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemGeoAlign.h
Go to the documentation of this file.
1#ifndef CGEMGEOALIGN_H
2#define CGEMGEOALIGN_H
3
5#include "CLHEP/Geometry/Point3D.h"
6
7#include "CLHEP/Vector/ThreeVector.h"
8#include "CLHEP/Vector/LorentzVector.h"//
9#include "CLHEP/Vector/TwoVector.h"
10
11using CLHEP::Hep3Vector;
12#include <string>
13
15{
16 public:
17 ToyCgem(int layer_vir, double r, double x0, double y0, double z0, double rx, double ry, double rz);
18 Hep3Vector getdir();
19 double GetX0() {return X0;}
20 double GetY0() {return Y0;}
21 double GetZ0() {return Z0;}
22 double GetRX() {return RX;}
23 double GetRY() {return RY;}
24 double GetRZ() {return RZ;}
25 double GetR() {return R;}
26
27 private:
28 int Layer;
29 double R;
30 //double Length;
31 double X0;
32 double Y0;
33 double Z0;
34 double RX;
35 double RY;
36 double RZ;
37
38};
39
40class ToyRay
41{
42 public:
43 ToyRay(double dr, double phi, double dz, double tanl);
44 Hep3Vector getdir();
45 double GetDrho() {return Drho;}
46 double GetPhi() {return Phi;}
47 double GetDz() {return Dz;}
48 double GetTanL() {return TanL;}
49
50 //bool getinter(int layer, Hep3Vector& posUp, Hep3Vector& posDown);
51
52 private:
53 double Drho;
54 double Phi;
55 double Dz;
56 double TanL;
57};
58
59
60
62 public:
65
66 void initAlignPar(std::string alignFile);
67 void setLayerR(int layer_geo, double r) { m_r[layer_geo] = r; }
68
69 double getDx(int layer_vir) { return m_dx[layer_vir]; }
70 double getDy(int layer_vir) { return m_dy[layer_vir]; }
71 double getDz(int layer_vir) { return m_dz[layer_vir]; }
72 double getRx(int layer_vir) { return m_rx[layer_vir]; }
73 double getRy(int layer_vir) { return m_ry[layer_vir]; }
74 double getRz(int layer_vir) { return m_rz[layer_vir]; }
75
76 double getDx(int layer_geo, int sheet_geo) { return m_dx[layer_geo*2+sheet_geo]; }
77 double getDy(int layer_geo, int sheet_geo) { return m_dy[layer_geo*2+sheet_geo]; }
78 double getDz(int layer_geo, int sheet_geo) { return m_dz[layer_geo*2+sheet_geo]; }
79 double getRx(int layer_geo, int sheet_geo) { return m_rx[layer_geo*2+sheet_geo]; }
80 double getRy(int layer_geo, int sheet_geo) { return m_ry[layer_geo*2+sheet_geo]; }
81 double getRz(int layer_geo, int sheet_geo) { return m_rz[layer_geo*2+sheet_geo]; }
82
83 /* modification of alignment parameters (used by alignment algorithm) */
84 void setDx(int layer_vir, double v) { m_dx[layer_vir] = v; }
85 void setDy(int layer_vir, double v) { m_dy[layer_vir] = v; }
86 void setDz(int layer_vir, double v) { m_dz[layer_vir] = v; }
87 void setRx(int layer_vir, double v) { m_rx[layer_vir] = v; }
88 void setRy(int layer_vir, double v) { m_ry[layer_vir] = v; }
89 void setRz(int layer_vir, double v) { m_rz[layer_vir] = v; }
90
91 void setDx(int layer_geo, int sheet_geo, double v) { m_dx[layer_geo*2+sheet_geo] = v; }
92 void setDy(int layer_geo, int sheet_geo, double v) { m_dy[layer_geo*2+sheet_geo] = v; }
93 void setDz(int layer_geo, int sheet_geo, double v) { m_dz[layer_geo*2+sheet_geo] = v; }
94 void setRx(int layer_geo, int sheet_geo, double v) { m_rx[layer_geo*2+sheet_geo] = v; }
95 void setRy(int layer_geo, int sheet_geo, double v) { m_ry[layer_geo*2+sheet_geo] = v; }
96 void setRz(int layer_geo, int sheet_geo, double v) { m_rz[layer_geo*2+sheet_geo] = v; }
97 /* resest alignment parameters to original values (used by alignment) */
98 void resetAlignPar();
99
100 StraightLine StraightLineConversion(int layer_vir, StraightLine lineOriginal);
101
102 /* written by Jingyi */
103 void StraightLineConversion_v1(int layer_vir, double lineOriginal[], double lineConverted[]);
104
105 void HelixConversion(int layer_vir, double helixOriginal[], double helixConverted[]);
106
107 HepPoint3D point_transform(int layer_vir, HepPoint3D pos);
108 HepPoint3D point_transform(int layer_geo, int sheet_geo, HepPoint3D pos);
109
110 void point_transform(double& x, double& y, double& z, double shift_x,
111 double shift_y, double shift_z, double rotation_z);
112
113 // HepPoint3D point_invTransform(int layer_vir, HepPoint3D pos);
114 // HepPoint3D point_invTransform_New(int layer_vir, HepPoint3D pos);
115 // HepPoint3D point_invTransform_New(int layer_geo, int sheet_geo, HepPoint3D pos);
116 HepPoint3D point_invTransform(int layer_vir, HepPoint3D pos);
117 HepPoint3D point_invTransform(int layer_geo, int sheet_geo, HepPoint3D pos);
118
119 void GetLocPos(int layer_vir, Hep3Vector GposUp, Hep3Vector GposDown, HepPoint3D& LposUp, HepPoint3D& LposDown);
120 void GetLocPos(int layer_vir, Hep3Vector Gpos, HepPoint3D& Lpos);
121 void GetLocPos(int layer_geo, int sheet_geo, Hep3Vector GposUp, Hep3Vector GposDown, HepPoint3D& LposUp, HepPoint3D& LposDown);
122 void GetLocPos(int layer_geo, int sheet_geo, Hep3Vector Gpos, HepPoint3D& Lpos);
123
124 bool getinter(ToyRay ARay, int layer_vir, Hep3Vector& posUp, Hep3Vector& posDown);
125 bool getinter(ToyRay ARay, int layer_geo, int sheet_geo, Hep3Vector& posUp, Hep3Vector& posDown);
126 bool getinter(ToyRay ARay, int layer_vir, Hep3Vector& pos);
127 bool getinter(ToyRay ARay, int layer_geo, int sheet_geo, Hep3Vector& pos);
128
129 private:
130 double m_r[3];
131
132 double m_dx[6];
133 double m_dy[6];
134 double m_dz[6];
135 double m_rx[6];
136 double m_ry[6];
137 double m_rz[6];
138
139 double m_dxOrig[6];
140 double m_dyOrig[6];
141 double m_dzOrig[6];
142 double m_rxOrig[6];
143 double m_ryOrig[6];
144 double m_rzOrig[6];
145
146};
147
148#endif
**********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
double getDx(int layer_vir)
Definition: CgemGeoAlign.h:69
void setRy(int layer_vir, double v)
Definition: CgemGeoAlign.h:88
void StraightLineConversion_v1(int layer_vir, double lineOriginal[], double lineConverted[])
void setDy(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:92
double getRy(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:80
void setRz(int layer_vir, double v)
Definition: CgemGeoAlign.h:89
void setLayerR(int layer_geo, double r)
Definition: CgemGeoAlign.h:67
double getDz(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:78
void setDz(int layer_vir, double v)
Definition: CgemGeoAlign.h:86
StraightLine StraightLineConversion(int layer_vir, StraightLine lineOriginal)
double getRx(int layer_vir)
Definition: CgemGeoAlign.h:72
void setDz(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:93
double getRy(int layer_vir)
Definition: CgemGeoAlign.h:73
void setDy(int layer_vir, double v)
Definition: CgemGeoAlign.h:85
void setRy(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:95
void GetLocPos(int layer_vir, Hep3Vector GposUp, Hep3Vector GposDown, HepPoint3D &LposUp, HepPoint3D &LposDown)
double getRz(int layer_vir)
Definition: CgemGeoAlign.h:74
double getDz(int layer_vir)
Definition: CgemGeoAlign.h:71
double getRx(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:79
HepPoint3D point_invTransform(int layer_vir, HepPoint3D pos)
void initAlignPar(std::string alignFile)
double getRz(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:81
void setDx(int layer_vir, double v)
Definition: CgemGeoAlign.h:84
void HelixConversion(int layer_vir, double helixOriginal[], double helixConverted[])
void setRx(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:94
void resetAlignPar()
void setDx(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:91
bool getinter(ToyRay ARay, int layer_vir, Hep3Vector &posUp, Hep3Vector &posDown)
void setRz(int layer_geo, int sheet_geo, double v)
Definition: CgemGeoAlign.h:96
double getDy(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:77
HepPoint3D point_transform(int layer_vir, HepPoint3D pos)
void setRx(int layer_vir, double v)
Definition: CgemGeoAlign.h:87
double getDy(int layer_vir)
Definition: CgemGeoAlign.h:70
double getDx(int layer_geo, int sheet_geo)
Definition: CgemGeoAlign.h:76
Hep3Vector getdir()
double GetZ0()
Definition: CgemGeoAlign.h:21
double GetX0()
Definition: CgemGeoAlign.h:19
double GetRX()
Definition: CgemGeoAlign.h:22
double GetRZ()
Definition: CgemGeoAlign.h:24
double GetR()
Definition: CgemGeoAlign.h:25
double GetY0()
Definition: CgemGeoAlign.h:20
double GetRY()
Definition: CgemGeoAlign.h:23
double GetDz()
Definition: CgemGeoAlign.h:47
double GetTanL()
Definition: CgemGeoAlign.h:48
Hep3Vector getdir()
double GetDrho()
Definition: CgemGeoAlign.h:45
double GetPhi()
Definition: CgemGeoAlign.h:46