BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/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/TrkDifTraj.h"
25#include "TrkBase/TrkPocaBase.h"
26
27class TrkPocaXY : public TrkPocaBase {
28public:
29 // Replace the original constructors with the equivalent, standard TrkPoca interface
30 //
31 // TrkPocaXY(const TrkDifTraj& traj1, const double& fltl1,
32 // const TrkDifTraj& traj2, const double& fltl2);
33 //
34 // TrkPocaXY(const TrkDifTraj& traj, const double& fltl, const HepPoint& pt);
35 TrkPocaXY( const Trajectory& traj, double flt, const HepPoint3D& pt,
36 double precision = 1.0e-4 );
37
38 TrkPocaXY( const Trajectory& traj1, double flt1, const Trajectory& traj2, double flt2,
39 double precision = 1.0e-4 );
40
42
43 inline double docaXY() const; // distance of closest approach in XY plane
44
45 // provide the following for backwards compatibility. Code copying is really an ugly thing.
46
47 double fltl1() const { return flt1(); }
48 double fltl2() const { return flt2(); }
49
50private:
51 double _docaxy;
52
53 void interLineCircle( const double& m, const double& q, const double& xc, const double& yc,
54 const double& radius, double& xint1, double& yint1, double& xint2,
55 double& yint2 );
56
57 void interTwoLines( const double& m1, const double& q1, const double& m2, const double& q2,
58 double& xint, double& yint );
59
60 void interTwoCircles( const double& xc1, const double& yc1, const double& r1,
61 const double& xc2, const double& yc2, const double& r2, double& xint1,
62 double& yint1, double& xint2, double& yint2 );
63};
64
65// Inlined functions
66double TrkPocaXY::docaXY() const { return _docaxy; }
67
68#endif
HepGeom::Point3D< double > HepPoint3D
****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
double docaXY() const
TrkPocaXY(const Trajectory &traj1, double flt1, const Trajectory &traj2, double flt2, double precision=1.0e-4)
TrkPocaXY(const Trajectory &traj, double flt, const HepPoint3D &pt, double precision=1.0e-4)
double double * m2
Definition qcdloop1.h:83
double * m1
Definition qcdloop1.h:83