10 <<
"Trying to collapse empty set of trajectory states!";
14 double pzSign = tsos.front().localParameters().pzSign();
15 for (std::vector<TrajectoryStateOnSurface>::const_iterator it = tsos.begin();
16 it != tsos.end(); it++) {
17 if (it->localParameters().pzSign() != pzSign) {
19 <<
"Trying to collapse trajectory states with different signs on p_z!";
24 if (tsos.size() == 1) {
32 for (std::vector<TrajectoryStateOnSurface>::const_iterator it1 = tsos.begin();
33 it1 != tsos.end(); it1++) {
34 double weight = it1->weight();
37 mean += weight * param;
38 covarPart1 += weight * it1->localError().matrix();
39 for (std::vector<TrajectoryStateOnSurface>::const_iterator it2 = it1 + 1;
40 it2 != tsos.end(); it2++) {
43 covarPart2 += weight * it2->weight() *
48 double sumwI = 1.0/sumw;
50 covarPart1 *= sumwI; covarPart2 *= (sumwI*sumwI);
55 tsos.front().surface(),
56 &(tsos.front().globalParameters().magneticField()),
57 tsos.front().surfaceSide(),
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
TrajectoryStateOnSurface combine(const std::vector< TrajectoryStateOnSurface > &tsos) const
ROOT::Math::SMatrix< double, 5, 1, ROOT::Math::MatRepStd< double, 5, 1 > > AlgebraicMatrix51
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
ROOT::Math::SVector< double, 5 > AlgebraicVector5
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > AlgebraicSymMatrix11