11 int num = states.size();
18 for (std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++) {
29 double a_i = -ch *
i->magneticField()->inInverseGeV(
pos).z();
31 double pvx = mom.
x() - a_i *
d_y;
32 double pvy = mom.
y() + a_i *
d_x;
33 double n = a_i * (
d_x * mom.
x() +
d_y * mom.
y());
34 double m = (pvx * mom.
x() + pvy * mom.
y());
39 vl(num_r * 2 + 2) = d_z - mom.
z() *
delta / a_i;
42 vl(num_r * 2 + 1) =
d_y * mom.
x() -
d_x * mom.
y();
43 vl(num_r * 2 + 2) = d_z - mom.
z() * (
d_x * mom.
x() +
d_y * mom.
y()) / (
pt *
pt);
52 int num = states.size();
57 for (std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++) {
68 double a_i = -ch *
i->magneticField()->inInverseGeV(
pos).z();
70 double pvx = mom.
x() - a_i *
d_y;
71 double pvy = mom.
y() + a_i *
d_x;
72 double pvt =
sqrt(pvx * pvx + pvy * pvy);
73 double novera = (
d_x * mom.
x() +
d_y * mom.
y());
74 double n = a_i * novera;
75 double m = (pvx * mom.
x() + pvy * mom.
y());
76 double k = -mom.
z() / (pvt * pvt *
pt *
pt);
80 el_part_d(1, 1) = mom.
y() + a_i *
d_x;
81 el_part_d(1, 2) = -mom.
x() + a_i *
d_y;
82 el_part_d(2, 1) = -
k * (
m * mom.
x() -
n * mom.
y());
83 el_part_d(2, 2) = -
k * (
m * mom.
y() +
n * mom.
x());
84 el_part_d(2, 3) = -1.;
85 el_part_d(1, 4) =
d_y;
86 el_part_d(1, 5) = -
d_x;
87 el_part_d(2, 4) =
k * (
m *
d_x - novera * (2 * mom.
x() - a_i *
d_y));
88 el_part_d(2, 5) =
k * (
m *
d_y - novera * (2 * mom.
y() + a_i *
d_x));
89 el_part_d(2, 6) = -
delta / a_i;
90 jac_d.sub(num_r * 2 + 1, num_r * 7 + 1, el_part_d);
93 el_part_d(1, 1) = mom.
y();
94 el_part_d(1, 2) = -mom.
x();
95 el_part_d(2, 1) = mom.
x() * mom.
z() / (
pt *
pt);
96 el_part_d(2, 2) = mom.
y() * mom.
z() / (
pt *
pt);
97 el_part_d(2, 3) = -1.;
98 el_part_d(1, 4) =
d_y;
99 el_part_d(1, 5) = -
d_x;
104 el_part_d(2, 6) = -(
d_x * mom.
x() +
d_y * mom.
y()) / (
pt *
pt);
105 jac_d.sub(num_r * 2 + 1, num_r * 7 + 1, el_part_d);
114 int num = states.size();
119 for (std::vector<KinematicState>::const_iterator
i = states.begin();
i != states.end();
i++) {
130 double a_i = -ch *
i->magneticField()->inInverseGeV(
pos).z();
132 double pvx = mom.
x() - a_i *
d_y;
133 double pvy = mom.
y() + a_i *
d_x;
134 double pvt =
sqrt(pvx * pvx + pvy * pvy);
135 double n = a_i * (
d_x * mom.
x() +
d_y * mom.
y());
136 double m = (pvx * mom.
x() + pvy * mom.
y());
137 double k = -mom.
z() / (pvt * pvt *
pt *
pt);
140 el_part_e(1, 1) = -(mom.
y() + a_i *
d_x);
141 el_part_e(1, 2) = mom.
x() - a_i *
d_y;
142 el_part_e(2, 1) =
k * (
m * mom.
x() -
n * mom.
y());
143 el_part_e(2, 2) =
k * (
m * mom.
y() +
n * mom.
x());
145 jac_e.sub(2 * num_r + 1, 1, el_part_e);
148 el_part_e(1, 1) = -mom.
y();
149 el_part_e(1, 2) = mom.
x();
150 el_part_e(2, 1) = -mom.
x() * mom.
z() / (
pt *
pt);
151 el_part_e(2, 2) = -mom.
y() * mom.
z() / (
pt *
pt);
153 jac_e.sub(2 * num_r + 1, 1, el_part_e);
AlgebraicMatrix positionDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
AlgebraicMatrix parametersDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
~VertexKinematicConstraint() override
VertexKinematicConstraint()
AlgebraicVector value(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
CLHEP::HepMatrix AlgebraicMatrix
CLHEP::HepVector AlgebraicVector
int numberOfEquations() const override
*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