BOSS
7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkDifPoca.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: TrkDifPoca.h,v 1.2 2006/03/28 01:02:36 zhangy Exp $
4
//
5
// Description:
6
// Calculate the point of closest approach between two trajectories.
7
// Calculates (in ctor) the distance and the flight lengths alongs
8
// the two trajectories; calculated values are obtained through accessors.
9
// "Precision" is maximum allowed error on distance (in cm).
10
// The input flightlengths are used as a starting point; the
11
// code will find the point-of-closest-approach that is closest to that
12
// point. (A good starting point also reduces CPU time.)
13
// Note that distance is a signed quantity for two trajectories.
14
//
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 TRKDIFPOCA_H
22
#define TRKDIFPOCA_H
23
#include "TrkBase/TrkPocaBase.h"
24
#include "MdcRecoUtil/DifNumber.h"
25
#include "CLHEP/Matrix/Vector.h"
26
using
CLHEP::HepVector;
27
28
class
TrkDifTraj
;
29
30
// Class interface //
31
class
TrkDifPoca
:
public
TrkPocaBase
{
32
33
public
:
34
TrkDifPoca
(
const
TrkDifTraj
& traj1,
double
flt1
,
35
const
Trajectory
& traj2,
double
flt2
,
36
double
precision
=1.e-5);
37
TrkDifPoca
(
const
TrkDifTraj
& traj,
double
flt,
38
const
HepPoint3D
& pt,
double
precision
=1.e-5);
39
~TrkDifPoca
() {};
40
41
inline
const
DifNumber
&
difDoca
()
const
;
// distance of closest approach
42
inline
double
doca
()
const
;
// ditto
43
inline
const
HepVector
derivs
()
const
;
//deriv of doca w/r/t track params
44
inline
void
fetchDerivs
(HepVector&)
const
;
// faster version
45
46
// The following inherited functions are also available:
47
//const TrkErrCode& status() const; // did the calculation succeed?
48
//double flt1() const; // path length on traj 1 @ poca
49
//double flt2() const;
50
//double precision(); // In case anyone wants to know:
51
52
private
:
53
DifNumber
_doca;
54
55
void
calcDist(
const
TrkDifTraj
& traj1,
const
Trajectory
& traj2);
56
void
calcDist(
const
TrkDifTraj
& ,
const
HepPoint3D
& );
57
58
// Preempt
59
// TrkDifPoca& operator= (const TrkDifPoca&);
60
// TrkDifPoca(const TrkDifPoca &);
61
};
62
63
// Inlined functions
64
double
TrkDifPoca::doca
()
const
{
return
_doca.
number
();}
65
const
DifNumber
&
TrkDifPoca::difDoca
()
const
{
return
_doca;}
66
const
HepVector
TrkDifPoca::derivs
()
const
{
return
_doca.
derivatives
();}
67
void
TrkDifPoca::fetchDerivs
(HepVector& dv)
const
{_doca.
fetchDerivatives
(dv);}
68
#endif
DifNumber
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/DifNumber.h:42
DifNumber::fetchDerivatives
void fetchDerivatives(HepVector &v) const
Definition:
DifNumber.cxx:41
DifNumber::number
double number() const
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/DifNumber.h:87
DifNumber::derivatives
HepVector derivatives() const
Definition:
DifNumber.cxx:46
HepGeom::Point3D< double >
Trajectory
Definition:
InstallArea/include/MdcGeom/MdcGeom/Trajectory.h:35
TrkDifPoca
Definition:
InstallArea/include/TrkBase/TrkBase/TrkDifPoca.h:31
TrkDifPoca::TrkDifPoca
TrkDifPoca(const TrkDifTraj &traj, double flt, const HepPoint3D &pt, double precision=1.e-5)
TrkDifPoca::doca
double doca() const
TrkDifPoca::difDoca
const DifNumber & difDoca() const
TrkDifPoca::fetchDerivs
void fetchDerivs(HepVector &) const
TrkDifPoca::derivs
const HepVector derivs() const
TrkDifPoca::~TrkDifPoca
~TrkDifPoca()
Definition:
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkDifPoca.h:39
TrkDifPoca::TrkDifPoca
TrkDifPoca(const TrkDifTraj &traj1, double flt1, const Trajectory &traj2, double flt2, double precision=1.e-5)
TrkDifTraj
Definition:
InstallArea/include/TrkBase/TrkBase/TrkDifTraj.h:28
TrkPocaBase
Definition:
InstallArea/include/TrkBase/TrkBase/TrkPocaBase.h:25
TrkPocaBase::precision
double precision()
Definition:
InstallArea/include/TrkBase/TrkBase/TrkPocaBase.h:59
TrkPocaBase::flt2
double flt2() const
Definition:
InstallArea/include/TrkBase/TrkBase/TrkPocaBase.h:68
TrkPocaBase::flt1
double flt1() const
Definition:
InstallArea/include/TrkBase/TrkBase/TrkPocaBase.h:65
source
Reconstruction
MdcPatRec
TrkBase
TrkBase-00-01-12
TrkBase
TrkDifPoca.h
Generated by
1.9.6