14 int num = states.size();
15 if(num<2)
throw VertexException(
"VertexKinematicConstraint::<2 states passed");
20 for(std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++)
25 double d_x = point.
x() - pos.
x();
26 double d_y = point.
y() - pos.
y();
27 double d_z = point.
z() - pos.
z();
34 double a_i = - ch *
i->magneticField()->inInverseGeV(pos).z();
36 double pvx = mom.
x() - a_i*d_y;
37 double pvy = mom.
y() + a_i*d_x;
38 double n = a_i*(d_x * mom.
x() + d_y * mom.
y());
39 double m = (pvx*mom.
x() + pvy*mom.
y());
40 double delta = atan2(n,m);
43 vl(num_r*2 +1) = d_y*mom.
x() - d_x*mom.
y() -a_i*(d_x*d_x + d_y*d_y)/2;
44 vl(num_r*2 +2) = d_z - mom.
z()*delta/a_i;
48 vl(num_r*2 +1) = d_y*mom.
x() - d_x*mom.
y();
49 vl(num_r*2 +2) = d_z - mom.
z()*(d_x * mom.
x() + d_y * mom.
y())/(pt*pt);
59 int num = states.size();
60 if(num<2)
throw VertexException(
"VertexKinematicConstraint::<2 states passed");
63 for(std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++)
69 double d_x = point.
x() - pos.
x();
70 double d_y = point.
y() - pos.
y();
76 double a_i = - ch *
i->magneticField()->inInverseGeV(pos).z();
78 double pvx = mom.
x() - a_i*d_y;
79 double pvy = mom.
y() + a_i*d_x;
80 double pvt =
sqrt(pvx*pvx+pvy*pvy);
81 double novera = (d_x * mom.
x() + d_y * mom.
y());
82 double n = a_i*novera;
83 double m = (pvx*mom.
x() + pvy*mom.
y());
84 double k = -mom.
z()/(pvt*pvt*pt*
pt);
85 double delta = atan2(n,m);
88 el_part_d(1,1) = mom.
y() + a_i*d_x;
89 el_part_d(1,2) = -mom.
x() + a_i*d_y;
90 el_part_d(2,1) = -k*(m*mom.
x() - n*mom.
y());
91 el_part_d(2,2) = -k*(m*mom.
y() + n*mom.
x());
94 el_part_d(1,5) = -d_x;
95 el_part_d(2,4) = k*(m*d_x - novera*(2*mom.
x() - a_i*d_y));
96 el_part_d(2,5) = k*(m*d_y - novera*(2*mom.
y() + a_i*d_x));
97 el_part_d(2,6) = -delta /a_i;
98 jac_d.sub(num_r*2+1, num_r*7+1, el_part_d);
101 el_part_d(1,1) = mom.
y();
102 el_part_d(1,2) = -mom.
x();
103 el_part_d(2,1) = mom.
x() * mom.
z()/(pt*
pt);
104 el_part_d(2,2) = mom.
y() * mom.
z()/(pt*
pt);
105 el_part_d(2,3) = -1.;
106 el_part_d(1,4) = d_y;
107 el_part_d(1,5) = -d_x;
108 el_part_d(2,4) = 2*(d_x*mom.
x()+d_y*mom.
y())*mom.
x()*mom.
z()/(pt*pt*pt*
pt) - mom.
z()*d_x/(pt*
pt);
109 el_part_d(2,5) = 2*(d_x*mom.
x()+d_y*mom.
y())*mom.
y()*mom.
z()/(pt*pt*pt*
pt) - mom.
z()*d_y/(pt*
pt);
110 el_part_d(2,6) =-(d_x * mom.
x() + d_y * mom.
y())/(pt*pt);
111 jac_d.sub(num_r*2+1, num_r*7+1, el_part_d);
121 int num = states.size();
122 if(num<2)
throw VertexException(
"VertexKinematicConstraint::<2 states passed");
125 for(std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++)
131 double d_x = point.
x() - pos.
x();
132 double d_y = point.
y() - pos.
y();
139 double a_i = - ch *
i->magneticField()->inInverseGeV(pos).z();
141 double pvx = mom.
x() - a_i*d_y;
142 double pvy = mom.
y() + a_i*d_x;
143 double pvt =
sqrt(pvx*pvx+pvy*pvy);
144 double n = a_i*(d_x * mom.
x() + d_y * mom.
y());
145 double m = (pvx*mom.
x() + pvy*mom.
y());
146 double k = -mom.
z()/(pvt*pvt*pt*
pt);
149 el_part_e(1,1) = -(mom.
y() + a_i*d_x);
150 el_part_e(1,2) = mom.
x() - a_i*d_y;
151 el_part_e(2,1) = k*(m*mom.
x() - n*mom.
y());
152 el_part_e(2,2) = k*(m*mom.
y() + n*mom.
x());
154 jac_e.sub(2*num_r+1,1,el_part_e);
158 el_part_e(1,1) = - mom.
y();
159 el_part_e(1,2) = mom.
x();
160 el_part_e(2,1) = -mom.
x()*mom.
z()/(pt*
pt);
161 el_part_e(2,2) = -mom.
y()*mom.
z()/(pt*
pt);
163 jac_e.sub(2*num_r+1,1,el_part_e);
virtual int numberOfEquations() const
virtual ~VertexKinematicConstraint()
VertexKinematicConstraint()
CLHEP::HepMatrix AlgebraicMatrix
CLHEP::HepVector AlgebraicVector
virtual AlgebraicMatrix parametersDerivative(const std::vector< KinematicState > states, const GlobalPoint &point) const
virtual AlgebraicMatrix positionDerivative(const std::vector< KinematicState > states, const GlobalPoint &point) const
virtual AlgebraicVector value(const std::vector< KinematicState > states, const GlobalPoint &point) const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point