9 if (theMixture.empty()) {
11 (
"MultiVertexStateCombiner:: VertexState container to collapse is empty");
14 if (theMixture.size()==1) {
16 return VertexState(theMixture.front().position(), theMixture.front().error(), 1.0);
25 double weightSum = 0.;
27 for (VSC::const_iterator mixtureIter1 = theMixture.begin();
28 mixtureIter1 != theMixture.end(); mixtureIter1++ ) {
29 double vtxWeight = mixtureIter1->weightInMixture();
31 GlobalPoint vertexPosition = mixtureIter1->position();
33 vertexCoord1[0] = vertexPosition.
x();
34 vertexCoord1[1] = vertexPosition.
y();
35 vertexCoord1[2] = vertexPosition.
z();
38 weightSum += vtxWeight;
39 meanPosition += vtxWeight * vertexCoord1;
41 measCovar1 += vtxWeight * mixtureIter1->error().matrix();
42 for (VSC::const_iterator mixtureIter2 = mixtureIter1+1;
43 mixtureIter2 != theMixture.end(); mixtureIter2++ ) {
44 GlobalPoint vertexPosition2 = mixtureIter2->position();
46 vertexCoord2[0] = vertexPosition2.
x();
47 vertexCoord2[1] = vertexPosition2.
y();
48 vertexCoord2[2] = vertexPosition2.
z();
52 measCovar2 +=vtxWeight * mixtureIter2->weightInMixture() * ROOT::Math::SimilarityT(tmp,s);
55 meanPosition /= weightSum;
58 GlobalPoint newPos(meanPosition[0], meanPosition[1], meanPosition[2]);
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 1, 3, ROOT::Math::MatRepStd< double, 1, 3 > > AlgebraicMatrix13
ROOT::Math::SVector< double, 3 > AlgebraicVector3
std::vector< std::vector< double > > tmp
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > AlgebraicSymMatrix11