5 if(newConst == 0)
throw VertexException(
"MultipleKinematicConstraint::zero constraint pointer passed");
6 cts.push_back(newConst);
12 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::value requested for empty constraint");
13 if(exPoint.num_row() ==0 )
throw VertexException(
"MultipleKinematicConstraint::value requested for zero Linearization point");
19 int inSize = exPoint.num_row();
20 if((inSize%7) !=0)
throw VertexException(
"MultipleKinematicConstraint::linearization point has a wrong dimension");
23 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
24 {total += (*i)->numberOfEquations();}
28 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
31 int sz = vlc.num_row();
32 for(
int j = 1;
j < sz+1;
j++)
33 {vl(cr_size+
j) = vlc(
j);}
36 return std::pair<AlgebraicVector, AlgebraicVector>(vl,expansion);
41 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::derivative requested for empty constraint");
42 if(exPoint.num_row() ==0 )
throw VertexException(
"MultipleKinematicConstraint::value requested for zero Linearization point");
46 int inSize = exPoint.num_row();
47 if((inSize%7) !=0)
throw VertexException(
"MultipleKinematicConstraint::linearization point has a wrong dimension");
52 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
53 {total += (*i)->numberOfEquations();}
59 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
63 dr.sub(cr_size+1,1,lConst);
64 cr_size += (*i)->numberOfEquations();
66 return std::pair<AlgebraicMatrix, AlgebraicVector>(dr,
par);
72 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::number of equations requested for empty constraint");
73 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
74 {ne += (*i)->numberOfEquations();}
80 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::derivative requested for empty constraint");
81 int nStates = par.size();
84 for(std::vector<RefCountedKinematicParticle>::const_iterator
i = par.begin();
i!=par.end();
i++)
86 for(
int j = 1;
j<8;
j++){param((count -1)*7+
j) = (*i)->currentState().kinematicParameters().vector()(
j-1);}
92 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
93 {total += (*i)->numberOfEquations();}
97 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
100 int sz = vlc.num_row();
101 for(
int j = 1;
j <= sz;
j++)
102 {vl(cr_size+
j) = vlc(
j);}
105 return std::pair<AlgebraicVector, AlgebraicVector>(vl,param);
110 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::derivative requested for empty constraint");
111 int nStates = par.size();
115 for(std::vector<RefCountedKinematicParticle>::const_iterator
i = par.begin();
i!=par.end();
i++)
117 for(
int j = 1;
j<8;
j++){param((count -1)*7+
j) = (*i)->currentState().kinematicParameters().vector()(
j-1);}
121 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
122 {total += (*i)->numberOfEquations();}
126 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
134 dr.sub(cr_size+1,1,lConst);
135 cr_size += (*i)->numberOfEquations();
137 return std::pair<AlgebraicMatrix, AlgebraicVector>(dr,param);
143 if(
cts.size() == 0)
throw VertexException(
"MultipleKinematicConstraint::deviations requested for empty constraint");
144 for(std::vector<KinematicConstraint *>::const_iterator
i =
cts.begin();
i !=
cts.end();
i++)
147 for(
int j = 1;
j < nStates*7+1;
j++){dev(
j) = dev(
j) + dev_loc(
j);}
int numberOfEquations() const
void addConstraint(KinematicConstraint *newConst) const
std::pair< AlgebraicVector, AlgebraicVector > value(const AlgebraicVector &exPoint) const
std::vector< KinematicConstraint * > cts
std::pair< AlgebraicMatrix, AlgebraicVector > derivative(const AlgebraicVector &exPoint) const
CLHEP::HepMatrix AlgebraicMatrix
CLHEP::HepVector AlgebraicVector
AlgebraicVector deviations(int nStates) const
const double par[8 *NPar][4]