BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcGeomSvc/MdcGeomSvc/MdcGeoGeneral.h
Go to the documentation of this file.
1// $Id: MdcGeoGeneral.h,v 1.7 2010/03/26 00:45:11 zhangy Exp $ // -*-c++-*-
2// a template header file for a class called "MdcGeoGeneral"
3#ifndef MDC_GEO_GENERAL_H
4#define MDC_GEO_GENERAL_H
5
6#include <CLHEP/Geometry/Point3D.h>
7#include <iostream>
8#include <string>
9#ifndef ENABLE_BACKWARDS_COMPATIBILITY
11#endif
12
13using namespace CLHEP;
14using namespace std;
16
17 public:
18 // Constructor.
19 MdcGeoGeneral():fId(0),fRadius(0),fLength(0),fNCell(0),fOffset(0),fnomOffset(0),fShift(0),fnomShift(0),fTwistF(0),fTwistB(0),fPhi(0),fnomPhi(0),fFirst(0),
20 fSxEast(0.),fSyEast(0.),fSzEast(0.),fRxEast(0.),fRyEast(0.),fRzEast(0.),fSxWest(0.),fSyWest(0.),fSzWest(0.),fRxWest(0.),fRyWest(0.),fRzWest(0.)
21 {
22 HepPoint3D O(0,0,0);
23 fOffF=O;
24 fOffB=O;
25 };
26 // Copy and Assignment
28 fId=e.Id();
29 fLayerName=e.LayerName();
30 fRadius=e.Radius();
31 fLength=e.Length();
32 fNCell=e.NCell();
33 fOffset=e.Offset();
34 fShift=e.Shift();
35 fnomOffset=e.nomOffset();
36 fnomShift=e.nomShift();
37 fTwistF=e.TwistF();
38 fTwistB=e.TwistB();
39 fOffF=e.OffF();
40 fOffB=e.OffB();
41 fPhi=e.Phi();
42 fnomPhi=e.nomPhi();
43 fFirst=e.First();
44 fSxEast=e.SxEast();
45 fSyEast=e.SyEast();
46 fSzEast=e.SzEast();
47 fRxEast=e.RxEast();
48 fRyEast=e.RyEast();
49 fRzEast=e.RzEast();
50
51 fSxWest=e.SxWest();
52 fSyWest=e.SyWest();
53 fSzWest=e.SzWest();
54 fRxWest=e.RxWest();
55 fRyWest=e.RyWest();
56 fRzWest=e.RzWest();
57 };
59 if(this!=&e)
60 {
61 fId=e.Id();
62 fLayerName=e.LayerName();
63 fLength=e.Length();
64 fRadius=e.Radius();
65 fNCell=e.NCell();
66 fOffset=e.Offset();
67 fShift=e.Shift();
68 fnomOffset=e.nomOffset();
69 fnomShift=e.nomShift();
70 fTwistF=e.TwistF();
71 fTwistB=e.TwistB();
72 fOffF=e.OffF();
73 fOffB=e.OffB();
74 fPhi=e.Phi();
75 fnomPhi=e.nomPhi();
76 fFirst=e.First();
77 fSxEast=e.SxEast();
78 fSyEast=e.SyEast();
79 fSzEast=e.SzEast();
80 fRxEast=e.RxEast();
81 fRyEast=e.RyEast();
82 fRzEast=e.RzEast();
83
84 fSxWest=e.SxWest();
85 fSyWest=e.SyWest();
86 fSzWest=e.SzWest();
87 fRxWest=e.RxWest();
88 fRyWest=e.RyWest();
89 fRzWest=e.RzWest();
90 }
91 return *this;
92 }
93
94 // Destructor
96
97 public: // Extractors
98 int Id(void) const;
99 string LayerName(void) const;
100 double Radius(void) const;
101 double Length(void) const;
102 int NCell(void) const;
103 double Offset(void) const;
104 double Shift(void) const;
105 double nomOffset(void) const;
106 double nomShift(void) const;
107 double TwistF(void) const;
108 double TwistB(void) const;
109 double Phi(void) const;
110 double nomPhi(void) const;
111 int First(void) const;
112 HepPoint3D OffF(void) const;
113 HepPoint3D OffB(void) const;
114 double SxEast(void) const;
115 double SyEast(void) const;
116 double SzEast(void) const;
117 double RxEast(void) const;
118 double RyEast(void) const;
119 double RzEast(void) const;
120
121 double SxWest(void) const;
122 double SyWest(void) const;
123 double SzWest(void) const;
124 double RxWest(void) const;
125 double RyWest(void) const;
126 double RzWest(void) const;
127
128 public: // Modifiers
129 int Id(int);
130 string LayerName(string i);
131 double Radius(double);
132 double Length(double);
133 int NCell(int);
134 double Offset(double);
135 double Shift(double);
136 double nomOffset(double);
137 double nomShift(double);
138
139 double TwistF(double);
140 double TwistB(double);
141 double Phi(double);
142 double nomPhi(double);
143 int First(int);
146 double SxEast(double);
147 double SyEast(double);
148 double SzEast(double);
149 double RxEast(double);
150 double RyEast(double);
151 double RzEast(double);
152
153 double SxWest(double);
154 double SyWest(double);
155 double SzWest(double);
156 double RxWest(double);
157 double RyWest(double);
158 double RzWest(double);
159
160
161 private:
162 int fId;
163 string fLayerName; //name of layer
164 double fRadius; //radius of layer(mm)
165 double fLength; //wire length of the layer(mm)
166 int fNCell; //# of cells of that layer
167 double fOffset; // offset at endplate (unit in cell)
168 double fnomOffset; // nominal offset at endplate (unit in cell)
169 double fShift; //# of cells to be shifte at forward w.r.t. backward endplate
170 double fnomShift; //nominal # of cells to be shifte at forward w.r.t. backward endplate
171 double fTwistF; //twist angle for fwrd (rad)
172 double fTwistB; //twist angle for bckwrd (rad)
173 double fPhi; //Phi on East Endplate
174 double fnomPhi; //nominal Phi on East Endplate
175 int fFirst; //0: first is field wire; 1: signal wire.
176 double fSxEast;
177 double fSyEast;
178 double fSzEast;
179 double fRxEast;
180 double fRyEast;
181 double fRzEast;
182
183 double fSxWest;
184 double fSyWest;
185 double fSzWest;
186 double fRxWest;
187 double fRyWest;
188 double fRzWest;
189 HepPoint3D fOffF; //Offset of fwrd wire
190 HepPoint3D fOffB; //Offset of bckwrd wire
191};
192
193//-----------------------------------------------------
194// Extractors
195inline int MdcGeoGeneral::Id(void) const { return fId; }
196inline string MdcGeoGeneral::LayerName(void) const { return fLayerName; }
197inline double MdcGeoGeneral::Radius(void) const { return fRadius; }
198inline double MdcGeoGeneral::Length(void) const { return fLength; }
199inline int MdcGeoGeneral::NCell(void) const { return fNCell; }
200inline double MdcGeoGeneral::Offset(void) const { return fOffset; }
201inline double MdcGeoGeneral::Shift(void) const { return fShift; }
202inline double MdcGeoGeneral::nomOffset(void) const { return fnomOffset; }
203inline double MdcGeoGeneral::nomShift(void) const { return fnomShift; }
204inline double MdcGeoGeneral::TwistF(void) const { return fTwistF; }
205inline double MdcGeoGeneral::TwistB(void) const { return fTwistB; }
206inline double MdcGeoGeneral::Phi(void) const { return fPhi; }
207inline double MdcGeoGeneral::nomPhi(void) const { return fnomPhi; }
208inline int MdcGeoGeneral::First(void) const { return fFirst; }
209inline HepPoint3D MdcGeoGeneral::OffF(void) const { return fOffF;}
210inline HepPoint3D MdcGeoGeneral::OffB(void) const { return fOffB;}
211inline double MdcGeoGeneral::SxEast(void) const { return fSxEast; }
212inline double MdcGeoGeneral::SyEast(void) const { return fSyEast; }
213inline double MdcGeoGeneral::SzEast(void) const { return fSzEast; }
214inline double MdcGeoGeneral::RxEast(void) const { return fRxEast; }
215inline double MdcGeoGeneral::RyEast(void) const { return fRyEast; }
216inline double MdcGeoGeneral::RzEast(void) const { return fRzEast; }
217
218inline double MdcGeoGeneral::SxWest(void) const { return fSxWest; }
219inline double MdcGeoGeneral::SyWest(void) const { return fSyWest; }
220inline double MdcGeoGeneral::SzWest(void) const { return fSzWest; }
221inline double MdcGeoGeneral::RxWest(void) const { return fRxWest; }
222inline double MdcGeoGeneral::RyWest(void) const { return fRyWest; }
223inline double MdcGeoGeneral::RzWest(void) const { return fRzWest; }
224
225// Modifiers
226inline int MdcGeoGeneral::Id(int i) { return fId=i; }
227inline string MdcGeoGeneral::LayerName(string i) { return fLayerName = i; }
228inline double MdcGeoGeneral::Radius(double i) { return fRadius=i; }
229inline double MdcGeoGeneral::Length(double i) { return fLength=i; }
230inline int MdcGeoGeneral::NCell(int i) { return fNCell=i; }
231inline double MdcGeoGeneral::Offset(double i) { return fOffset=i; }
232inline double MdcGeoGeneral::Shift(double i) { return fShift=i; }
233inline double MdcGeoGeneral::nomOffset(double i) { return fnomOffset=i; }
234inline double MdcGeoGeneral::nomShift(double i) { return fnomShift=i; }
235
236inline double MdcGeoGeneral::TwistF(double i) { return fTwistF=i; }
237inline double MdcGeoGeneral::TwistB(double i) { return fTwistB=i; }
238inline double MdcGeoGeneral::Phi(double i) { return fPhi=i; }
239inline double MdcGeoGeneral::nomPhi(double i) { return fnomPhi=i; }
240
241inline int MdcGeoGeneral::First(int i) { return fFirst=i; }
242inline HepPoint3D MdcGeoGeneral::OffF(HepPoint3D i) { return fOffF=i;}
243inline HepPoint3D MdcGeoGeneral::OffB(HepPoint3D i) { return fOffB=i;}
244
245inline double MdcGeoGeneral::SxEast(double i) { return fSxEast=i; }
246inline double MdcGeoGeneral::SyEast(double i) { return fSyEast=i; }
247inline double MdcGeoGeneral::SzEast(double i) { return fSzEast=i; }
248inline double MdcGeoGeneral::RxEast(double i) { return fRxEast=i; }
249inline double MdcGeoGeneral::RyEast(double i) { return fRyEast=i; }
250inline double MdcGeoGeneral::RzEast(double i) { return fRzEast=i; }
251
252inline double MdcGeoGeneral::SxWest(double i) { return fSxWest=i; }
253inline double MdcGeoGeneral::SyWest(double i) { return fSyWest=i; }
254inline double MdcGeoGeneral::SzWest(double i) { return fSzWest=i; }
255inline double MdcGeoGeneral::RxWest(double i) { return fRxWest=i; }
256inline double MdcGeoGeneral::RyWest(double i) { return fRyWest=i; }
257inline double MdcGeoGeneral::RzWest(double i) { return fRzWest=i; }
258
259
260//-----------------------------------------------------
261
262#endif /* MdcGeoGeneral_CLASS */
263
HepGeom::Point3D< double > HepPoint3D
MdcGeoGeneral & operator=(const MdcGeoGeneral &e)