5 if ((momentum.num_row() != 3) || (dev.num_row() != 3))
6 throw VertexException(
"MomentumKinemticConstraint::Momentum or Deviation vector passed is not 3-dimensional");
9 dev_l(4) = dev(1) * dev(1);
10 dev_l(5) = dev(2) * dev(2);
11 dev_l(6) = dev(3) * dev(3);
16 if (exPoint.num_row() == 0)
17 throw VertexException(
"MomentumKinematicConstraint::value requested for zero Linearization point");
20 int inSize = exPoint.num_row();
21 if ((inSize % 7) != 0)
22 throw VertexException(
"MomentumKinematicConstraint::linearization point has a wrong dimension");
23 int nStates = inSize / 7;
25 throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
28 vl(1) =
pr(4) -
mm(1);
29 vl(2) =
pr(5) -
mm(2);
30 vl(3) =
pr(6) -
mm(3);
31 return std::pair<AlgebraicVector, AlgebraicVector>(vl,
pr);
36 if (exPoint.num_row() == 0)
37 throw VertexException(
"MomentumKinematicConstraint::derivative requested for zero Linearization point");
40 int inSize = exPoint.num_row();
41 if ((inSize % 7) != 0)
42 throw VertexException(
"MomentumKinematicConstraint::linearization point has a wrong dimension");
43 int nStates = inSize / 7;
45 throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
52 return std::pair<AlgebraicMatrix, AlgebraicVector>(
dr,
pr);
56 const std::vector<RefCountedKinematicParticle>& par)
const {
57 int nStates = par.size();
59 throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
61 throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
62 AlgebraicVector point = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
67 return std::pair<AlgebraicVector, AlgebraicVector>(vl,
point);
71 const std::vector<RefCountedKinematicParticle>& par)
const {
72 int nStates = par.size();
74 throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
76 throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
77 AlgebraicVector point = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
82 return std::pair<AlgebraicMatrix, AlgebraicVector>(
dr,
point);
87 throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
89 throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");