126 std::vector<RefCountedKinematicParticle> prt = iSort.
sort(trees);
127 int nStates = prt.size();
136 for(std::vector<RefCountedKinematicParticle>::const_iterator
i = prt.begin();
i != prt.end();
i++)
139 for(
int j = 1;
j != 8;
j++){
part(7*l_c +
j) = lp(
j-1);}
140 AlgebraicSymMatrix lc= asHepMatrix<7>((*i)->currentState().kinematicParametersError().matrix());
142 chi_in(l_c+1) = (*i)->chiSquared();
143 ndf_in(l_c+1) = (*i)->degreesOfFreedom();
171 vl = cs->
value(exPoint).first;
191 LogDebug(
"KinematicConstrainedVertexFitter")
192 <<
"Fit failed: unable to invert covariance matrix\n";
193 return std::vector<RefCountedKinematicTree>();
201 refPar = part - (cov * drt * lambda);
210 for(
int i = 1;
i< nStates*7 +1; ++
i)
212 for(
int j = 1;
j< nStates*7 +1;
j++)
213 {
if(
i<=
j) sCovF(
i,
j) = covF(
i,
j);}
219 for(
int i = 1;
i < nStates+1;
i++)
220 {
for(
int j = 1;
j<8;
j++){refCovS((
i-1)+
j,(
i-1)+
j) += dev(
j);}}
223 for(
int k =1;
k<nStates+1;
k++)
225 chi(
k) += (lambda.T() * (dr*delta_alpha + vl))(1);
231 for(
int i = 1;
i< vl.num_row();
i++)
239 std::vector<RefCountedKinematicParticle> refPart;
240 std::vector<RefCountedKinematicTree> refTrees = trees;
243 std::vector<RefCountedKinematicTree>::const_iterator tr = refTrees.begin();
244 for(std::vector<RefCountedKinematicParticle>::const_iterator
i = prt.begin();
i!= prt.end();
i++)
247 for(
int k = 1;
k<8 ;
k++)
248 {lRefPar(
k-1) = refPar((j-1)*7+
k);}
254 KinematicState kState(param,er,(*i)->initialState().particleCharge(), (**i).magneticField());
258 (*tr)->findParticle(*
i);
260 (*tr)->replaceCurrentParticle(refParticle);
269 (*tr)->replaceCurrentVertex(nVertex);
T getParameter(std::string const &) const
auto_ptr< ClusterSequence > cs
void setParameters(const edm::ParameterSet &pSet)
virtual KinematicConstraint * clone() const =0
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
ROOT::Math::SVector< double, 7 > AlgebraicVector7
CLHEP::HepMatrix AlgebraicMatrix
virtual int numberOfEquations() const =0
CLHEP::HepVector AlgebraicVector
virtual AlgebraicVector deviations(int nStates) const =0
LagrangeParentParticleFitter()
virtual std::pair< AlgebraicMatrix, AlgebraicVector > derivative(const AlgebraicVector &exPoint) const =0
CLHEP::HepSymMatrix AlgebraicSymMatrix
static RefCountedKinematicVertex vertex(const VertexState &state, float totalChiSq, float degreesOfFr)
std::vector< RefCountedKinematicTree > fit(std::vector< RefCountedKinematicTree > trees, KinematicConstraint *cs) const
AlgebraicSymMatrix77 matrix() const
virtual std::pair< AlgebraicVector, AlgebraicVector > value(const AlgebraicVector &exPoint) const =0