BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitLayer_Mdc.h
Go to the documentation of this file.
1//
2// Directly inspisrated from FTLayer of Kakuno-san
3//
4//
5#ifndef _DEFINE_LAYER_Mdc_H_
6#define _DEFINE_LAYER_Mdc_H_
7
8#include <math.h>
9#include <iostream>
11//class KalFitSuper_Mdc;
12
14public:
15 /// constructor
16 KalFitLayer_Mdc(const KalFitSuper_Mdc & super,
17 const double radius, const double stereoAngle,
18 const double zf, const double zb, const double offset,
19 const int layerID, const int localLayerID);
20
21 /// destructor
23
24public: // Selectors
25 /// returns local-layer ID
26 const int localLayerId(void) const;
27
28 /// returns layer ID
29 const int layerId(void) const;
30
31 /// returns tangent of slant angle
32 const double tanSlant(void) const;
33
34 /// returns r form origin
35 const double r(void) const;
36
37 /// returns z of forward end-plate
38 const double zf(void) const;
39
40 /// returns z of backward end-plate
41 const double zb(void) const;
42
43 /// returns offset of numbering(local ID)
44 const int offset(void) const;
45
46 /// returns super-layer
47 const KalFitSuper_Mdc & superLayer(void) const;
48
49 /// returns limit of "d" for stereo layer
50 const double limit(void) const;
51
52 /// returns z for "d" in r-phi plane
53 double z(const double d) const;
54
55 /// returns cell size
56 double csize(void) const;
57
58private: // private data members
59 const double _radius;
60 const double _tanSlant;
61 const double _zf; // z of forward endplate
62 const double _zb; // z of backward endplate
63 const int _layerId;
64 const int _localLayerId;
65 const int _offset;
66 const KalFitSuper_Mdc & _superLayer;
67};
68
69//----------------------------------
70#ifdef KalFitLayer_Mdc_NO_INLINE
71#define inline
72#else
73#undef inline
74#define KalFitLayer_Mdc_INLINE_DEFINE_HERE
75#endif
76
77#ifdef KalFitLayer_Mdc_INLINE_DEFINE_HERE
78
79inline
81 const double radius, const double stereoAngle,
82 const double zf, const double zb, const double offset,
83 const int layerID, const int localLayerID) : _radius(radius),
84 _tanSlant(1./tan(stereoAngle)),
85 _zf(zf),
86 _zb(zb),
87 _layerId(layerID),
88 _localLayerId(localLayerID),
89 _offset((int)(2.0*offset)),
90 _superLayer(super)
91{
92}
93
94inline
95const int KalFitLayer_Mdc::layerId(void) const { return _layerId;}
96inline
97const int KalFitLayer_Mdc::localLayerId(void) const { return _localLayerId;}
98inline
99const double KalFitLayer_Mdc::tanSlant(void) const { return _tanSlant;}
100
101inline
102const double KalFitLayer_Mdc::r(void) const { return _radius;}
103
104inline
105const double KalFitLayer_Mdc::zf(void) const { return _zf;}
106
107inline
108const double KalFitLayer_Mdc::zb(void) const { return _zb;}
109
110inline
111const double KalFitLayer_Mdc::limit(void) const { return (double)(_zf-_zb)/_tanSlant;}
112
113inline
114double
115KalFitLayer_Mdc::z(const double d) const
116{
117 return (double)_zb+d*_tanSlant;
118}
119
120inline
121const int
123{
124 return _offset;
125}
126
127inline
128const KalFitSuper_Mdc &
130{
131 return _superLayer;
132}
133
134inline
135double
137{
138 return 2*M_PI*_radius/_superLayer.nWire();
139}
140
141#endif
142
143#undef inline
144
145#endif
146
double tan(const BesAngle a)
Definition: BesAngle.h:216
#define M_PI
Definition: TConstant.h:4
const double tanSlant(void) const
returns tangent of slant angle
double csize(void) const
returns cell size
const double zb(void) const
returns z of backward end-plate
const double zf(void) const
returns z of forward end-plate
KalFitLayer_Mdc(const KalFitSuper_Mdc &super, const double radius, const double stereoAngle, const double zf, const double zb, const double offset, const int layerID, const int localLayerID)
constructor
const double limit(void) const
returns limit of "d" for stereo layer
const int localLayerId(void) const
returns local-layer ID
~KalFitLayer_Mdc()
destructor
const double r(void) const
returns r form origin
const KalFitSuper_Mdc & superLayer(void) const
returns super-layer
const int layerId(void) const
returns layer ID
double z(const double d) const
returns z for "d" in r-phi plane
const int offset(void) const
returns offset of numbering(local ID)
const int nWire(void) const
returns number of wires