14 if (states.size() < 2)
15 throw VertexException(
"ColinearityKinematicConstraint::<2 states passed");
18 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
19 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
24 double p1vx =
p1(3) - a_1 * (
point.y() -
p1(1));
25 double p1vy =
p1(4) + a_1 * (
point.x() -
p1(0));
28 double p2vx =
p2(3) - a_2 * (
point.y() -
p2(1));
29 double p2vy =
p2(4) + a_2 * (
point.x() -
p2(0));
54 int n_st = states.size();
56 throw VertexException(
"ColinearityKinematicConstraint::<2 states passed");
59 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
60 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
65 double p1vx =
p1(3) - a_1 * (
point.y() -
p1(1));
66 double p1vy =
p1(4) + a_1 * (
point.x() -
p1(0));
67 double k1 = 1.0 / (p1vx * p1vx + p1vy * p1vy);
71 double p2vx =
p2(3) - a_2 * (
point.y() -
p2(1));
72 double p2vy =
p2(4) + a_2 * (
point.x() -
p2(0));
73 double k2 = 1.0 / (p2vx * p2vx + p2vy * p2vy);
80 res(1, 1) = -k1 * a_1 * p1vx;
81 res(1, 8) =
k2 * a_2 * p2vx;
84 res(1, 2) = -k1 * a_1 * p1vy;
85 res(1, 9) =
k2 * a_2 * p2vy;
92 res(1, 4) = -k1 * p1vy;
93 res(1, 11) =
k2 * p2vy;
96 res(1, 5) = k1 * p1vx;
97 res(1, 12) = -
k2 * p2vx;
120 res(2, 4) =
p1(5) *
p1(3) / (pTot1 * pTot1 *
pt1);
121 res(2, 11) = -
p2(5) *
p2(3) / (pTot2 * pTot2 *
pt2);
124 res(2, 5) =
p1(5) *
p1(4) / (pTot1 * pTot1 *
pt1);
125 res(2, 12) = -
p2(5) *
p2(4) / (pTot2 * pTot2 *
pt2);
128 res(2, 6) = -
pt1 / (pTot1 * pTot1);
129 res(2, 13) =
pt2 / (pTot2 * pTot2);
141 if (states.size() < 2)
142 throw VertexException(
"ColinearityKinematicConstraint::<2 states passed");
144 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
145 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
150 double p1vx =
p1(3) - a_1 * (
point.y() -
p1(1));
151 double p1vy =
p1(4) + a_1 * (
point.x() -
p1(0));
152 double k1 = 1.0 / (p1vx * p1vx + p1vy * p1vy);
155 double p2vx =
p2(3) - a_2 * (
point.y() -
p2(1));
156 double p2vy =
p2(4) + a_2 * (
point.x() -
p2(0));
157 double k2 = 1.0 / (p2vx * p2vx + p2vy * p2vy);
163 res(1, 1) = k1 * a_1 * p1vx -
k2 * a_2 * p2vx;
166 res(1, 2) = k1 * a_1 * p1vy -
k2 * a_2 * p2vy;
AlgebraicMatrix positionDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
AlgebraicVector value(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
ROOT::Math::SVector< double, 7 > AlgebraicVector7
CLHEP::HepMatrix AlgebraicMatrix
CLHEP::HepVector AlgebraicVector
AlgebraicMatrix parametersDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) 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
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)
ColinearityKinematicConstraint(ConstraintDim dim=Phi)