8 if((momentum.num_row() != 3) || (dev.num_row() != 3))
9 throw VertexException(
"MomentumKinemticConstraint::Momentum or Deviation vector passed is not 3-dimensional");
12 dev_l(4) = dev(1) * dev(1);
13 dev_l(5) = dev(2) * dev(2);
14 dev_l(6) = dev(3) * dev(3);
20 if(exPoint.num_row() ==0 )
throw VertexException(
"MomentumKinematicConstraint::value requested for zero Linearization point");
23 int inSize = exPoint.num_row();
24 if((inSize%7) !=0)
throw VertexException(
"MomentumKinematicConstraint::linearization point has a wrong dimension");
25 int nStates = inSize/7;
26 if(nStates != 1)
throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
29 vl(1) = pr(4) -
mm(1);
30 vl(2) = pr(5) -
mm(2);
31 vl(3) = pr(6) -
mm(3);
32 return std::pair<AlgebraicVector,AlgebraicVector>(vl,pr);
37 if(exPoint.num_row() ==0 )
throw VertexException(
"MomentumKinematicConstraint::derivative requested for zero Linearization point");
40 int inSize = exPoint.num_row();
41 if((inSize%7) !=0)
throw VertexException(
"MomentumKinematicConstraint::linearization point has a wrong dimension");
42 int nStates = inSize/7;
43 if(nStates != 1)
throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
50 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,pr);
55 int nStates = par.size();
56 if(nStates == 0)
throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
57 if(nStates != 1)
throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
58 AlgebraicVector point = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
63 return std::pair<AlgebraicVector,AlgebraicVector>(vl,
point);
68 int nStates = par.size();
69 if(nStates == 0)
throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
70 if(nStates != 1)
throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
71 AlgebraicVector point = asHepVector<7>(par.front()->currentState().kinematicParameters().vector());
76 return std::pair<AlgebraicMatrix,AlgebraicVector>(dr,
point);
81 if(nStates == 0)
throw VertexException(
"MomentumKinematicConstraint::Empty vector of particles passed");
82 if(nStates != 1)
throw VertexException(
"MomentumKinematicConstraint::Multistate refit is not foreseen for this constraint");
virtual std::pair< AlgebraicMatrix, AlgebraicVector > derivative(const AlgebraicVector &exPoint) const
virtual std::pair< AlgebraicVector, AlgebraicVector > value(const AlgebraicVector &exPoint) const
virtual int numberOfEquations() const
MomentumKinematicConstraint(const AlgebraicVector &momentum, const AlgebraicVector &dev)
CLHEP::HepMatrix AlgebraicMatrix
CLHEP::HepVector AlgebraicVector
virtual AlgebraicVector deviations(int nStates) 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