/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcFastTrkAlg/MdcFastTrkAlg-00-04-09/MdcFastTrkAlg/FTLayer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     MdcFastTrkAlg
00004 // Module:      FTLayer
00005 // 
00006 // Description:  layer class for MdcFastTrkAlg
00007 //
00008 // Usage:
00009 //    <usage>
00010 //
00011 
00012 #ifndef FTLayer_FLAG_
00013 #define FTLayer_FLAG_
00014 
00015 #include <cmath>
00016 
00017 /* for M_PI */
00018 //#include "CLHEP/config/CLHEP.h"
00019 
00020 #include "MdcFastTrkAlg/FTSuperLayer.h"
00021 
00022 class FTLayer{
00023 public:
00025   FTLayer(const float radius, const float stereoAngle, 
00026           const float zf, const float zb, const float offset,
00027           const int layerID, const int localLayerID, const int NWire, 
00028           const FTSuperLayer & super);
00029 
00031   ~FTLayer(){};
00032 
00033 public: // Selectors
00035   const int localLayerId(void) const;
00036 
00038   const int layerId(void) const;
00039 
00041   const int NWire(void) const;
00042 
00044   const float tanSlant(void) const;
00045 
00047   const float r(void) const;
00048 
00050   const float zf(void) const;
00051 
00053   const float zb(void) const;
00054 
00056   const float offset(void) const;
00057 
00059   const FTSuperLayer & superLayer(void) const;
00060 
00062   const double limit(void) const;
00063 
00065   double z(const double d) const;
00066 
00068   double csize(void) const;
00069 
00070 private: // private data members
00071   const float _radius;
00072   const float _tanSlant;
00073   const float _zf;                              // z of forward endplate
00074   const float _zb;                              // z of backward endplate
00075   const int _layerId;
00076   const int _localLayerId;
00077   const float _offset;
00078   const int _NWire;
00079   const FTSuperLayer & _superLayer;
00080 };
00081 
00082 //----------------------------------------------
00083 #ifdef FTLayer_NO_INLINE
00084 #define inline
00085 #else
00086 #undef inline
00087 #define FTLayer_INLINE_DEFINE_HERE
00088 #endif
00089 
00090 #ifdef FTLayer_INLINE_DEFINE_HERE
00091 
00092 inline
00093 FTLayer::FTLayer(const float radius, const float stereoAngle, 
00094                  const float zf, const float zb, const float offset,
00095                  const int layerID, const int localLayerID, const int NWire,
00096                  const FTSuperLayer & super)
00097   : _radius(radius),
00098     _tanSlant(1./std::tan(stereoAngle)),
00099     _zf(zf),
00100     _zb(zb),
00101     _layerId(layerID),
00102     _localLayerId(localLayerID),
00103     _NWire(NWire),
00104     //_offset((int)(2.0*offset)),
00105     _offset(offset),
00106     _superLayer(super)
00107 {
00108 }
00109 
00110 inline
00111 const int
00112 FTLayer::layerId(void) const
00113 {
00114   return _layerId;
00115 }
00116 
00117 inline
00118 const int
00119 FTLayer::localLayerId(void) const
00120 {
00121   return _localLayerId;
00122 }
00123 
00124 inline
00125 const int
00126 FTLayer::NWire(void) const
00127 {
00128   return _NWire;
00129 }
00130 
00131 inline
00132 const float
00133 FTLayer::tanSlant(void) const
00134 {
00135   return _tanSlant;
00136 }
00137 
00138 
00139 inline
00140 const float
00141 FTLayer::r(void) const
00142 {
00143   return _radius;
00144 }
00145 
00146 inline
00147 const float
00148 FTLayer::zf(void) const
00149 {
00150   return _zf;
00151 }
00152 
00153 inline
00154 const float
00155 FTLayer::zb(void) const
00156 {
00157   return _zb;
00158 }
00159 
00160 inline
00161 const double 
00162 FTLayer::limit(void) const
00163 {
00164   return (double)(_zf-_zb)/_tanSlant;
00165 }
00166 
00167 inline  
00168 double 
00169 FTLayer::z(const double d) const
00170 {
00171   return (double)_zb+d*_tanSlant;
00172 }
00173 
00174 inline
00175 const float 
00176 FTLayer::offset(void) const
00177 {
00178   return _offset;
00179 }
00180 
00181 inline
00182 const FTSuperLayer & 
00183 FTLayer::superLayer(void) const
00184 {
00185   return _superLayer;
00186 }
00187 
00188 inline
00189 double
00190 FTLayer::csize(void) const
00191 {
00192   return 2*M_PI*_radius/NWire();
00193 }
00194 
00195 #endif
00196 
00197 #undef inline
00198 
00199 #endif /* FTLayer_FLAG_ */
00200 

Generated on Tue Nov 29 23:13:26 2016 for BOSS_7.0.2 by  doxygen 1.4.7