BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/include/VertexFit/VertexConstraints.h
Go to the documentation of this file.
1#ifndef Vertex_Constraints_H
2#define Vertex_Constraints_H
3
4//
5// Vertex constraints and related calculation
6// For each charged particl, there are two constraints:
7// 1) 0 = px * delta_y - py*delta_x -a/2*(delta_x^2 +delta_y^2)
8// 2) 0 = delta_z - pz/a*asin(a*(px*delta_x+py*delta_y)/pxy^2)
9// where, delta_x = Vx - x, etc.
10// a = -0.00299792458 * B * q, B in Tesla
11//
12// Author: K.L He date:10/31/2005, created
13//
14
15#include "CLHEP/Matrix/Matrix.h"
16#include "CLHEP/Matrix/SymMatrix.h"
17#include "CLHEP/Matrix/Vector.h"
18#include <vector>
19using CLHEP::HepMatrix;
20using CLHEP::HepSymMatrix;
21using CLHEP::HepVector;
22#include "CLHEP/Geometry/Point3D.h"
23#ifndef ENABLE_BACKWARDS_COMPATIBILITY
24typedef HepGeom::Point3D<double> HepPoint3D;
25#endif
26
27#include "VertexFit/VertexParameter.h"
28#include "VertexFit/WTrackParameter.h"
29
31public:
32 // contructor & descontructir
35 inline VertexConstraints( const VertexConstraints& );
36 void CommonVertexConstraints( std::vector<int> tlis );
37 void FixedVertexConstraints( std::vector<int> tlis );
38 void UpdateConstraints( VertexParameter vpar, std::vector<WTrackParameter> wlis );
39 void setCovax( const int i, const HepMatrix cov ) { m_covax[i] = cov; }
40 void setLambda( const int i, const HepVector L ) { m_lambda[i] = L; }
41 void setLambda0( const int i, const HepVector L0 ) { m_lambda0[i] = L0; }
42 void setVD( const int i, const HepSymMatrix vd ) { m_VD[i] = vd; }
43 void setEVDE( const int i, const HepSymMatrix evde ) { m_EVDE[i] = evde; }
44 void setType( const int type ) { m_type = type; }
45
46 std::vector<HepMatrix> Ec() const { return m_Ec; }
47 std::vector<HepMatrix> Dc() const { return m_Dc; }
48 std::vector<HepVector> dc() const { return m_dc; }
49 std::vector<HepSymMatrix> VD() const { return m_VD; }
50 std::vector<HepSymMatrix> EVDE() const { return m_EVDE; }
51 std::vector<HepMatrix> covax() const { return m_covax; }
52 std::vector<HepVector> lambda0() const { return m_lambda0; }
53 std::vector<HepVector> lambda() const { return m_lambda; }
54 std::vector<int> Ltrk() const { return m_ltrk; }
55 int type() const { return m_type; }
56 int commonVertex() const { return CommonVertex; }
57 int fixedVertex() const { return FixedVertex; }
59
60private:
61 std::vector<HepMatrix> m_Ec;
62 std::vector<HepMatrix> m_Dc;
63 std::vector<HepVector> m_dc;
64 std::vector<HepSymMatrix> m_VD;
65 std::vector<HepSymMatrix> m_EVDE;
66 std::vector<HepMatrix> m_covax;
67 std::vector<HepVector> m_lambda0;
68 std::vector<HepVector> m_lambda;
69 std::vector<int> m_ltrk;
70 int m_type;
71 static const double Alpha;
72 static const int CommonVertex;
73 static const int FixedVertex;
74};
75
77 m_Ec = vc.m_Ec;
78 m_Dc = vc.m_Dc;
79 m_dc = vc.m_dc;
80 m_VD = vc.m_VD;
81 m_EVDE = vc.m_EVDE;
82 m_covax = vc.m_covax;
83 m_lambda0 = vc.m_lambda0;
84 m_lambda = vc.m_lambda;
85 m_ltrk = vc.m_ltrk;
86 m_type = vc.m_type;
87}
88
90 m_Ec = vc.m_Ec;
91 m_Dc = vc.m_Dc;
92 m_dc = vc.m_dc;
93 m_VD = vc.m_VD;
94 m_EVDE = vc.m_EVDE;
95 m_covax = vc.m_covax;
96 m_lambda0 = vc.m_lambda0;
97 m_lambda = vc.m_lambda;
98 m_ltrk = vc.m_ltrk;
99 m_type = vc.m_type;
100 return ( *this );
101}
102#endif // Vertex_Constraints_H
HepGeom::Point3D< double > HepPoint3D
void setLambda0(const int i, const HepVector L0)
void setEVDE(const int i, const HepSymMatrix evde)
VertexConstraints & operator=(const VertexConstraints &)
void FixedVertexConstraints(std::vector< int > tlis)
void CommonVertexConstraints(std::vector< int > tlis)
void setCovax(const int i, const HepMatrix cov)
void setVD(const int i, const HepSymMatrix vd)
void UpdateConstraints(VertexParameter vpar, std::vector< WTrackParameter > wlis)