/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkPocaXY.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: TrkPocaXY.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
00004 //
00005 // Description:
00006 //     Calculate the point of closest approach between two trajectories 
00007 //     (TrkDifTraj only) or between a trajectory and a point in the XY plane. 
00008 //     Calculates (in ctor) the distance and the flight lengths along
00009 //     the trajectory or trajectories;
00010 //     The input flightlengths are used as a starting point; 
00011 //     (A good starting point also reduces CPU time.)
00012 //     Note that distance is a signed quantity for two trajectories.
00013 // Environment:
00014 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00015 //
00016 // Author(s): Selenia Dittongo                    Univ. Ferrara
00017 //
00018 //     Dave Brown 3/31/03 
00019 //     Re-implemented to use the TrkPoca interface and implementation
00020 //------------------------------------------------------------------------
00021 #ifndef TRKPOCAXY_H
00022 #define TRKPOCAXY_H
00023 
00024 #include "TrkBase/TrkPocaBase.h"
00025 #include "TrkBase/TrkDifTraj.h"
00026 
00027 class TrkPocaXY : public TrkPocaBase {
00028 public:
00029   
00030 //  Replace the original constructors with the equivalent, standard TrkPoca interface
00031 //
00032 //  TrkPocaXY(const TrkDifTraj& traj1, const double& fltl1, 
00033 //          const TrkDifTraj& traj2, const double& fltl2);
00034 //
00035 //  TrkPocaXY(const TrkDifTraj& traj, const double& fltl, const HepPoint& pt);
00036   TrkPocaXY(const Trajectory& traj,  double flt,
00037             const HepPoint3D& pt, double precision=1.0e-4);
00038 
00039   TrkPocaXY(const Trajectory& traj1,  double flt1,
00040             const Trajectory& traj2,  double flt2,
00041             double precision=1.0e-4);
00042 
00043   ~TrkPocaXY() {}
00044  
00045   inline double docaXY() const;             // distance of closest approach in XY plane
00046 
00047 // provide the following for backwards compatibility.  Code copying is really an ugly thing.
00048 
00049   double fltl1() const{ return flt1(); }
00050   double fltl2() const{ return flt2(); }
00051                   
00052 private:
00053 
00054   double _docaxy;
00055 
00056   void interLineCircle
00057   (const double& m, const double& q,
00058    const double& xc, const double& yc, const double& radius,
00059    double& xint1,  double& yint1, double& xint2,  double& yint2);
00060 
00061   void interTwoLines
00062   (const double& m1, const double& q1, const double& m2, const double& q2, 
00063    double& xint,  double& yint);
00064 
00065   void interTwoCircles
00066   (const double& xc1, const double& yc1, const double& r1,
00067    const double& xc2, const double& yc2, const double& r2,
00068    double& xint1,  double& yint1, double& xint2,  double& yint2);
00069 
00070 };
00071 
00072 // Inlined functions
00073 double TrkPocaXY::docaXY() const {return _docaxy;}
00074 
00075 #endif
00076 

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