#include <VertexConstraints.h>
Public Member Functions | |
int | commonVertex () const |
int | commonVertex () const |
void | CommonVertexConstraints (std::vector< int > tlis) |
void | CommonVertexConstraints (std::vector< int > tlis) |
std::vector< HepMatrix > | covax () const |
std::vector< HepMatrix > | covax () const |
std::vector< HepVector > | dc () const |
std::vector< HepMatrix > | Dc () const |
std::vector< HepVector > | dc () const |
std::vector< HepMatrix > | Dc () const |
std::vector< HepMatrix > | Ec () const |
std::vector< HepMatrix > | Ec () const |
std::vector< HepSymMatrix > | EVDE () const |
std::vector< HepSymMatrix > | EVDE () const |
int | fixedVertex () const |
int | fixedVertex () const |
void | FixedVertexConstraints (std::vector< int > tlis) |
void | FixedVertexConstraints (std::vector< int > tlis) |
std::vector< HepVector > | lambda () const |
std::vector< HepVector > | lambda () const |
std::vector< HepVector > | lambda0 () const |
std::vector< HepVector > | lambda0 () const |
std::vector< int > | Ltrk () const |
std::vector< int > | Ltrk () const |
VertexConstraints & | operator= (const VertexConstraints &) |
VertexConstraints & | operator= (const VertexConstraints &) |
void | setCovax (const int i, const HepMatrix cov) |
void | setCovax (const int i, const HepMatrix cov) |
void | setEVDE (const int i, const HepSymMatrix evde) |
void | setEVDE (const int i, const HepSymMatrix evde) |
void | setLambda (const int i, const HepVector L) |
void | setLambda (const int i, const HepVector L) |
void | setLambda0 (const int i, const HepVector L0) |
void | setLambda0 (const int i, const HepVector L0) |
void | setType (const int type) |
void | setType (const int type) |
void | setVD (const int i, const HepSymMatrix vd) |
void | setVD (const int i, const HepSymMatrix vd) |
int | type () const |
int | type () const |
void | UpdateConstraints (VertexParameter vpar, std::vector< WTrackParameter > wlis) |
void | UpdateConstraints (VertexParameter vpar, std::vector< WTrackParameter > wlis) |
std::vector< HepSymMatrix > | VD () const |
std::vector< HepSymMatrix > | VD () const |
VertexConstraints (const VertexConstraints &) | |
VertexConstraints () | |
VertexConstraints (const VertexConstraints &) | |
VertexConstraints () | |
~VertexConstraints () | |
~VertexConstraints () | |
Private Attributes | |
std::vector< HepMatrix > | m_covax |
std::vector< HepMatrix > | m_covax |
std::vector< HepVector > | m_dc |
std::vector< HepMatrix > | m_Dc |
std::vector< HepVector > | m_dc |
std::vector< HepMatrix > | m_Dc |
std::vector< HepMatrix > | m_Ec |
std::vector< HepMatrix > | m_Ec |
std::vector< HepSymMatrix > | m_EVDE |
std::vector< HepSymMatrix > | m_EVDE |
std::vector< HepVector > | m_lambda |
std::vector< HepVector > | m_lambda |
std::vector< HepVector > | m_lambda0 |
std::vector< HepVector > | m_lambda0 |
std::vector< int > | m_ltrk |
std::vector< int > | m_ltrk |
int | m_type |
std::vector< HepSymMatrix > | m_VD |
std::vector< HepSymMatrix > | m_VD |
Static Private Attributes | |
const double | Alpha = -0.00299792458 |
const int | CommonVertex = 2 |
const int | FixedVertex = 1 |
|
00010 { 00011 m_Ec.clear(); 00012 m_Dc.clear(); 00013 m_dc.clear(); 00014 m_VD.clear(); 00015 m_EVDE.clear(); 00016 m_lambda0.clear(); 00017 m_lambda.clear(); 00018 m_covax.clear(); 00019 m_ltrk.clear(); 00020 m_type = 0; 00021 }
|
|
00035 {;}
|
|
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 }
|
|
|
|
00035 {;}
|
|
|
|
00057 {return CommonVertex;}
|
|
00057 {return CommonVertex;}
|
|
|
|
00024 { 00025 m_ltrk = tlis; 00026 setType(commonVertex()); 00027 }
|
|
00052 {return m_covax;}
|
|
00052 {return m_covax;}
|
|
00049 {return m_dc;}
|
|
00048 {return m_Dc;}
|
|
00049 {return m_dc;}
|
|
00048 {return m_Dc;}
|
|
00047 {return m_Ec;}
|
|
00047 {return m_Ec;}
|
|
00051 {return m_EVDE;}
|
|
00051 {return m_EVDE;}
|
|
00058 {return FixedVertex;}
|
|
00058 {return FixedVertex;}
|
|
|
|
00030 { 00031 m_ltrk = tlis; 00032 setType(fixedVertex()); 00033 }
|
|
00054 {return m_lambda;}
|
|
00054 {return m_lambda;}
|
|
00053 {return m_lambda0;}
|
|
00053 {return m_lambda0;}
|
|
00055 {return m_ltrk;}
|
|
00055 {return m_ltrk;}
|
|
|
|
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 }
|
|
00040 {m_covax[i] = cov;}
|
|
00040 {m_covax[i] = cov;}
|
|
00044 {m_EVDE[i] = evde;}
|
|
00044 {m_EVDE[i] = evde;}
|
|
00041 {m_lambda[i] = L;}
|
|
00041 {m_lambda[i] = L;}
|
|
00042 {m_lambda0[i] = L0;}
|
|
00042 {m_lambda0[i] = L0;}
|
|
00045 {m_type = type;}
|
|
00045 {m_type = type;}
|
|
00043 {m_VD[i] = vd;}
|
|
00043 {m_VD[i] = vd;}
|
|
00056 {return m_type;}
|
|
00056 {return m_type;}
|
|
|
|
00036 { 00037 m_Ec.clear(); 00038 m_Dc.clear(); 00039 m_dc.clear(); 00040 m_VD.clear(); 00041 m_EVDE.clear(); 00042 m_lambda0.clear(); 00043 m_lambda.clear(); 00044 m_covax.clear(); 00045 00046 switch(m_type) 00047 { 00048 case FixedVertex: 00049 { 00050 WTrackParameter wtrk; 00051 for (unsigned int i = 0; i < wlis.size(); i++) 00052 { 00053 wtrk = wlis[i]; 00054 HepLorentzVector p = wtrk.p(); 00055 HepPoint3D x = wtrk.x(); 00056 HepPoint3D delx = vpar.vx() - x; 00057 00058 double afield = VertexFitBField::instance()->getCBz(vpar.Vx(), wtrk.X()); 00059 double a = afield * (0.0+wtrk.charge()); 00060 double J = a * (delx.x()*p.px() + delx.y()*p.py())/p.perp2(); 00061 00062 J = std::min(J, 1-1e-4); 00063 J = std::max(J, -1+1e-4); 00064 double Rx = delx.x() - 2*p.px() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2(); 00065 double Ry = delx.y() - 2*p.py() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2(); 00066 double S = 1.0/sqrt(1-J*J)/p.perp2(); 00067 00068 // dc 00069 HepVector dc(2, 0); 00070 dc[0] = delx.y() * p.px() - delx.x() * p.py() - 0.5 * a * (delx.x() * delx.x() + delx.y() * delx.y()); 00071 dc[1] = delx.z() - p.pz()/a*asin(J); 00072 m_dc.push_back(dc); 00073 // Ec 00074 HepMatrix Ec(2, 3, 0); 00075 m_Ec.push_back(Ec); 00076 // Dc 00077 HepMatrix Dc(2, 6, 0); 00078 Dc[0][0] = delx.y(); 00079 Dc[0][1] = -delx.x(); 00080 Dc[0][2] = 0; 00081 Dc[0][3] = p.py() + a * delx.x(); 00082 Dc[0][4] = -p.px() + a * delx.y(); 00083 Dc[0][5] = 0; 00084 Dc[1][0] = -p.pz() * S * Rx; 00085 Dc[1][1] = -p.pz() * S * Ry; 00086 Dc[1][2] = - asin(J) / a; 00087 Dc[1][3] = p.px() * p.pz() * S; 00088 Dc[1][4] = p.py() * p.pz() * S; 00089 Dc[1][5] = -1.0; 00090 m_Dc.push_back(Dc); 00091 // VD 00092 HepSymMatrix VD(2, 0); 00093 // int ifail; 00094 // VD = ((wtrk.Ew()).similarity(Dc)).inverse(ifail); // 2x2 matrix (Dc Ew Dc.T()) 00095 m_VD.push_back(VD); 00096 // EVDE 00097 HepSymMatrix EVDE(3, 0); 00098 m_EVDE.push_back(EVDE); 00099 // lambda0 00100 HepVector lambda0(2, 0); 00101 m_lambda0.push_back(lambda0); 00102 // lambda 00103 HepVector lambda(2, 0); 00104 m_lambda.push_back(lambda); 00105 // covax 00106 HepMatrix covax(6, 3, 0); 00107 m_covax.push_back(covax); 00108 break; 00109 } 00110 } 00111 case CommonVertex: 00112 default: 00113 { 00114 WTrackParameter wtrk; 00115 for (unsigned int i = 0; i < wlis.size(); i++) 00116 { 00117 wtrk = wlis[i]; 00118 HepLorentzVector p = wtrk.p(); 00119 HepPoint3D x = wtrk.x(); 00120 HepPoint3D delx = vpar.vx() - x; 00121 if (wtrk.charge() == 0) 00122 { 00123 //dc 00124 HepVector dc(2,0); 00125 dc[0] = p.pz()*delx.x() - p.px()*delx.z(); 00126 dc[1] = p.pz()*delx.y() - p.py()*delx.z(); 00127 m_dc.push_back(dc); 00128 //Ec 00129 HepMatrix Ec(2,3,0); 00130 Ec[0][0] = p.pz(); 00131 Ec[0][1] = 0; 00132 Ec[0][2] = -p.px(); 00133 Ec[1][0] = 0; 00134 Ec[1][1] = p.pz(); 00135 Ec[1][2] = -p.py(); 00136 m_Ec.push_back(Ec); 00137 //Dc 00138 HepMatrix Dc(2,6,0); 00139 Dc[0][0] = -delx.z(); 00140 Dc[0][1] = 0; 00141 Dc[0][2] = delx.x(); 00142 Dc[0][3] = -p.pz(); 00143 Dc[0][4] = 0; 00144 Dc[0][5] = p.px(); 00145 Dc[1][0] = 0; 00146 Dc[1][1] = -delx.z(); 00147 Dc[1][2] = delx.y(); 00148 Dc[1][3] = 0; 00149 Dc[1][4] = -p.pz(); 00150 Dc[1][5] = p.py(); 00151 m_Dc.push_back(Dc); 00152 } 00153 else 00154 { 00155 double afield = VertexFitBField::instance()->getCBz(vpar.Vx(), wtrk.X()); 00156 double a = afield * (0.0+wtrk.charge()); 00157 double J = a * (delx.x()*p.px() + delx.y()*p.py())/p.perp2(); 00158 J = std::min(J, 1-1e-4); 00159 J = std::max(J, -1+1e-4); 00160 double Rx = delx.x() - 2*p.px() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2(); 00161 double Ry = delx.y() - 2*p.py() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2(); 00162 double S = 1.0/sqrt(1-J*J)/p.perp2(); 00163 // dc 00164 HepVector dc(2, 0); 00165 dc[0] = delx.y() * p.px() - delx.x() * p.py() - 0.5 * a * (delx.x() * delx.x() + delx.y() * delx.y()); 00166 dc[1] = delx.z() - p.pz()/a*asin(J); 00167 m_dc.push_back(dc); 00168 // Ec 00169 HepMatrix Ec(2, 3, 0); 00170 Ec[0][0] = -p.py()- a * delx.x(); 00171 Ec[0][1] = p.px() - a * delx.y(); 00172 Ec[0][2] = 0; 00173 Ec[1][0] = -p.px() * p.pz() * S ; 00174 Ec[1][1] = -p.py() * p.pz() * S ; 00175 Ec[1][2] = 1.0; 00176 m_Ec.push_back(Ec); 00177 // Dc 00178 HepMatrix Dc(2, 6, 0); 00179 Dc[0][0] = delx.y(); 00180 Dc[0][1] = -delx.x(); 00181 Dc[0][2] = 0; 00182 Dc[0][3] = p.py() + a * delx.x(); 00183 Dc[0][4] = -p.px() + a * delx.y(); 00184 Dc[0][5] = 0; 00185 Dc[1][0] = -p.pz() * S * Rx; 00186 Dc[1][1] = -p.pz() * S * Ry; 00187 Dc[1][2] = - asin(J) / a; 00188 Dc[1][3] = p.px() * p.pz() * S; 00189 Dc[1][4] = p.py() * p.pz() * S; 00190 Dc[1][5] = -1.0; 00191 m_Dc.push_back(Dc); 00192 } 00193 // VD 00194 HepSymMatrix VD(2, 0); 00195 m_VD.push_back(VD); 00196 // EVDE 00197 HepSymMatrix EVDE(3, 0); 00198 m_EVDE.push_back(EVDE); 00199 // lambda0 00200 HepVector lambda0(2, 0); 00201 m_lambda0.push_back(lambda0); 00202 // lambda 00203 HepVector lambda(2, 0); 00204 m_lambda.push_back(lambda); 00205 // covax 00206 HepMatrix covax(6, 3, 0); 00207 m_covax.push_back(covax); 00208 } 00209 break; 00210 } 00211 } 00212 }
|
|
00050 {return m_VD;}
|
|
00050 {return m_VD;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|