00001 #ifndef Vertex_Constraints_H 00002 #define Vertex_Constraints_H 00003 00004 // 00005 // Vertex constraints and related calculation 00006 // For each charged particl, there are two constraints: 00007 // 1) 0 = px * delta_y - py*delta_x -a/2*(delta_x^2 +delta_y^2) 00008 // 2) 0 = delta_z - pz/a*asin(a*(px*delta_x+py*delta_y)/pxy^2) 00009 // where, delta_x = Vx - x, etc. 00010 // a = -0.00299792458 * B * q, B in Tesla 00011 // 00012 // Author: K.L He date:10/31/2005, created 00013 // 00014 00015 #include <vector> 00016 #include "CLHEP/Matrix/Matrix.h" 00017 #include "CLHEP/Matrix/SymMatrix.h" 00018 #include "CLHEP/Matrix/Vector.h" 00019 using CLHEP::HepMatrix; 00020 using CLHEP::HepSymMatrix; 00021 using CLHEP::HepVector; 00022 #include "CLHEP/Geometry/Point3D.h" 00023 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00024 typedef HepGeom::Point3D<double> HepPoint3D; 00025 #endif 00026 00027 #include "VertexFit/VertexParameter.h" 00028 #include "VertexFit/WTrackParameter.h" 00029 00030 class VertexConstraints 00031 { 00032 public: 00033 // contructor & descontructir 00034 VertexConstraints(); 00035 ~VertexConstraints() {;} 00036 inline VertexConstraints(const VertexConstraints &); 00037 void CommonVertexConstraints(std::vector<int> tlis); 00038 void FixedVertexConstraints(std::vector<int> tlis); 00039 void UpdateConstraints(VertexParameter vpar, std::vector<WTrackParameter> wlis); 00040 void setCovax(const int i, const HepMatrix cov) {m_covax[i] = cov;} 00041 void setLambda(const int i, const HepVector L) {m_lambda[i] = L;} 00042 void setLambda0(const int i, const HepVector L0){m_lambda0[i] = L0;} 00043 void setVD(const int i, const HepSymMatrix vd) {m_VD[i] = vd;} 00044 void setEVDE(const int i, const HepSymMatrix evde) {m_EVDE[i] = evde;} 00045 void setType(const int type){m_type = type;} 00046 00047 std::vector<HepMatrix> Ec() const {return m_Ec;} 00048 std::vector<HepMatrix> Dc() const {return m_Dc;} 00049 std::vector<HepVector> dc() const {return m_dc;} 00050 std::vector<HepSymMatrix> VD() const{return m_VD;} 00051 std::vector<HepSymMatrix> EVDE() const {return m_EVDE;} 00052 std::vector<HepMatrix> covax() const {return m_covax;} 00053 std::vector<HepVector> lambda0() const {return m_lambda0;} 00054 std::vector<HepVector> lambda() const {return m_lambda;} 00055 std::vector<int> Ltrk() const {return m_ltrk;} 00056 int type() const {return m_type;} 00057 int commonVertex() const {return CommonVertex;} 00058 int fixedVertex() const {return FixedVertex;} 00059 inline VertexConstraints & operator = (const VertexConstraints &); 00060 00061 private: 00062 std::vector<HepMatrix> m_Ec; 00063 std::vector<HepMatrix> m_Dc; 00064 std::vector<HepVector> m_dc; 00065 std::vector<HepSymMatrix> m_VD; 00066 std::vector<HepSymMatrix> m_EVDE; 00067 std::vector<HepMatrix> m_covax; 00068 std::vector<HepVector> m_lambda0; 00069 std::vector<HepVector> m_lambda; 00070 std::vector<int> m_ltrk; 00071 int m_type; 00072 static const double Alpha; 00073 static const int CommonVertex; 00074 static const int FixedVertex; 00075 }; 00076 00077 inline VertexConstraints::VertexConstraints(const VertexConstraints & vc) 00078 { 00079 m_Ec = vc.m_Ec; 00080 m_Dc = vc.m_Dc; 00081 m_dc = vc.m_dc; 00082 m_VD = vc.m_VD; 00083 m_EVDE = vc.m_EVDE; 00084 m_covax = vc.m_covax; 00085 m_lambda0 = vc.m_lambda0; 00086 m_lambda = vc.m_lambda; 00087 m_ltrk = vc.m_ltrk; 00088 m_type = vc.m_type; 00089 } 00090 00091 inline VertexConstraints & VertexConstraints::operator = (const VertexConstraints & vc) 00092 { 00093 m_Ec = vc.m_Ec; 00094 m_Dc = vc.m_Dc; 00095 m_dc = vc.m_dc; 00096 m_VD = vc.m_VD; 00097 m_EVDE = vc.m_EVDE; 00098 m_covax = vc.m_covax; 00099 m_lambda0 = vc.m_lambda0; 00100 m_lambda = vc.m_lambda; 00101 m_ltrk = vc.m_ltrk; 00102 m_type = vc.m_type; 00103 return (*this); 00104 } 00105 #endif //Vertex_Constraints_H 00106