BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkPoca.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkPoca.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Calculate the point of closest approach between two trajectories,
7// or between a trajectory and a point.
8// Calculates (in ctor) the distance and the flight lengths alongs
9// the trajectory or trajectories; calculated values are obtained
10// through accessors. "Precision" is maximum allowed error on distance
11// (in cm). The input flightlengths are used as a starting point; the
12// code will find the point-of-closest-approach that is closest to that
13// point. (A good starting point also reduces CPU time.)
14// Note that distance is a signed quantity for two trajectories.
15// Environment:
16// Software developed for the BaBar Detector at the SLAC B-Factory.
17//
18// Author(s): Steve Schaffner; core algorithm stolen from Art Snyder.
19//
20//------------------------------------------------------------------------
21#ifndef TRKPOCA_H
22#define TRKPOCA_H
23class TrkDifTraj;
24#include "TrkBase/TrkPocaBase.h"
25
26// Class interface //
27class TrkPoca : public TrkPocaBase {
28public:
29 TrkPoca( const Trajectory& traj1, double flt1, const Trajectory& traj2, double flt2,
30 double precision = 1.e-5 );
31 TrkPoca( const Trajectory& traj, double flt, const HepPoint3D& pt,
32 double precision = 1.e-5 );
34
35 inline double doca() const; // distance of closest approach
36 /*
37 // The following inherited functions are also available:
38 const TrkErrCode& status() const; // did the calculation succeed?
39 double flt1() const; // path length on traj 1 @ poca
40 double flt2() const;
41 double precision(); // In case anyone wants to know:
42 */
43
44private:
45 double _doca;
46
47 // private functions
48 void calcDist( const Trajectory& traj1, const Trajectory& traj2 );
49 // Preempt
50 // TrkPoca& operator= (const TrkPoca&);
51 // TrkPoca(const TrkPoca &);
52};
53
54// Inlined functions
55double TrkPoca::doca() const { return _doca; }
56
57#endif
HepGeom::Point3D< double > HepPoint3D
TrkPoca(const Trajectory &traj1, double flt1, const Trajectory &traj2, double flt2, double precision=1.e-5)
TrkPoca(const Trajectory &traj, double flt, const HepPoint3D &pt, double precision=1.e-5)
double doca() const