BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/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
20#include "MdcFastTrkAlg/FTSuperLayer.h"
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)
#define M_PI
Definition: TConstant.h:4
const float r(void) const
returns r form origin
const int localLayerId(void) const
returns local-layer ID
double z(const double d) const
returns z for "d" in r-phi plane
const int NWire(void) const
returns the number of wire
const int layerId(void) const
returns layer ID
const double limit(void) const
returns limit of "d" for stereo layer
const float zf(void) const
returns z of forward end-plate
const float tanSlant(void) const
returns tangent of slant angle
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
const float zb(void) const
returns z of backward end-plate
const float offset(void) const
returns offset of numbering(local ID)
const FTSuperLayer & superLayer(void) const
returns super-layer
double csize(void) const
returns cell size