18 clonedState.reserve(in.size());
20 clonedState.push_back({component.params->uniqueClone(), component.weight});
27 double errorScaleLocX,
28 double errorScaleLocY,
30 double errorScaleTheta,
31 double errorScaleQoverP)
34 coefficients(0, 0) = (errorScaleLocX * errorScaleLocX);
35 coefficients(1, 1) = (errorScaleLocY * errorScaleLocY);
36 coefficients(2, 2) = (errorScalePhi * errorScalePhi);
37 coefficients(3, 3) = (errorScaleTheta * errorScaleTheta);
38 coefficients(4, 4) = (errorScaleQoverP * errorScaleQoverP);
39 coefficients.fillSymmetric(0, 1, (errorScaleLocX * errorScaleLocY));
40 coefficients.fillSymmetric(0, 2, (errorScaleLocX * errorScalePhi));
41 coefficients.fillSymmetric(0, 3, (errorScaleLocX * errorScaleTheta));
42 coefficients.fillSymmetric(0, 4, (errorScaleLocX * errorScaleQoverP));
43 coefficients.fillSymmetric(1, 2, (errorScaleLocY * errorScalePhi));
44 coefficients.fillSymmetric(1, 3, (errorScaleLocY * errorScaleTheta));
45 coefficients.fillSymmetric(1, 4, (errorScaleLocY * errorScaleQoverP));
46 coefficients.fillSymmetric(2, 3, (errorScalePhi * errorScaleTheta));
47 coefficients.fillSymmetric(2, 4, (errorScalePhi * errorScaleQoverP));
48 coefficients.fillSymmetric(3, 4, (errorScaleTheta * errorScaleQoverP));
52 const AmgSymMatrix(5)* originalMatrix = trackParameters->covariance();
54 if (!originalMatrix) {
58 (*originalMatrix).cwiseProduct(coefficients);
62 return { std::move(in) };
70 const AmgSymMatrix(5)* originalMatrix = component.params->covariance();
71 if (!originalMatrix) {
84 double sumWeights = 0.;
86 sumWeights += component.weight;
88 if (sumWeights == 0) {
91 double normalise =
norm / sumWeights;
93 component.weight = component.weight * normalise;