8 if(states.size()<2)
throw VertexException(
"TwoTrackMassKinematicConstraint::<2 states passed");
12 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
13 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
18 double p1vx =
p1(3) - a_1*(point.
y() -
p1(1));
19 double p1vy =
p1(4) + a_1*(point.
x() -
p1(0));
23 double p2vx =
p2(3) - a_2*(point.
y() -
p2(1));
24 double p2vy =
p2(4) + a_2*(point.
x() -
p2(0));
32 double j_m = (p1vx+p2vx)*(p1vx+p2vx) + (p1vy+p2vy)*(p1vy+p2vy) +
33 (p1vz+p2vz)*(p1vz+p2vz);
35 res(1) = j_energy*j_energy - j_m -
mass*
mass;
42 int n_st = states.size();
43 if(n_st<2)
throw VertexException(
"TwoTrackMassKinematicConstraint::<2 states passed");
47 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
48 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
53 double p1vx =
p1(3) - a_1*(point.
y() -
p1(1));
54 double p1vy =
p1(4) + a_1*(point.
x() -
p1(0));
58 double p2vx =
p2(3) - a_2*(point.
y() -
p2(1));
59 double p2vy =
p2(4) + a_2*(point.
x() -
p2(0));
68 res(1,1) = 2*a_1*(p2vy + p1vy);
69 res(1,8) = 2*a_2*(p2vy + p1vy);
72 res(1,2) = -2*a_1*(p1vx + p2vx);
73 res(1,9) = -2*a_2*(p2vx + p1vx);
80 res(1,4) = 2*(1+e2/e1)*
p1(3) - 2*(p1vx + p2vx);
81 res(1,11) = 2*(1+e1/e2)*
p2(3) - 2*(p1vx + p2vx);
84 res(1,5) = 2*(1+e2/e1)*
p1(4) - 2*(p1vy + p2vy);
85 res(1,12) = 2*(1+e1/e2)*
p2(4) - 2*(p2vy + p1vy);
88 res(1,6) = 2*(1+e2/e1)*
p1(5)- 2*(p1vz + p2vz);
89 res(1,13) = 2*(1+e1/e2)*
p2(5)- 2*(p2vz + p1vz);
92 res(1,7) = 2*m1*(1+e2/e1);
93 res(1,14) = 2*m2*(1+e1/e2);
102 if(states.size()<2)
throw VertexException(
"TwoTrackMassKinematicConstraint::<2 states passed");
104 double a_1 = -states[0].particleCharge() * states[0].magneticField()->inInverseGeV(states[0].globalPosition()).z();
105 double a_2 = -states[1].particleCharge() * states[1].magneticField()->inInverseGeV(states[1].globalPosition()).z();
110 double p1vx =
p1(3) - a_1*(point.
y() -
p1(1));
111 double p1vy =
p1(4) + a_1*(point.
x() -
p1(0));
113 double p2vx =
p2(3) - a_2*(point.
y() -
p2(1));
114 double p2vy =
p2(4) + a_2*(point.
x() -
p2(0));
117 res(1,1) = -2*(p1vy + p2vy)*(a_1+a_2);
120 res(1,2) = 2*(p1vx + p2vx)*(a_1+a_2);
int numberOfEquations() const override
AlgebraicMatrix positionDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
AlgebraicMatrix parametersDerivative(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
ROOT::Math::SVector< double, 7 > AlgebraicVector7
CLHEP::HepMatrix AlgebraicMatrix
AlgebraicVector value(const std::vector< KinematicState > &states, const GlobalPoint &point) const override
CLHEP::HepVector AlgebraicVector
*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