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