BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkBase/TrkBase/TrkPocaXY.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkPocaXY.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// (TrkDifTraj only) or between a trajectory and a point in the XY plane.
8// Calculates (in ctor) the distance and the flight lengths along
9// the trajectory or trajectories;
10// The input flightlengths are used as a starting point;
11// (A good starting point also reduces CPU time.)
12// Note that distance is a signed quantity for two trajectories.
13// Environment:
14// Software developed for the BaBar Detector at the SLAC B-Factory.
15//
16// Author(s): Selenia Dittongo Univ. Ferrara
17//
18// Dave Brown 3/31/03
19// Re-implemented to use the TrkPoca interface and implementation
20//------------------------------------------------------------------------
21#ifndef TRKPOCAXY_H
22#define TRKPOCAXY_H
23
24#include "TrkBase/TrkPocaBase.h"
25#include "TrkBase/TrkDifTraj.h"
26
27class TrkPocaXY : public TrkPocaBase {
28public:
29
30// Replace the original constructors with the equivalent, standard TrkPoca interface
31//
32// TrkPocaXY(const TrkDifTraj& traj1, const double& fltl1,
33// const TrkDifTraj& traj2, const double& fltl2);
34//
35// TrkPocaXY(const TrkDifTraj& traj, const double& fltl, const HepPoint& pt);
36 TrkPocaXY(const Trajectory& traj, double flt,
37 const HepPoint3D& pt, double precision=1.0e-4);
38
39 TrkPocaXY(const Trajectory& traj1, double flt1,
40 const Trajectory& traj2, double flt2,
41 double precision=1.0e-4);
42
44
45 inline double docaXY() const; // distance of closest approach in XY plane
46
47// provide the following for backwards compatibility. Code copying is really an ugly thing.
48
49 double fltl1() const{ return flt1(); }
50 double fltl2() const{ return flt2(); }
51
52private:
53
54 double _docaxy;
55
56 void interLineCircle
57 (const double& m, const double& q,
58 const double& xc, const double& yc, const double& radius,
59 double& xint1, double& yint1, double& xint2, double& yint2);
60
61 void interTwoLines
62 (const double& m1, const double& q1, const double& m2, const double& q2,
63 double& xint, double& yint);
64
65 void interTwoCircles
66 (const double& xc1, const double& yc1, const double& r1,
67 const double& xc2, const double& yc2, const double& r2,
68 double& xint1, double& yint1, double& xint2, double& yint2);
69
70};
71
72// Inlined functions
73double TrkPocaXY::docaXY() const {return _docaxy;}
74
75#endif
76
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition: KKsem.h:33