BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/KalFitAlg/include/KalFitAlg/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 "KalFitAlg/KalFitSuper_Mdc.h"
9#include <iostream>
10#include <math.h>
11// class KalFitSuper_Mdc;
12
13class KalFitLayer_Mdc {
14public:
15 /// constructor
16 KalFitLayer_Mdc( const KalFitSuper_Mdc& super, const double radius, const double stereoAngle,
17 const double zf, const double zb, const double offset, const int layerID,
18 const int localLayerID );
19
20 /// destructor
22
23public: // Selectors
24 /// returns local-layer ID
25 const int localLayerId( void ) const;
26
27 /// returns layer ID
28 const int layerId( void ) const;
29
30 /// returns tangent of slant angle
31 const double tanSlant( void ) const;
32
33 /// returns r form origin
34 const double r( void ) const;
35
36 /// returns z of forward end-plate
37 const double zf( void ) const;
38
39 /// returns z of backward end-plate
40 const double zb( void ) const;
41
42 /// returns offset of numbering(local ID)
43 const int offset( void ) const;
44
45 /// returns super-layer
46 const KalFitSuper_Mdc& superLayer( void ) const;
47
48 /// returns limit of "d" for stereo layer
49 const double limit( void ) const;
50
51 /// returns z for "d" in r-phi plane
52 double z( const double d ) const;
53
54 /// returns cell size
55 double csize( void ) const;
56
57private: // private data members
58 const double _radius;
59 const double _tanSlant;
60 const double _zf; // z of forward endplate
61 const double _zb; // z of backward endplate
62 const int _layerId;
63 const int _localLayerId;
64 const int _offset;
65 const KalFitSuper_Mdc& _superLayer;
66};
67
68//----------------------------------
69#ifdef KalFitLayer_Mdc_NO_INLINE
70# define inline
71#else
72# undef inline
73# define KalFitLayer_Mdc_INLINE_DEFINE_HERE
74#endif
75
76#ifdef KalFitLayer_Mdc_INLINE_DEFINE_HERE
77
78inline KalFitLayer_Mdc::KalFitLayer_Mdc( const KalFitSuper_Mdc& super, const double radius,
79 const double stereoAngle, const double zf,
80 const double zb, const double offset,
81 const int layerID, const int localLayerID )
82 : _radius( radius )
83 , _tanSlant( 1. / tan( stereoAngle ) )
84 , _zf( zf )
85 , _zb( zb )
86 , _layerId( layerID )
87 , _localLayerId( localLayerID )
88 , _offset( (int)( 2.0 * offset ) )
89 , _superLayer( super ) {}
90
91inline const int KalFitLayer_Mdc::layerId( void ) const { return _layerId; }
92inline const int KalFitLayer_Mdc::localLayerId( void ) const { return _localLayerId; }
93inline const double KalFitLayer_Mdc::tanSlant( void ) const { return _tanSlant; }
94
95inline const double KalFitLayer_Mdc::r( void ) const { return _radius; }
96
97inline const double KalFitLayer_Mdc::zf( void ) const { return _zf; }
98
99inline const double KalFitLayer_Mdc::zb( void ) const { return _zb; }
100
101inline const double KalFitLayer_Mdc::limit( void ) const {
102 return (double)( _zf - _zb ) / _tanSlant;
103}
104
105inline double KalFitLayer_Mdc::z( const double d ) const {
106 return (double)_zb + d * _tanSlant;
107}
108
109inline const int KalFitLayer_Mdc::offset( void ) const { return _offset; }
110
111inline const KalFitSuper_Mdc& KalFitLayer_Mdc::superLayer( void ) const { return _superLayer; }
112
113inline double KalFitLayer_Mdc::csize( void ) const {
114 return 2 * M_PI * _radius / _superLayer.nWire();
115}
116
117#endif
118
119#undef inline
120
121#endif
#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
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