/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/TrkReco/TCircle.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // $Id: TCircle.h,v 1.13 2012/05/28 05:16:29 maoh Exp $
00003 //-----------------------------------------------------------------------------
00004 // Filename : TCircle.h
00005 // Section  : Tracking
00006 // Owner    : Yoshi Iwasaki
00007 // Email    : yoshihito.iwasaki@kek.jp
00008 //-----------------------------------------------------------------------------
00009 // Description : A class to represent a circle in tracking.
00010 //               See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef TCircle_FLAG_
00014 #define TCircle_FLAG_
00015 
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021 
00022 #include <string>
00023 
00024 #define HEP_SHORT_NAMES
00025 
00026 #ifndef CLHEP_POINT3D_H
00027 #include "CLHEP/Geometry/Point3D.h"
00028 #endif
00029 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00030     typedef HepGeom::Point3D<double> HepPoint3D;
00031 #endif
00032 using HepGeom::Point3D;
00033 
00034 #include "TrkReco/TMDCUtil.h"
00035 #include "TrkReco/TTrackBase.h"
00036 #include "TrkReco/TCircleFitter.h"
00037 //#include "lpav/Lpav.h"
00038 //#include "TrkReco/Lpav.h"
00039 #include "TrackUtil/Lpav.h"
00040 
00042 class TCircle : public TTrackBase {
00043 
00044   public:
00046     TCircle(const AList<TMLink> & links);
00047 
00049     virtual ~TCircle();
00050 
00051   public:// Selectors
00053     virtual unsigned objectType(void) const;
00054 
00056     void dump(const std::string & message = std::string(""),
00057               const std::string & prefix = std::string("")) const;
00058 
00060     const HepPoint3D & center(void) const;
00061 
00063     double radius(void) const;
00064 
00066     double pt(void) const;
00067 
00069     double impact(void) const;
00070 
00072     double charge(void) const;
00073 
00075     double weight(const TMLink & l) const;
00076 
00077   public:// Modifiers
00079     // int fitx(void);
00080 
00082     int fitForCurl(int ipConst = 0);
00083 
00085     void property(double charge, double radius, HepPoint3D center);
00086 
00087   private:// Updated when fitted
00088     Lpav _circle;
00089     double _charge;
00090     double _radius;
00091     HepPoint3D _center;
00092     static const TCircleFitter _fitter;
00093 };
00094 
00095 //-----------------------------------------------------------------------------
00096 
00097 #ifdef TCircle_NO_INLINE
00098 #define inline
00099 #else
00100 #undef inline
00101 #define TCircle_INLINE_DEFINE_HERE
00102 #endif
00103 
00104 #ifdef TCircle_INLINE_DEFINE_HERE
00105 
00106 inline
00107 const HepPoint3D &
00108 TCircle::center(void) const {
00109 #ifdef TRKRECO_DEBUG
00110     if (! _fitted) std::cout << "TCircle::center !!! fit not performed" << std::endl;
00111 #endif
00112     return _center;
00113 }
00114 
00115 inline
00116 double
00117 TCircle::radius(void) const {
00118 #ifdef TRKRECO_DEBUG
00119     if (! _fitted) std::cout << "TCircle::radius !!! fit not performed" << std::endl;
00120 #endif
00121     return _radius;
00122 }
00123 
00124 inline
00125 double
00126 TCircle::pt(void) const {
00127 #ifdef TRKRECO_DEBUG
00128     if (! _fitted) std::cout << "TCircle::pt !!! fit not performed" << std::endl;
00129 #endif
00130    // return fabs(_radius) / Helix::ConstantAlpha;
00131     return fabs(_radius) / 333.564095;
00132 }
00133 
00134 inline
00135 double
00136 TCircle::impact(void) const {
00137 #ifdef TRKRECO_DEBUG
00138     if (! _fitted) std::cout << "TCircle::impact !!! fit not performed" << std::endl;
00139 #endif
00140     return fabs(sqrt(_center.x() * _center.x() +
00141                      _center.y() * _center.y())
00142                 - fabs(_radius));
00143 }
00144 
00145 inline
00146 double
00147 TCircle::charge(void) const {
00148 #ifdef TRKRECO_DEBUG
00149     if (! _fitted) std::cout << "TCircle::charge !!! fit not performed" << std::endl;
00150 #endif
00151     return _charge;
00152 
00153 }
00154 
00155 inline
00156 void
00157 TCircle::property(double c, double r, HepPoint3D e) {
00158     _charge = c;
00159     _radius = r;
00160     _center = e;
00161 }
00162 
00163 inline
00164 unsigned
00165 TCircle::objectType(void) const {
00166     return Circle;
00167 }
00168 
00169 #endif
00170 
00171 #undef inline
00172 
00173 #endif /* TCircle_FLAG_ */

Generated on Tue Nov 29 23:14:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7