5const double VertexConstraints :: Alpha = -0.00299792458;
6const int VertexConstraints::FixedVertex = 1;
7const int VertexConstraints::CommonVertex = 2;
51 for (
unsigned int i = 0; i < wlis.size(); i++)
54 HepLorentzVector p = wtrk.
p();
59 double a = afield * (0.0+wtrk.
charge());
60 double J = a * (delx.x()*p.px() + delx.y()*p.py())/p.perp2();
62 J = std::min(J, 1-1e-4);
63 J = std::max(J, -1+1e-4);
64 double Rx = delx.x() - 2*p.px() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
65 double Ry = delx.y() - 2*p.py() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
66 double S = 1.0/sqrt(1-J*J)/p.perp2();
70 dc[0] = delx.y() * p.px() - delx.x() * p.py() - 0.5 * a * (delx.x() * delx.x() + delx.y() * delx.y());
71 dc[1] = delx.z() - p.pz()/a*asin(J);
74 HepMatrix
Ec(2, 3, 0);
77 HepMatrix
Dc(2, 6, 0);
81 Dc[0][3] = p.py() + a * delx.x();
82 Dc[0][4] = -p.px() + a * delx.y();
84 Dc[1][0] = -p.pz() * S * Rx;
85 Dc[1][1] = -p.pz() * S * Ry;
86 Dc[1][2] = - asin(J) / a;
87 Dc[1][3] = p.px() * p.pz() * S;
88 Dc[1][4] = p.py() * p.pz() * S;
92 HepSymMatrix
VD(2, 0);
97 HepSymMatrix
EVDE(3, 0);
98 m_EVDE.push_back(
EVDE);
104 m_lambda.push_back(
lambda);
106 HepMatrix
covax(6, 3, 0);
107 m_covax.push_back(
covax);
115 for (
unsigned int i = 0; i < wlis.size(); i++)
118 HepLorentzVector p = wtrk.
p();
125 dc[0] = p.pz()*delx.x() - p.px()*delx.z();
126 dc[1] = p.pz()*delx.y() - p.py()*delx.z();
139 Dc[0][0] = -delx.z();
146 Dc[1][1] = -delx.z();
156 double a = afield * (0.0+wtrk.
charge());
157 double J = a * (delx.x()*p.px() + delx.y()*p.py())/p.perp2();
158 J = std::min(J, 1-1e-4);
159 J = std::max(J, -1+1e-4);
160 double Rx = delx.x() - 2*p.px() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
161 double Ry = delx.y() - 2*p.py() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
162 double S = 1.0/sqrt(1-J*J)/p.perp2();
165 dc[0] = delx.y() * p.px() - delx.x() * p.py() - 0.5 * a * (delx.x() * delx.x() + delx.y() * delx.y());
166 dc[1] = delx.z() - p.pz()/a*asin(J);
169 HepMatrix
Ec(2, 3, 0);
170 Ec[0][0] = -p.py()- a * delx.x();
171 Ec[0][1] = p.px() - a * delx.y();
173 Ec[1][0] = -p.px() * p.pz() * S ;
174 Ec[1][1] = -p.py() * p.pz() * S ;
178 HepMatrix
Dc(2, 6, 0);
180 Dc[0][1] = -delx.x();
182 Dc[0][3] = p.py() + a * delx.x();
183 Dc[0][4] = -p.px() + a * delx.y();
185 Dc[1][0] = -p.pz() * S * Rx;
186 Dc[1][1] = -p.pz() * S * Ry;
187 Dc[1][2] = - asin(J) / a;
188 Dc[1][3] = p.px() * p.pz() * S;
189 Dc[1][4] = p.py() * p.pz() * S;
194 HepSymMatrix
VD(2, 0);
197 HepSymMatrix
EVDE(3, 0);
198 m_EVDE.push_back(
EVDE);
204 m_lambda.push_back(
lambda);
206 HepMatrix
covax(6, 3, 0);
207 m_covax.push_back(
covax);
std::vector< HepMatrix > Dc() const
void FixedVertexConstraints(std::vector< int > tlis)
std::vector< HepSymMatrix > EVDE() const
void CommonVertexConstraints(std::vector< int > tlis)
std::vector< HepSymMatrix > VD() const
void UpdateConstraints(VertexParameter vpar, std::vector< WTrackParameter > wlis)
std::vector< HepMatrix > covax() const
std::vector< HepMatrix > Ec() const
std::vector< HepVector > lambda0() const
std::vector< HepVector > dc() const
std::vector< HepVector > lambda() const
void setType(const int type)
double getCBz(const HepVector &vtx, const HepVector &trackPosition)
static VertexFitBField * instance()
HepLorentzVector p() const