CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
FTLayer.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// Package: MdcFastTrkAlg
4// Module: FTLayer
5//
6// Description: layer class for MdcFastTrkAlg
7//
8// Usage:
9// <usage>
10//
11
12#ifndef FTLayer_FLAG_
13#define FTLayer_FLAG_
14
15#include <cmath>
16
17/* for M_PI */
18//#include "CLHEP/config/CLHEP.h"
19
21
22class FTLayer{
23public:
24 /// constructor
25 FTLayer(const float radius, const float stereoAngle,
26 const float zf, const float zb, const float offset,
27 const int layerID, const int localLayerID, const int NWire,
28 const FTSuperLayer & super);
29
30 /// destructor
32
33public: // Selectors
34 /// returns local-layer ID
35 const int localLayerId(void) const;
36
37 /// returns layer ID
38 const int layerId(void) const;
39
40 /// returns the number of wire
41 const int NWire(void) const;
42
43 /// returns tangent of slant angle
44 const float tanSlant(void) const;
45
46 /// returns r form origin
47 const float r(void) const;
48
49 /// returns z of forward end-plate
50 const float zf(void) const;
51
52 /// returns z of backward end-plate
53 const float zb(void) const;
54
55 /// returns offset of numbering(local ID)
56 const float offset(void) const;
57
58 /// returns super-layer
59 const FTSuperLayer & superLayer(void) const;
60
61 /// returns limit of "d" for stereo layer
62 const double limit(void) const;
63
64 /// returns z for "d" in r-phi plane
65 double z(const double d) const;
66
67 /// returns cell size
68 double csize(void) const;
69
70private: // private data members
71 const float _radius;
72 const float _tanSlant;
73 const float _zf; // z of forward endplate
74 const float _zb; // z of backward endplate
75 const int _layerId;
76 const int _localLayerId;
77 const float _offset;
78 const int _NWire;
79 const FTSuperLayer & _superLayer;
80};
81
82//----------------------------------------------
83#ifdef FTLayer_NO_INLINE
84#define inline
85#else
86#undef inline
87#define FTLayer_INLINE_DEFINE_HERE
88#endif
89
90#ifdef FTLayer_INLINE_DEFINE_HERE
91
92inline
93FTLayer::FTLayer(const float radius, const float stereoAngle,
94 const float zf, const float zb, const float offset,
95 const int layerID, const int localLayerID, const int NWire,
96 const FTSuperLayer & super)
97 : _radius(radius),
98 _tanSlant(1./std::tan(stereoAngle)),
99 _zf(zf),
100 _zb(zb),
101 _layerId(layerID),
102 _localLayerId(localLayerID),
103 _NWire(NWire),
104 //_offset((int)(2.0*offset)),
105 _offset(offset),
106 _superLayer(super)
107{
108}
109
110inline
111const int
113{
114 return _layerId;
115}
116
117inline
118const int
120{
121 return _localLayerId;
122}
123
124inline
125const int
126FTLayer::NWire(void) const
127{
128 return _NWire;
129}
130
131inline
132const float
134{
135 return _tanSlant;
136}
137
138
139inline
140const float
141FTLayer::r(void) const
142{
143 return _radius;
144}
145
146inline
147const float
148FTLayer::zf(void) const
149{
150 return _zf;
151}
152
153inline
154const float
155FTLayer::zb(void) const
156{
157 return _zb;
158}
159
160inline
161const double
162FTLayer::limit(void) const
163{
164 return (double)(_zf-_zb)/_tanSlant;
165}
166
167inline
168double
169FTLayer::z(const double d) const
170{
171 return (double)_zb+d*_tanSlant;
172}
173
174inline
175const float
177{
178 return _offset;
179}
180
181inline
182const FTSuperLayer &
184{
185 return _superLayer;
186}
187
188inline
189double
190FTLayer::csize(void) const
191{
192 return 2*M_PI*_radius/NWire();
193}
194
195#endif
196
197#undef inline
198
199#endif /* FTLayer_FLAG_ */
200
double tan(const BesAngle a)
Definition BesAngle.h:216
#define M_PI
Definition TConstant.h:4
const float r(void) const
returns r form origin
Definition FTLayer.h:141
const int localLayerId(void) const
returns local-layer ID
Definition FTLayer.h:119
double z(const double d) const
returns z for "d" in r-phi plane
Definition FTLayer.h:169
const int NWire(void) const
returns the number of wire
Definition FTLayer.h:126
~FTLayer()
destructor
Definition FTLayer.h:31
const int layerId(void) const
returns layer ID
Definition FTLayer.h:112
const double limit(void) const
returns limit of "d" for stereo layer
Definition FTLayer.h:162
const float zf(void) const
returns z of forward end-plate
Definition FTLayer.h:148
const float tanSlant(void) const
returns tangent of slant angle
Definition FTLayer.h:133
FTLayer(const float radius, const float stereoAngle, const float zf, const float zb, const float offset, const int layerID, const int localLayerID, const int NWire, const FTSuperLayer &super)
constructor
Definition FTLayer.h:93
const float zb(void) const
returns z of backward end-plate
Definition FTLayer.h:155
const float offset(void) const
returns offset of numbering(local ID)
Definition FTLayer.h:176
const FTSuperLayer & superLayer(void) const
returns super-layer
Definition FTLayer.h:183
double csize(void) const
returns cell size
Definition FTLayer.h:190