CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
StraightLine.h
Go to the documentation of this file.
1/********************************************************************************
2 * Class StraightLine.h
3 * definition of the straight line at BESIII:
4 * https://docbes3.ihep.ac.cn/~offlinesoftware/images/4/49/StraightLinePar.pdf
5 ********************************************************************************/
6#ifndef STRAIGHTLINE_H
7#define STRAIGHTLINE_H
8
9#include "CLHEP/Matrix/Vector.h"
10#include "CLHEP/Vector/ThreeVector.h"
11#include "CLHEP/Matrix/SymMatrix.h"
12#include "CLHEP/Geometry/Point3D.h"
13
14#ifndef ENABLE_BACKWARDS_COMPATIBILITY
15// backwards compatibility will be enabled ONLY in CLHEP 1.9
17#endif
18using namespace CLHEP;
19
20using namespace std;
21//using namespace EventModel;
22
24{
25 public:
26 // Constructor with pivot, line parameter a
28 const HepVector & a);
29
30 // Constructor with line parameter a, with default pivot (0,0,0)
31 StraightLine(double dr, double phi0, double dz, double tanl);
32
33 // Constructor with two points
35
36 /// Destructor
37 virtual ~StraightLine();
38
39 /// returns pivot position.
40 const HepPoint3D & pivot(void) const {return m_pivot;};
41
42 /// returns helix parameters.
43 const HepVector & a(void) const {return m_a;};
44 /// returns an element of parameters.
45 double dr(void) const {return m_a[0];};
46 double phi0(void) const {return m_a[1];};
47 //double kappa(void) const;
48 double dz(void) const {return m_a[2];};
49 double tanl(void) const {return m_a[3];};
50 double sinPhi0(void) const {return sin(phi0());};
51 double cosPhi0(void) const {return cos(phi0());};
52 double lambda() const {return atan(m_a[3]);};
53 double theta() const {return M_PI/2.-lambda();};
54 double cosTheta() const {return cos(theta());};
55
56 /// returns position after moving s in downwoards
57 HepPoint3D x(double s = 0.) const;
58
59 // s to reach R
60 double sAtR(double R, int direction=1) const;
61 // position at R or intersection with R
62 HepPoint3D xAtR(double R, int direction=1) const;
63
64 // s at phi
65 double sAtPhi(double phi) const;
66 // position at phi
67 HepPoint3D xAtPhi(double phi) const;
68
69
70 /// returns position and convariance matrix(Ex) after moving s.
71 // HepPoint3D x(double s, HepSymMatrix & Ex) const;
72
73 // modifiers
74 void set(const HepVector & a);
75 void set(const HepPoint3D & pivot);
76 /// sets pivot position, parameters.
77 void set(const HepPoint3D & pivot, const HepVector & a);
78
79
80 void print();
81
82 private:
83 HepPoint3D m_pivot;
84 HepVector m_a;// dr, phi0, dz, tanl
85 //HepSymMatrix m_Ea;
86 //bool m_matrixValid;
87};
88#endif
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
XmlRpcServer s
HepGeom::Point3D< double > HepPoint3D
#define M_PI
Definition TConstant.h:4
double dz(void) const
double cosTheta() const
double sAtPhi(double phi) const
virtual ~StraightLine()
Destructor.
const HepPoint3D & pivot(void) const
returns pivot position.
HepPoint3D xAtR(double R, int direction=1) const
double dr(void) const
returns an element of parameters.
void set(const HepVector &a)
returns position and convariance matrix(Ex) after moving s.
double cosPhi0(void) const
double theta() const
HepPoint3D xAtPhi(double phi) const
double tanl(void) const
const HepVector & a(void) const
returns helix parameters.
double phi0(void) const
double lambda() const
double sinPhi0(void) const
StraightLine(const HepPoint3D &pivot, const HepVector &a)
double sAtR(double R, int direction=1) const